Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Fix conditional statement determining in-cluster setup #2760

Merged
merged 2 commits into from
Jan 17, 2020

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Jan 17, 2020

Follow up on #2741

@hiddeco hiddeco requested a review from 2opremio January 17, 2020 18:07
@hiddeco hiddeco force-pushed the bug/incluster-check branch from 6428ca4 to 02c2ec6 Compare January 17, 2020 18:11
@2opremio 2opremio added this to the 1.18.0 milestone Jan 17, 2020
@test "SSH key is generated" {
run fluxctl identity --k8s-fwd-ns "$FLUX_NAMESPACE"
[ "$status" -eq 0 ]
[ "$output" != "" ]
Copy link
Contributor

@2opremio 2opremio Jan 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can do a bit better than this. Could you parse the output and check it's a valid public key?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we may want to do polling, since the key may not be ready right after flux is deployed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key is now validated in two ways:

  1. it is parsed by ssh-keygen to compute the fingerprint, which will fail for an invalid key
  2. the fingerprint is compared to the output of fluxctl identity -l

@2opremio
Copy link
Contributor

Addresses part of #2593

@hiddeco hiddeco force-pushed the bug/incluster-check branch from 02c2ec6 to 23dfff7 Compare January 17, 2020 18:48
@hiddeco hiddeco force-pushed the bug/incluster-check branch from 23dfff7 to 0aa284d Compare January 17, 2020 22:07
@hiddeco hiddeco force-pushed the bug/incluster-check branch from 0aa284d to e53db89 Compare January 17, 2020 22:08
@hiddeco hiddeco changed the title Fix conditional statement determining in-cluster setup Fix conditional statement determining in-cluster setup Jan 17, 2020
@hiddeco hiddeco merged commit 0aa1d7d into master Jan 17, 2020
@hiddeco hiddeco deleted the bug/incluster-check branch January 17, 2020 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants