Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds basic federation status health check #35

Merged
merged 16 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 1 addition & 6 deletions cmd/cofidectl/cmd/federation/federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,7 @@ func checkFederationStatus(ctx context.Context, kubeConfig string, from *trust_z
}

// Bundle does not exist at all on opposite trust domain
_, ok := compare[to].federatedBundles[from.TrustDomain]
jsnctl marked this conversation as resolved.
Show resolved Hide resolved
if !ok {
return "Unhealthy", nil
}

_, ok = compare[from].federatedBundles[to.TrustDomain]
_, ok := compare[from].federatedBundles[to.TrustDomain]
if !ok {
return "Unhealthy", nil
}
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/federation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ function wait_for_pong() {
}

function post_deploy() {
if ./cofidectl federation list | grep Healthy; then
return
federations=$(./cofidectl federation list)
if echo "$federations" | grep Unhealthy >/dev/null; then
return 1
fi
exit 1
}

function down() {
Expand Down
Loading