Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>

Co-authored-by: Marco Franssen <marco.franssen@gmail.com>
  • Loading branch information
kfox1111 and marcofranssen committed Mar 16, 2023
1 parent e9c3d77 commit fce865e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/tests/nested/pre-install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
#!/usr/bin/env bash

SCRIPT_DIR=$(dirname "$0")

kubectl create namespace "${scenario}-root-server"
# Install a spire root server for testing against.
helm install -n "${scenario}-root-server" spire charts/spire --wait -f $SCRIPT_DIR/spire-root-server-values.yaml
helm install -n "${scenario}-root-server" spire charts/spire --wait -f "${SCRIPT_DIR}/spire-root-server-values.yaml"
kubectl get all -n "${scenario}-root-server"
kubectl get nodes -o go-template='{{range .items}}{{printf "%s\n" .metadata.uid}}{{end}}' | while read line; do
kubectl exec -t spire-server-0 -n "${scenario}-root-server" -- spire-server entry create -spiffeID spiffe://example.org/example-cluster/nested-spire -parentID spiffe://example.org/spire/agent/k8s_psat/example-cluster/$line -selector k8s:pod-label:app.kubernetes.io/name:server -downstream
kubectl exec -t spire-server-0 -n "${scenario}-root-server" -- spire-server entry create -spiffeID spiffe://example.org/example-cluster/nested-spire -parentID spiffe://example.org/spire/agent/k8s_psat/example-cluster/$line -selector k8s:pod-label:app.kubernetes.io/name:server -downstream
done

# Install just the upstream csi driver since it can't be done in the main deployment.
helm install -n "${scenario}" spire-upstream-driver charts/spire --wait -f $SCRIPT_DIR/spire-upstream-driver-values.yaml
helm install -n "${scenario}" spire-upstream-driver charts/spire --wait -f "${SCRIPT_DIR}/spire-upstream-driver-values.yaml"
2 changes: 1 addition & 1 deletion .github/tests/nested/spire-root-server-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spire-server:
nodeAttestor:
k8sPsat:
serviceAccountAllowList:
- "nested:spire-agent-upstream"
- nested:spire-agent-upstream
bundleConfigMap: spire-bundle-upstream
notifier:
k8sbundle:
Expand Down

0 comments on commit fce865e

Please sign in to comment.