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
POC: Load and pass credentials to plugins #3299
Closed
zubron
wants to merge
9
commits into
vmware-tanzu:main
from
zubron:load-and-pass-credentials-to-plugin
Closed
POC: Load and pass credentials to plugins #3299
zubron
wants to merge
9
commits into
vmware-tanzu:main
from
zubron:load-and-pass-credentials-to-plugin
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change adds support to run the Velero process in Tilt using [Delve](https://github.com/go-delve/delve). This does not include support for debugging the Velero process in the restic pods, just in the Velero deployment. For an optimal debugging experience, this change also introduces a new flag (`DEBUG`) to the `hack/build.sh` script to enable a "debug" build of the Velero binary. This flag, if enabled, will build the binary without optimisations and inlining. Disabling optimisations and inlining is recommended by Delve. Two configuration options have been added to the Tilt settings. The first, `enable_debug`, is to control whether debugging should be enabled. If enabled, the process will be started by Delve, and the Delve server port (2345) will be forwarded to the local machine. The second option, `debug_continue_on_start`, is to control whether the process should "continue" when started by Delve or should be paused. By default, debugging is disabled, and if in debug mode, the process will continue. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
Starlark prefers spaces around `=` in keyword arguments: https://docs.bazel.build/versions/master/skylark/bzl-style.html#keyword-arguments Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
Signed-off-by: Carlisia <carlisia@vmware.com>
Signed-off-by: Carlisia <carlisia@vmware.com>
Signed-off-by: Carlisia <carlisia@vmware.com>
Update NewObjectBackupStore to take a CredentialsGetter which can be used to get the credentials for a BackupStorageLocation if it has been configured with a Credential. If the BSL has a credential, use that SecretKeySelector to fetch the secret, write the contents to a temp file and then pass that file through to the plugin via the config map. This relies on the plugin being able to use the config field. This does not yet handle VolumeSnapshotLocations or ResticRepositories. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
nrb
reviewed
Jan 19, 2021
GetAsFile(selector *corev1.SecretKeySelector) (string, error) | ||
} | ||
|
||
type credentialsGetter struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per community discussion, this may need a field for the name of the env variable that it will land in.
Closing this as it was a draft and the work is now is being added in different PRs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update NewObjectBackupStore to take a CredentialsGetter which can be
used to get the credentials for a BackupStorageLocation if it has been
configured with a Credential. If the BSL has a credential, use that
SecretKeySelector to fetch the secret, write the contents to a temp file
and then pass that file through to the plugin via the config map. This
relies on the plugin being able to use the config field.
This does not yet handle VolumeSnapshotLocations or ResticRepositories.
This branch is based on some existing PRs (#3189, #3190). Only the latest
commit in this branch is new: 8e96722