Skip to content

Commit

Permalink
fixed olm env var issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cchen-vertica committed Jan 28, 2025
1 parent 4f9254d commit 720aa6f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ testbin/*

# Omit some fully generated files
config/crd/bases/*.yaml
config/manager/operator-envs-with-value
config/rbac/role.yaml
api/v1beta1/zz_generated.deepcopy.go

Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ generatorOptions:

configMapGenerator:
- envs:
- operator-envs
- operator-envs-with-value
literals:
- PREFIX_NAME=verticadb-operator
- WEBHOOK_CERT_SECRET=verticadb-operator-service-cert
Expand Down
36 changes: 18 additions & 18 deletions config/manager/operator-envs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# These are environment variables that are included in the operator config map.
# These are exported in the Makefile.
DEPLOY_WITH
VERSION
WEBHOOKS_ENABLED
CONTROLLERS_ENABLED
CONTROLLERS_SCOPE
METRICS_ADDR
METRICS_TLS_SECRET
METRICS_PROXY_RBAC
LOG_LEVEL
CONCURRENCY_VERTICADB
CONCURRENCY_VERTICAAUTOSCALER
CONCURRENCY_EVENTTRIGGER
CONCURRENCY_VERTICARESTOREPOINTSQUERY
CONCURRENCY_VERTICASCRUTINIZE
CONCURRENCY_SANDBOXCONFIGMAP
CONCURRENCY_VERTICAREPLICATOR
BROADCASTER_BURST_SIZE
VDB_MAX_BACKOFF_DURATION
DEPLOY_WITH=${DEPLOY_WITH}
VERSION=${VERSION}
WEBHOOKS_ENABLED=${WEBHOOKS_ENABLED}
CONTROLLERS_ENABLED=${CONTROLLERS_ENABLED}
CONTROLLERS_SCOPE=${CONTROLLERS_SCOPE}
METRICS_ADDR=${METRICS_ADDR}
METRICS_TLS_SECRET=${METRICS_TLS_SECRET}
METRICS_PROXY_RBAC=${METRICS_PROXY_RBAC}
LOG_LEVEL=${LOG_LEVEL}
CONCURRENCY_VERTICADB=${CONCURRENCY_VERTICADB}
CONCURRENCY_VERTICAAUTOSCALER=${CONCURRENCY_VERTICAAUTOSCALER}
CONCURRENCY_EVENTTRIGGER=${CONCURRENCY_EVENTTRIGGER}
CONCURRENCY_VERTICARESTOREPOINTSQUERY=${CONCURRENCY_VERTICARESTOREPOINTSQUERY}
CONCURRENCY_VERTICASCRUTINIZE=${CONCURRENCY_VERTICASCRUTINIZE}
CONCURRENCY_SANDBOXCONFIGMAP=${CONCURRENCY_SANDBOXCONFIGMAP}
CONCURRENCY_VERTICAREPLICATOR=${CONCURRENCY_VERTICAREPLICATOR}
BROADCASTER_BURST_SIZE=${BROADCASTER_BURST_SIZE}
VDB_MAX_BACKOFF_DURATION=${VDB_MAX_BACKOFF_DURATION}
3 changes: 3 additions & 0 deletions scripts/config-transformer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ OPERATOR_CHART="$REPO_DIR/helm-charts/verticadb-operator"
TEMPLATE_DIR=$OPERATOR_CHART/templates
CRD_DIR=$OPERATOR_CHART/crds

# Fill in operator variables
envsubst < $REPO_DIR/config/manager/operator-envs > $REPO_DIR/config/manager/operator-envs-with-value

rm $TEMPLATE_DIR/*yaml 2>/dev/null || true
$KUSTOMIZE build $REPO_DIR/config/default | $KUBERNETES_SPLIT_YAML --outdir $TEMPLATE_DIR -
mv $TEMPLATE_DIR/*-crd.yaml $CRD_DIR
Expand Down
3 changes: 3 additions & 0 deletions scripts/gen-csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ shift
BUNDLE_METADATA_OPTS=$@
BUNDLE_GEN_FLAGS="-q --overwrite --version $VERSION $BUNDLE_METADATA_OPTS $USE_IMAGE_DIGESTS_FLAG"

# Fill in operator variables
envsubst < $REPO_DIR/config/manager/operator-envs > $REPO_DIR/config/manager/operator-envs-with-value

cd $REPO_DIR
rm -rf bundle/ 2>/dev/null || true
$OPERATOR_SDK generate kustomize manifests -q
Expand Down

0 comments on commit 720aa6f

Please sign in to comment.