-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: operator-first deployment (#164)
* Refactor: operator-first deployment Signed-off-by: ZachRobinson <[email protected]> Co-authored-by: Milica Cvrkota <[email protected]> Co-authored-by: Konrad Ohms <[email protected]> Co-authored-by: Fredrik Gunderson <[email protected]>
- Loading branch information
1 parent
1da9044
commit bbfb252
Showing
169 changed files
with
18,970 additions
and
3,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
!api/ | ||
!controllers/ | ||
!logger/ | ||
!pkg/ | ||
!version/ | ||
|
||
# Other files not to ignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# MAINTAINERS | ||
|
||
Felix Marx - @FelixMarxIBM | ||
Henning Treu - @htreu | ||
Torsten Kohn - @tkohn | ||
- Konrad Ohms - @konrad-ohms | ||
- Milica Cvrkota - @Milica-Cvrkota-IBM | ||
- Fredrik Gundersen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,9 @@ deploy: manifests kustomize ## Deploy controller in the configured Kubernetes cl | |
cd config/manager && $(KUSTOMIZE) edit set image instana/instana-agent-operator=${IMG} | ||
$(KUSTOMIZE) build config/default | kubectl apply -f - | ||
|
||
scale-to-zero: ## Scales the operator to zero in the cluster to allow local testing against a cluster | ||
kubectl -n instana-agent scale --replicas=0 deployment.apps/instana-agent-operator && sleep 5 && kubectl get all -n instana-agent | ||
|
||
deploy-minikube: manifests kustomize ## Convenience target to push the docker image to a local running Minikube cluster and deploy the Operator there. | ||
(eval $$(minikube docker-env) && docker rmi ${IMG} || true) | ||
docker save ${IMG} | (eval $$(minikube docker-env) && docker load) | ||
|
@@ -217,3 +220,62 @@ bundle-build: ## Build the bundle image for OLM. | |
controller-yaml: manifests kustomize ## Output the YAML for deployment, so it can be packaged with the release. Use `make --silent` to suppress other output. | ||
cd config/manager && $(KUSTOMIZE) edit set image "instana/instana-agent-operator=$(IMG)" | ||
$(KUSTOMIZE) build config/default | ||
|
||
get-mockgen: | ||
# commit 2c718f249a424ac6ce6e2afa28c3c17f95c51241 introduces --write_command_comment flag to enable us to keep the mocks without additional command comments | ||
which mockgen >> /dev/null 2>&1 || go install go.uber.org/mock/mockgen@2c718f249a424ac6ce6e2afa28c3c17f95c51241 | ||
|
||
MOCKGEN_ARGS = --write_package_comment=false --write_source_comment=false --write_command_comment=false --copyright_file=hack/boilerplate.go.txt | ||
gen-mocks: get-mockgen | ||
mockgen --source ${GOPATH}/pkg/mod/sigs.k8s.io/[email protected]/pkg/client/interfaces.go --destination ./pkg/k8s/client/k8s_client_mock_test.go --package client ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/hash/hash.go --destination ./pkg/k8s/object/builders/agent/daemonset/hash_mock_test.go --package daemonset ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/transformations/pod_selector.go --destination ./pkg/k8s/object/builders/agent/daemonset/pod_selector_mock_test.go --package daemonset ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/ports/ports.go --destination ./pkg/k8s/object/builders/agent/daemonset/ports_mock_test.go --package daemonset ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/env/env_builder.go --destination ./pkg/k8s/object/builders/agent/daemonset/env_builder_mock_test.go --package daemonset ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/volume/volume_builder.go --destination ./pkg/k8s/object/builders/agent/daemonset/volume_builder_mock_test.go --package daemonset ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/operator/status/status.go --destination ./pkg/k8s/object/builders/agent/daemonset/status_mock_test.go --package daemonset ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/common/env/helpers_mock_test.go --package env ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/common/volume/helpers_mock_test.go --package volume ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/client/client.go --destination ./pkg/k8s/operator/operator_utils/instana_agent_client_mock_test.go --package operator_utils ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/builder/builder.go --destination ./pkg/k8s/operator/operator_utils/builder_mock_test.go --package operator_utils ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/operator/lifecycle/lifecycle.go --destination ./pkg/k8s/operator/operator_utils/lifecycle_mock_test.go --package operator_utils ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/k8s-sensor/rbac/helpers_mock_test.go --package rbac ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/k8s-sensor/serviceaccount/helpers_mock_test.go --package serviceaccount ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/agent/serviceaccount/helpers_mock_test.go --package serviceaccount ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/k8s-sensor/configmap/helpers_mock_test.go --package configmap ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/ports/ports.go --destination ./pkg/k8s/object/builders/common/ports/ports_mock_test.go --package ports ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/helpers/agent_interfaces.go --destination ./pkg/k8s/object/builders/common/ports/agent_interfaces_mock_test.go --package ports ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/agent/headless-service/helpers_mock_test.go --package headless_service ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/transformations/pod_selector.go --destination ./pkg/k8s/object/builders/agent/headless-service/pod_selector_mock_test.go --package headless_service ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/ports/ports.go --destination ./pkg/k8s/object/builders/agent/headless-service/ports_mock_test.go --package headless_service ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/transformations/pod_selector.go --destination ./pkg/k8s/object/builders/agent/service/pod_selector_mock_test.go --package service ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/ports/ports.go --destination ./pkg/k8s/object/builders/agent/service/ports_mock_test.go --package service ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/helpers/agent_interfaces.go --destination ./pkg/k8s/object/builders/agent/service/agent_interfaces_mock_test.go --package service ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/transformations/transformations.go --destination ./pkg/k8s/object/builders/common/builder/transformations_mock_test.go --package builder ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/common/builder/builder.go --destination ./pkg/k8s/object/builders/common/builder/builder_mock_test.go --package builder ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/agent/secrets/tls-secret/helpers_mock_test.go --package tls_secret ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/agent/secrets/containers-instana-io-secret/helpers_mock_test.go --package containers_instana_io_secret ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/builders/agent/secrets/containers-instana-io-secret/docker_config_json.go --destination ./pkg/k8s/object/builders/agent/secrets/containers-instana-io-secret/docker_config_json_mock_test.go --package containers_instana_io_secret ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/operator/status/status.go --destination ./pkg/k8s/object/builders/agent/configmap/status_mock_test.go --package configmap ${MOCKGEN_ARGS} | ||
|
||
mockgen --source ./pkg/k8s/object/builders/common/helpers/helpers.go --destination ./pkg/k8s/object/builders/k8s-sensor/poddisruptionbudget/helpers_mock_test.go --package poddisruptionbudget ${MOCKGEN_ARGS} | ||
mockgen --source ./pkg/k8s/object/transformations/pod_selector.go --destination ./pkg/k8s/object/builders/k8s-sensor/poddisruptionbudget/pod_selector_mock_test.go --package poddisruptionbudget ${MOCKGEN_ARGS} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.