Skip to content

Commit

Permalink
Merge branch 'huntergregory/operator-v2' of ssh://github.com/microsof…
Browse files Browse the repository at this point in the history
…t/retina into huntergregory/operator-v2
  • Loading branch information
jimassa committed Jul 9, 2024
2 parents fee2ba1 + d8dca88 commit 8eb7a02
Show file tree
Hide file tree
Showing 4 changed files with 239 additions and 1 deletion.
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ RMDIR := rm -rf
## Globals
GIT_CURRENT_BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD)

CERT_FILES := tls.crt:tls-client-cert-file \
tls.key:tls-client-key-file \
ca.crt:tls-ca-cert-files

CERT_FILES := tls.crt:tls-client-cert-file \
tls.key:tls-client-key-file \
ca.crt:tls-ca-cert-files
Expand Down Expand Up @@ -40,6 +44,8 @@ OS_VERSION ?= ltsc2019

HUBBLE_VERSION ?= v0.13.0

HUBBLE_VERSION ?= v0.13.0

CONTAINER_BUILDER ?= docker
CONTAINER_RUNTIME ?= docker
YEAR ?= 2022
Expand Down Expand Up @@ -255,6 +261,7 @@ container-docker: buildx # util target to build container images using docker bu
--build-arg GOOS=$$os \
--build-arg OS_VERSION=$(OS_VERSION) \
--build-arg HUBBLE_VERSION=$(HUBBLE_VERSION) \
--build-arg HUBBLE_VERSION=$(HUBBLE_VERSION) \
--build-arg VERSION=$(VERSION) $(EXTRA_BUILD_ARGS) \
--target=$(TARGET) \
-t $(IMAGE_REGISTRY)/$(IMAGE):$(TAG) \
Expand Down Expand Up @@ -516,6 +523,31 @@ clean-certs:
hubble config set tls false
hubble config reset tls-server-name

.PHONY: get-certs
get-certs:
mkdir -p $(CERT_DIR)
$(foreach kv,$(CERT_FILES),\
$(eval FILE=$(word 1,$(subst :, ,$(kv)))) \
$(eval CONFIG_KEY=$(word 2,$(subst :, ,$(kv)))) \
kubectl get secret $(TLS_SECRET_NAME) \
-n kube-system \
-o jsonpath="{.data['$(call escape_dot,$(FILE))']}" \
| base64 -d > $(CERT_DIR)/$(FILE);\
hubble config set $(CONFIG_KEY) $(CERT_DIR)/$(FILE);\
)
hubble config set tls true
hubble config set tls-server-name instance.hubble-relay.cilium.io

.PHONY: clean-certs
clean-certs:
rm -rf $(CERT_DIR)
$(foreach kv,$(CERT_FILES),\
$(eval CONFIG_KEY=$(word 2,$(subst :, ,$(kv)))) \
hubble config reset $(CONFIG_KEY);\
)
hubble config set tls false
hubble config reset tls-server-name

.PHONY: docs
docs:
echo $(PWD)
Expand All @@ -539,6 +571,11 @@ quick-deploy-hubble:
$(MAKE) helm-uninstall || true
$(MAKE) helm-install-without-tls HELM_IMAGE_TAG=$(TAG)-linux-amd64

.PHONY: quick-deploy-hubble
quick-deploy-hubble:
$(MAKE) helm-uninstall || true
$(MAKE) helm-install-without-tls HELM_IMAGE_TAG=$(TAG)-linux-amd64

.PHONY: simplify-dashboards
simplify-dashboards:
cd deploy/legacy/grafana/dashboards && go test . -tags=dashboard,simplifydashboard -v && cd $(REPO_ROOT)
Expand Down
3 changes: 2 additions & 1 deletion deploy/hubble/manifests/controller/helm/retina/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ agent:
init:
enabled: true
name: retina-agent-init
repository: acndev.azurecr.io/retina-agent-init
repository: ghcr.io/microsoft/retina/retina-init

tag: "latest"
pullPolicy: Always
container:
Expand Down
60 changes: 60 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ module github.com/microsoft/retina
go 1.22.3

require (
github.com/go-chi/chi/v5 v5.1.0
github.com/go-chi/chi/v5 v5.1.0
github.com/google/uuid v1.6.0
github.com/prometheus/client_golang v1.19.1
github.com/spf13/cobra v1.8.1
go.uber.org/zap v1.27.0
go.uber.org/zap v1.27.0
k8s.io/client-go v0.30.1
)

Expand Down Expand Up @@ -37,6 +39,10 @@ require (
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect
Expand All @@ -47,13 +53,25 @@ require (
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 // indirect
github.com/aws/smithy-go v1.20.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 // indirect
github.com/aws/smithy-go v1.20.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cilium/dns v1.1.51-0.20231120140355-729345173dc3 // indirect
github.com/cilium/lumberjack/v2 v2.3.0 // indirect
github.com/cilium/stream v0.0.0-20240226091623-f979d32855f8 // indirect
github.com/cilium/dns v1.1.51-0.20231120140355-729345173dc3 // indirect
github.com/cilium/lumberjack/v2 v2.3.0 // indirect
github.com/cilium/stream v0.0.0-20240226091623-f979d32855f8 // indirect
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/containerd v1.7.14 // indirect
Expand All @@ -64,6 +82,7 @@ require (
github.com/containerd/ttrpc v1.2.3 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/containernetworking/cni v1.1.2 // indirect
github.com/containernetworking/cni v1.1.2 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
Expand All @@ -80,6 +99,7 @@ require (
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/color v1.16.0 // indirect
Expand All @@ -99,6 +119,16 @@ require (
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
github.com/go-openapi/runtime v0.28.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
Expand All @@ -109,8 +139,10 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/gops v0.3.27 // indirect
github.com/google/gops v0.3.27 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/renameio/v2 v2.0.0 // indirect
github.com/google/renameio/v2 v2.0.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
Expand All @@ -122,6 +154,7 @@ require (
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
Expand All @@ -142,6 +175,7 @@ require (
github.com/lib/pq v1.10.9 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mackerelio/go-osstat v0.2.4 // indirect
github.com/mackerelio/go-osstat v0.2.4 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down Expand Up @@ -178,6 +212,7 @@ require (
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rubenv/sql-migrate v1.5.2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand All @@ -197,6 +232,10 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
Expand All @@ -207,6 +246,7 @@ require (
go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect
go.etcd.io/etcd/client/v3 v3.5.12 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.starlark.net v0.0.0-20230814145427-12f4cb8177e4 // indirect
Expand All @@ -221,6 +261,7 @@ require (
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.62.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand All @@ -235,6 +276,7 @@ require (
require (
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0
Expand All @@ -248,8 +290,10 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0
golang.org/x/sys v0.22.0
golang.org/x/sys v0.22.0
golang.org/x/term v0.21.0 // indirect
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand All @@ -269,10 +313,12 @@ require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.8.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dashboard/armdashboard v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5 v5.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5 v5.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
github.com/Microsoft/hcsshim v0.12.0-rc.3
Expand All @@ -281,15 +327,22 @@ require (
github.com/aws/aws-sdk-go-v2/config v1.27.24
github.com/aws/aws-sdk-go-v2/credentials v1.17.24
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.0
github.com/aws/aws-sdk-go-v2 v1.30.1
github.com/aws/aws-sdk-go-v2/config v1.27.24
github.com/aws/aws-sdk-go-v2/credentials v1.17.24
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.0
github.com/cakturk/go-netstat v0.0.0-20200220111822-e5b49efee7a5
github.com/cilium/cilium v1.16.0-pre.1.0.20240403152809-b9853ecbcaeb
github.com/cilium/cilium v1.16.0-pre.1.0.20240403152809-b9853ecbcaeb
github.com/cilium/ebpf v0.15.0
github.com/cilium/proxy v0.0.0-20231031145409-f19708f3d018
github.com/cilium/proxy v0.0.0-20231031145409-f19708f3d018
github.com/cilium/workerpool v1.2.0
github.com/florianl/go-tc v0.4.3
github.com/go-logr/zapr v1.3.0
github.com/google/gopacket v1.1.19
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/inspektor-gadget/inspektor-gadget v0.27.0
github.com/jellydator/ttlcache/v3 v3.1.1
github.com/jsternberg/zap-logfmt v1.3.0
Expand All @@ -300,15 +353,22 @@ require (
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.55.0
github.com/safchain/ethtool v0.4.1
github.com/prometheus/common v0.55.0
github.com/safchain/ethtool v0.4.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/viper v1.19.0
github.com/vishvananda/netlink v1.2.1-beta.2.0.20240524165444-4d4ba1473f21
go.etcd.io/etcd v3.3.27+incompatible
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/metric v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
go.etcd.io/etcd v3.3.27+incompatible
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/metric v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
go.uber.org/mock v0.4.0
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gotest.tools v2.2.0+incompatible
gotest.tools/v3 v3.5.1
Expand Down
Loading

0 comments on commit 8eb7a02

Please sign in to comment.