Skip to content

Commit

Permalink
Merge branch 'jmassa/retina-hubble-manifest' into huntergregory/opera…
Browse files Browse the repository at this point in the history
…tor-v2
  • Loading branch information
jimassa committed Jun 19, 2024
2 parents 65cf2a6 + 4ab8ad0 commit 4fd3ed1
Show file tree
Hide file tree
Showing 111 changed files with 16,442 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
set -euo pipefail
export TAG=$(make version)
helm package ./deploy/manifests/controller/helm/retina --version $TAG
helm package ./deploy/legacy/manifests/controller/helm/retina --version $TAG
# Get Helm chart's SHA digest from helm push cmd output
helm push retina-$TAG.tgz oci://ghcr.io/${{ github.repository }}/charts >> helm_push_result.txt 2>&1
cat helm_push_result.txt
Expand Down
36 changes: 31 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ YEAR ?= 2022
ALL_ARCH.linux = amd64 arm64
ALL_ARCH.windows = amd64

#######
# TLS #
#######
ENABLE_TLS ?= true
CERT_DIR := $(REPO_ROOT)/.certs

# TAG is OS and platform agonstic, which can be used for binary version and image manifest tag,
# while RETINA_PLATFORM_TAG is platform specific, which can be used for image built for specific platforms.
RETINA_PLATFORM_TAG ?= $(TAG)-$(subst /,-,$(PLATFORM))
Expand Down Expand Up @@ -376,7 +382,7 @@ HELM_IMAGE_TAG ?= v0.0.2

# basic/node-level mode
helm-install: manifests
helm upgrade --install retina ./deploy/manifests/controller/helm/retina/ \
helm upgrade --install retina ./deploy/legacy/manifests/controller/helm/retina/ \
--namespace kube-system \
--set image.repository=$(IMAGE_REGISTRY)/$(RETINA_IMAGE) \
--set image.initRepository=$(IMAGE_REGISTRY)/$(RETINA_INIT_IMAGE) \
Expand All @@ -389,7 +395,7 @@ helm-install: manifests
--set enabledPlugin_linux="\[dropreason\,packetforward\,linuxutil\,dns\]"

helm-install-with-operator: manifests
helm upgrade --install retina ./deploy/manifests/controller/helm/retina/ \
helm upgrade --install retina ./deploy/legacy/manifests/controller/helm/retina/ \
--namespace kube-system \
--set image.repository=$(IMAGE_REGISTRY)/$(RETINA_IMAGE) \
--set image.initRepository=$(IMAGE_REGISTRY)/$(RETINA_INIT_IMAGE) \
Expand All @@ -406,7 +412,7 @@ helm-install-with-operator: manifests

# advanced/pod-level mode with scale limitations, where metrics are aggregated by source and destination Pod
helm-install-advanced-remote-context: manifests
helm upgrade --install retina ./deploy/manifests/controller/helm/retina/ \
helm upgrade --install retina ./deploy/legacy/manifests/controller/helm/retina/ \
--namespace kube-system \
--set image.repository=$(IMAGE_REGISTRY)/$(RETINA_IMAGE) \
--set image.initRepository=$(IMAGE_REGISTRY)/$(RETINA_INIT_IMAGE) \
Expand All @@ -425,7 +431,7 @@ helm-install-advanced-remote-context: manifests

# advanced/pod-level mode designed for scale, where metrics are aggregated by "local" Pod (source for outgoing traffic, destination for incoming traffic)
helm-install-advanced-local-context: manifests
helm upgrade --install retina ./deploy/manifests/controller/helm/retina/ \
helm upgrade --install retina ./deploy/legacy/manifests/controller/helm/retina/ \
--namespace kube-system \
--set image.repository=$(IMAGE_REGISTRY)/$(RETINA_IMAGE) \
--set image.initRepository=$(IMAGE_REGISTRY)/$(RETINA_INIT_IMAGE) \
Expand All @@ -442,6 +448,26 @@ helm-install-advanced-local-context: manifests
--set enablePodLevel=true \
--set enableAnnotations=true

helm-install-hubble:
helm upgrade --install retina ./deploy/hubble/manifests/controller/helm/retina/ \
--namespace kube-system \
--set operator.enabled=true \
--set operator.repository=$(IMAGE_REGISTRY)/$(RETINA_OPERATOR_IMAGE) \
--set operator.tag=$(HELM_IMAGE_TAG) \
--set agent.enabled=true \
--set agent.repository=$(IMAGE_REGISTRY)/$(RETINA_IMAGE) \
--set agent.tag=$(HELM_IMAGE_TAG) \
--set agent.init.enabled=true \
--set agent.init.repository=$(IMAGE_REGISTRY)/$(RETINA_INIT_IMAGE) \
--set agent.init.tag=$(HELM_IMAGE_TAG) \
--set logLevel=info \
--set hubble.tls.enabled=$(ENABLE_TLS) \
--set hubble.relay.tls.server.enabled=$(ENABLE_TLS) \
--set hubble.tls.auto.enabled=$(ENABLE_TLS) \
--set hubble.tls.auto.method=cronJob \
--set hubble.tls.auto.certValidityDuration=1 \
--set hubble.tls.auto.schedule="*/10 * * * *"

helm-uninstall:
helm uninstall retina -n kube-system

Expand All @@ -465,4 +491,4 @@ quick-deploy:

.PHONY: simplify-dashboards
simplify-dashboards:
cd deploy/grafana/dashboards/ && go test . -tags=dashboard,simplifydashboard -v
cd deploy/legacy/grafana/dashboards/ && go test . -tags=dashboard,simplifydashboard -v
2 changes: 1 addition & 1 deletion crd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REPO_ROOT = $(shell git rev-parse --show-toplevel)
TOOLS_DIR = $(REPO_ROOT)/hack/tools
TOOLS_BIN_DIR = $(TOOLS_DIR)/bin
CONTROLLER_GEN = $(TOOLS_BIN_DIR)/controller-gen
HELM_CRD_DIR = $(REPO_ROOT)/deploy/manifests/controller/helm/retina/crds
HELM_CRD_DIR = $(REPO_ROOT)/deploy/legacy/manifests/controller/helm/retina/crds

.PHONY: generate manifests

Expand Down
3 changes: 3 additions & 0 deletions deploy/hubble/grafana/dashboards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DAshboards

Dashboards here are a copy of dashboards in the Dashboard [https://msazure.visualstudio.com/One/_git/Azure-Observability-ECG-Grafana-DashboardAuthoring?path=/Azure%20Dashboards/Managed%20Prometheus/Network-Observability] Authoring Repo.
Loading

0 comments on commit 4fd3ed1

Please sign in to comment.