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

Updated sealed secret app to new style #257

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

nitishkumar71
Copy link
Contributor

Description

  1. Updated the code in sealed_secret_app.go

Motivation and Context

How Has This Been Tested?

  1. Install sealed secret into cluster arakade install sealed-secrets
  2. Install client-side tool into /usr/local/bin/
GOOS=$(go env GOOS)
GOARCH=$(go env GOARCH)
wget https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.12.4/kubeseal-$GOOS-$GOARCH
sudo install -m 755 kubeseal-$GOOS-$GOARCH /usr/local/bin/kubeseal
  1. Create a sealed secret file
kubectl create secret generic secret-name --dry-run --from-literal=foo=bar -o [json|yaml] | \
 kubeseal \
 --controller-name=sealed-secrets \
 --controller-namespace=default \
 --format [json|yaml] > mysealedsecret.[json|yaml]
  1. Apply the sealed secret
kubectl create -f mysealedsecret.[json|yaml]
  1. Decrypt secret
kubectl get secret secret-name -o [json|yaml]

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have tested this on arm, or have added code to prevent deployment

@derek
Copy link

derek bot commented Oct 31, 2020

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide.
Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

@derek derek bot added the no-dco label Oct 31, 2020
@derek derek bot removed the no-dco label Oct 31, 2020
Copy link
Contributor

@Waterdrips Waterdrips left a comment

Choose a reason for hiding this comment

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

LGTM

@alexellis
Copy link
Owner

Sorry this will require a rebase due to #258 being merged.

@Waterdrips what does @nitishkumar71 need to do to rebase this?

@Waterdrips
Copy link
Contributor

yep, delete the section at the top with kubeconfig and change it to

kubeConfigPath, _ := command.Flags().GetString("kubeconfig")

Then call options.WithKubeconfigPath(kubeConfigPath) into the installer options section.

This will fix the issue with not using a supplied kubeconfig flag

@nitishkumar71 nitishkumar71 force-pushed the sealed_secrets_new_app branch 2 times, most recently from 18e5d82 to 6777f93 Compare October 31, 2020 18:18
@nitishkumar71
Copy link
Contributor Author

yep, delete the section at the top with kubeconfig and change it to

kubeConfigPath, _ := command.Flags().GetString("kubeconfig")

Then call options.WithKubeconfigPath(kubeConfigPath) into the installer options section.

This will fix the issue with not using a supplied kubeconfig flag

@Waterdrips I have made the changes. please review the changes.

@@ -36,7 +38,6 @@ func MakeInstallSealedSecrets() *cobra.Command {
if err := config.SetKubeconfig(kubeConfigPath); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

we dont need to set it here, its gets set in the chart app

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for mention. I have made the changes. @Waterdrips

Copy link
Contributor

@Waterdrips Waterdrips left a comment

Choose a reason for hiding this comment

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

see comment on last review, no need to set kubeconfig -its done in the chart app

@alexellis
Copy link
Owner

@Waterdrips ready for another review.

WithNamespace(namespace).
WithHelmPath(path.Join(userPath, ".helm")).
WithHelmRepo("stable/sealed-secrets").
WithHelmURL("https://charts.helm.sh/stable").
Copy link
Owner

Choose a reason for hiding this comment

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

Bitnami should have a new home for the chart. Can you look around and see if you can find it? The "stable helm repo" is going to be deprecated shortly.

@alexellis
Copy link
Owner

FYI https://twitter.com/HelmPack/status/1322224008822202368?s=20

I've also checked the Bitnami Charts repo (nothing there yet) and asked on their #sealed-secrets channel on K8s Slack.

@alexellis
Copy link
Owner

I found out here -> bitnami-labs/sealed-secrets#389

Thanks @mkmik

@nitishkumar71
Copy link
Contributor Author

I found out here -> bitnami-labs/sealed-secrets#389

Thanks @mkmik

@alexellis Thanks for pointing it out. I think, we should wait for the new chart repo of sealed secrets. What do you suggest?

@alexellis
Copy link
Owner

No, just go ahead. We already have this pointing at the stable repo.

Signed-off-by: Nitishkumar Singh <[email protected]>

updated code based on alexellis#258

Signed-off-by: Nitishkumar Singh <[email protected]>

removed additional line

Signed-off-by: Nitishkumar Singh <[email protected]>

removed unwanted line

Signed-off-by: Nitishkumar Singh <[email protected]>

removed unwanted code

Signed-off-by: Nitishkumar Singh <[email protected]>

corrected repo path

Signed-off-by: Nitishkumar Singh <[email protected]>
Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Approved

@alexellis alexellis merged commit 0f447b5 into alexellis:master Nov 19, 2020
@alexellis
Copy link
Owner

In retrospect and due to #274 I think we do need to switch over to the new helm repo, but it should be a one line change if you can work on that today @nitishkumar71 ?

My understanding is that the charts have now moved to https://charts.helm.sh/stable as read-only.

@nitishkumar71 nitishkumar71 deleted the sealed_secrets_new_app branch March 16, 2024 13:44
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.

3 participants