Skip to content

Commit 914ed9e

Browse files
committed
added env var to non-olm-install script and updated docs
Signed-off-by: Raghavi Shirur <rshirur@redhat.com>
1 parent 1688146 commit 914ed9e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

hack/non-olm-install/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The following environment variables can be set to configure various options for
8686
| **SERVER_CLUSTER_ROLE** |This environment variable enables administrators to configure a common cluster role to use across all of the managed namespaces in the role bindings the operator creates for the Argo CD server. | None |
8787
| **WATCH_NAMESPACE** | namespaces in which Argo applications can be created | None |
8888
| **ENABLE_CONVERSION_WEBHOOK** | This environment variable enables conversion webhook to convert v1alpha1 ArgoCD resources to v1beta1 | true |
89+
| **ARGOCD_LABEL_SELECTOR** | This environment variable will enable the operator to reconcile only the corresponding ArgoCD instances having the matching label selector. The label selector can be set on argocd-opertor by exporting `ARGOCD_LABEL_SELECTOR` (eg: `export ARGOCD_LABEL_SELECTOR=foo=bar`). The labels can be added to the argocd instances using the command `kubectl label argocd test1 foo=bar -n test-argocd`. | None |
8990
### Running the script
9091

9192
#### Usage

hack/non-olm-install/install-gitops-operator.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ CONTROLLER_CLUSTER_ROLE=${CONTROLLER_CLUSTER_ROLE:-""}
4141
DISABLE_DEFAULT_ARGOCD_INSTANCE=${DISABLE_DEFAULT_ARGOCD_INSTANCE:-"false"}
4242
SERVER_CLUSTER_ROLE=${SERVER_CLUSTER_ROLE:-""}
4343
WATCH_NAMESPACE=${WATCH_NAMESPACE:-""}
44+
ARGOCD_LABEL_SELECTOR=${ARGOCD_LABEL_SELECTOR:-""}
4445
ENABLE_CONVERSION_WEBHOOK=${ENABLE_CONVERSION_WEBHOOK:-"true"}
4546

4647
# Print help message
@@ -232,6 +233,8 @@ spec:
232233
value: \"${SERVER_CLUSTER_ROLE}\"
233234
- name: WATCH_NAMESPACE
234235
value: \"${WATCH_NAMESPACE}\"
236+
- name: ARGOCD_LABEL_SELECTOR
237+
value: \"${ARGOCD_LABEL_SELECTOR}\"
235238
- name: ENABLE_CONVERSION_WEBHOOK
236239
value: \"${ENABLE_CONVERSION_WEBHOOK}\"" > ${WORK_DIR}/env-overrides.yaml
237240
}
@@ -449,6 +452,9 @@ function print_info() {
449452
if [ ! -z "${WATCH_NAMESPACE}" ]; then
450453
echo "WATCH_NAMESPACE: ${WATCH_NAMESPACE}"
451454
fi
455+
if [ ! -z "${ARGOCD_LABEL_SELECTOR}" ]; then
456+
echo "ARGOCD_LABEL_SELECTOR: ${ARGOCD_LABEL_SELECTOR}"
457+
fi
452458
if [ ! -z "${ENABLE_CONVERSION_WEBHOOK}" ]; then
453459
echo "ENABLE_CONVERSION_WEBHOOK: ${ENABLE_CONVERSION_WEBHOOK}"
454460
fi

0 commit comments

Comments
 (0)