Skip to content

Commit 6de6db9

Browse files
committed
add env to product config
1 parent fa1cc76 commit 6de6db9

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

rust/operator-binary/src/controller.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ pub async fn reconcile_opa(
449449
(
450450
vec![
451451
PropertyNameKind::File(CONFIG_FILE.to_string()),
452+
PropertyNameKind::Env,
452453
PropertyNameKind::Cli,
453454
],
454455
opa.spec.servers.clone(),

tests/templates/kuttl/smoke/10-install-opa.yaml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@ spec:
3838
config:
3939
logging:
4040
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
41+
envOverrides:
42+
SERVER_ROLE_LEVEL_ENV_VAR: "SERVER_ROLE_LEVEL_ENV_VAR"
4143
roleGroups:
42-
default: {}
44+
default:
45+
envOverrides:
46+
SERVER_ROLE_GROUP_LEVEL_ENV_VAR: "SERVER_ROLE_GROUP_LEVEL_ENV_VAR"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
metadata:
5+
name: test-env-overrides
6+
commands:
7+
- script: kubectl exec -n $NAMESPACE -c opa svc/test-opa-server -- env | grep SERVER_ROLE_GROUP_LEVEL_ENV_VAR

0 commit comments

Comments
 (0)