Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,10 @@ fn build_server_rolegroup_daemonset(
&opa_container_name,
)])
.add_env_vars(env)
.add_env_var(
"CONTAINERDEBUG_LOG_DIRECTORY",
format!("{STACKABLE_LOG_DIR}/containerdebug"),
)
.add_container_port(APP_PORT_NAME, APP_PORT.into())
.add_volume_mount(CONFIG_VOLUME_NAME, CONFIG_DIR)
.context(AddVolumeMountSnafu)?
Expand Down
9 changes: 0 additions & 9 deletions tests/templates/kuttl/smoke/10-assert.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,3 @@ spec:
- name: vector
{% endif %}
terminationGracePeriodSeconds: 125 # 2 minutes + 5s safety buffer
---
# This test checks if the containerdebug-state.json file is present and valid
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 600
commands:
- script: |
FIRST_OPA_POD=$(kubectl get -n $NAMESPACE pods --field-selector=status.phase=Running --selector app.kubernetes.io/instance=test-opa -o jsonpath='{.items[0].metadata.name}')
kubectl exec -n $NAMESPACE --container opa $FIRST_OPA_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status
9 changes: 9 additions & 0 deletions tests/templates/kuttl/smoke/11-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# This test checks if the containerdebug-state.json file is present and valid
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 600
commands:
- script: |
FIRST_OPA_POD=$(kubectl get -n $NAMESPACE pods --field-selector=status.phase=Running --selector app.kubernetes.io/instance=test-opa -o jsonpath='{.items[0].metadata.name}')
kubectl exec -n $NAMESPACE --container opa $FIRST_OPA_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status '"valid JSON"'
Loading