-
Notifications
You must be signed in to change notification settings - Fork 100
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
Creating an optional interface to get secret id references for driver with secrets. #7306
Changes from all commits
0daf9df
ae89843
8bd692f
f4da23b
9de3a3e
c30681a
8e2dfe8
f279d06
e8b51e6
cd7ab45
db4b7e4
e609071
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ const ( | |
) | ||
|
||
// Driver is an interface to implement recipe deployment and recipe resources deletion. | ||
// | ||
//go:generate mockgen -destination=./mock_driver.go -package=driver -self_package github.com/radius-project/radius/pkg/recipes/driver github.com/radius-project/radius/pkg/recipes/driver Driver | ||
type Driver interface { | ||
// Execute fetches the recipe contents and deploys the recipe and returns deployed resources, secrets and values. | ||
Execute(ctx context.Context, opts ExecuteOptions) (*recipes.RecipeOutput, error) | ||
|
@@ -42,6 +44,18 @@ type Driver interface { | |
GetRecipeMetadata(ctx context.Context, opts BaseOptions) (map[string]any, error) | ||
} | ||
|
||
// DriverWithSecrets is an optional interface and used when the driver needs to load secrets for recipe deployment. | ||
// | ||
//go:generate mockgen -destination=./mock_driver_with_secrets.go -package=driver -self_package github.com/radius-project/radius/pkg/recipes/driver github.com/radius-project/radius/pkg/recipes/driver DriverWithSecrets | ||
type DriverWithSecrets interface { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Please add comment |
||
// Driver is an interface to implement recipe deployment and recipe resources deletion. | ||
Driver | ||
|
||
// FindSecretIDs gets the secret store resource ID references associated with git private terraform repository source. | ||
// In the future it will be extended to get secret references for provider secrets. | ||
FindSecretIDs(ctx context.Context, config recipes.Configuration, definition recipes.EnvironmentDefinition) (string, error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this return What would happen in the future if a driver needed to read multiple secrets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. currently we are keeping it to return module secret. But in the future when we have provider secrets etc, return type will be map because we may need to specify secret kind then ex: module secret or provider secret. It will be discussed in detail during the design for provider secrets.
kachawla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// BaseOptions is the base options for the driver operations. | ||
type BaseOptions struct { | ||
// Configuration is the configuration for the recipe. | ||
|
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.
nit: Please add comment.