Skip to content

Commit 87ba375

Browse files
authored
fix(e2e): match the SPIRE fixture's controller class for registration entries
The SPIRE Controller Manager only reconciles entries of its own class, <namespace>-<release>. The fixture namespace is now openshell-e2e-spire by default and can be overridden, so the test derives the class from the fixture namespace instead of assuming the old spire-spire. Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 62c9e90 commit 87ba375

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎e2e/rust/tests/kubernetes_shared_supervisor_spiffe.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const TEST_HOST: &str = "host.openshell.internal";
3333
/// Matches `ci/values-spire-delegation-stack.yaml`.
3434
const TRUST_DOMAIN: &str = "openshell.local";
3535
const SPIRE_CLUSTER: &str = "openshell-e2e";
36-
const SPIRE_CLASS: &str = "spire-spire";
3736
/// Matches `ci/values-experimental-supervisor-spiffe.yaml`.
3837
const ID_PREFIX: &str = "spiffe://openshell.local/openshell";
3938
/// Label on the registration entries this run creates, naming its SPIRE
@@ -596,6 +595,9 @@ fn spire_fixture() -> String {
596595
/// Register `sandbox_id`'s SPIFFE ID for delegation, scoped to `agent_id`.
597596
async fn register(gateway_id: &str, sandbox_id: &str, agent_id: &str) {
598597
let fixture = spire_fixture();
598+
// The SPIRE Controller Manager's class is `<namespace>-<release>`; the
599+
// wrapper installs release `spire` in the fixture namespace.
600+
let class_name = format!("{fixture}-spire");
599601
let manifest = format!(
600602
r"apiVersion: spire.spiffe.io/v1alpha1
601603
kind: ClusterStaticEntry
@@ -604,7 +606,7 @@ metadata:
604606
labels:
605607
{ENTRY_LABEL}: {fixture}
606608
spec:
607-
className: {SPIRE_CLASS}
609+
className: {class_name}
608610
spiffeID: {}
609611
parentID: {agent_id}
610612
selectors:

0 commit comments

Comments
 (0)