Skip to content
22 changes: 13 additions & 9 deletions common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ ifneq ($(origin TARGET_SITE), undefined)
TARGET_SITE_OPT=--set main.clusterGroupName=$(TARGET_SITE)
endif

# Set this to true if you want to skip any origin validation
DISABLE_VALIDATE_ORIGIN ?= false
ifeq ($(DISABLE_VALIDATE_ORIGIN),true)
VALIDATE_ORIGIN :=
else
VALIDATE_ORIGIN := validate-origin
endif

# This variable can be set in order to pass additional helm arguments from the
# the command line. I.e. we can set things without having to tweak values files
EXTRA_HELM_OPTS ?=
Expand Down Expand Up @@ -46,7 +38,19 @@ endif
# Set the secret name *and* its namespace when deploying from private repositories
# The format of said secret is documented here: https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories
TOKEN_SECRET ?=
TOKEN_NAMESPACE ?=
TOKEN_NAMESPACE ?= openshift-operators

# Set this to true if you want to skip any origin validation
# if TOKEN_SECRET is set to something then we skip the validation as well
DISABLE_VALIDATE_ORIGIN ?= false
ifeq ($(DISABLE_VALIDATE_ORIGIN),true)
VALIDATE_ORIGIN :=
else ifneq ($(TOKEN_SECRET),)
VALIDATE_ORIGIN :=
else
VALIDATE_ORIGIN := validate-origin
endif


ifeq ($(TOKEN_SECRET),)
# SSH agents are not created for public repos (repos with no secret token) by the patterns operator so we convert to HTTPS
Expand Down