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

update gitSecret feature to handle git.Export #2429

Merged
merged 2 commits into from
Sep 26, 2019
Merged

update gitSecret feature to handle git.Export #2429

merged 2 commits into from
Sep 26, 2019

Conversation

arsiesys
Copy link
Contributor

@arsiesys arsiesys commented Sep 4, 2019

Since the following commit, we do not call the Clone function anymore. As a result, the git-secret feature do not work anymore, the apply is done before doing the reveal of the secrets.

6eabb29#diff-ba9f11ecc3497d9993b933fdc2bd61e5,

I am giving the gitSecret option value to the daemon object.. I did not find a better way to do it :(.

@stefanprodan
Copy link
Member

@arsiesys the tests are failing:

git/export_test.go:32:28: not enough arguments in call to repo.Export

@squaremo
Copy link
Member

squaremo commented Sep 5, 2019

I am giving the gitSecret option value to the daemon object.. I did not find a better way to do it :(.

Could it be an option for the Repo, and called as part of repo.go#workingClone, perhaps? If that's possible, I would much prefer it to passing a boolean argument through.

@arsiesys
Copy link
Contributor Author

arsiesys commented Sep 5, 2019

I am giving the gitSecret option value to the daemon object.. I did not find a better way to do it :(.

Could it be an option for the Repo, and called as part of repo.go#workingClone, perhaps? If that's possible, I would much prefer it to passing a boolean argument through.

Hello! I just made some tests and sadly, I need to do the git secret reveal after the checkout, it can't be done right after the workingClone cause this one is going to be with master (before the checkout).

I i think, I could eventually, move the call of the secretReveal to the Export function after the checkout call instead of doing it inside the checkout function.

Since the commit 6eabb29, we do not call the Clone function anymore.
This PR offer a way to handle the new method.
@hiddeco hiddeco changed the base branch from release/1.14.x to master September 26, 2019 14:14
This prevents the boolean indicating that unsealing should happen
has to be passed around, as the only moment we actually perform an
unseal is during synchronization, or one-off read/write operations.
@hiddeco
Copy link
Member

hiddeco commented Sep 26, 2019

@squaremo I performed some CPR on the PR (:recycle: :fish:) and gave Export a dedicated SecretUnseal method so the boolean doesn't have to be passed around everywhere. PTAL.

Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

This is a neatly cut Gordian knot ⚔️

@hiddeco hiddeco merged commit f1f8f0f into fluxcd:master Sep 26, 2019
@hiddeco hiddeco added this to the 1.15.0 milestone Oct 1, 2019
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.

4 participants