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

Update post-renderer to verify secret data for existing secrets #331

Merged
merged 3 commits into from
Feb 26, 2022

Conversation

YrrepNoj
Copy link
Contributor

Checking that a secret exists isn't enough, we want to make sure the contents of the secret are what we expect it to be.

Fixes #330

@YrrepNoj YrrepNoj self-assigned this Feb 16, 2022
@@ -40,6 +40,10 @@ var destroyCmd = &cobra.Command{

// If Zarf didn't deploy the cluster, only delete the ZarfNamespace
k8s.DeleteZarfNamespace()

// Delete the zarf-registry secret in the default namespace
defaultSecret, _ := k8s.GetSecret("default", "zarf-registry")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeff-mccoy Should we just delete all the zarf-registry secrets across all the namespaces? I can't think of a good reason to keep the secrets if we're doing a destroy since the registry the creds are for won't exist anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry I must have skipped it since it was out of date and didnt have latest commit tested

Copy link
Contributor

Choose a reason for hiding this comment

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

this is fine for now, we need to discuss this vs the "created-by" label tracking for deletion of resources at some point.

@YrrepNoj
Copy link
Contributor Author

/test all

@YrrepNoj
Copy link
Contributor Author

@jeff-mccoy Friendly ping to ask you to give this a review when you have some time :)

@@ -40,6 +40,10 @@ var destroyCmd = &cobra.Command{

// If Zarf didn't deploy the cluster, only delete the ZarfNamespace
k8s.DeleteZarfNamespace()

// Delete the zarf-registry secret in the default namespace
defaultSecret, _ := k8s.GetSecret("default", "zarf-registry")
Copy link
Contributor

Choose a reason for hiding this comment

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

this is fine for now, we need to discuss this vs the "created-by" label tracking for deletion of resources at some point.

@jeff-mccoy
Copy link
Contributor

/test all

@jeff-mccoy
Copy link
Contributor

/test all

@jeff-mccoy jeff-mccoy merged commit 80c5c17 into master Feb 26, 2022
@jeff-mccoy jeff-mccoy deleted the 330-updating-zarf-secrets branch February 26, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zarf doesn't update zarf-registry secrets
2 participants