This commit is contained in:
nathan wagner
2023-09-06 20:20:46 +00:00
parent 44dd1f1f5e
commit 4d142d8b45
8 changed files with 65 additions and 26 deletions

View File

@@ -56,6 +56,7 @@ type InitConfig struct {
BuildkitFlags []string
Files map[string][]byte
DriverOpts map[string]string
SecurityOpts map[string]string
Auth Auth
Platforms []specs.Platform
// ContextPathHash can be used for determining pods in the driver instance
@@ -104,7 +105,7 @@ func GetFactory(name string, instanceRequired bool) (Factory, error) {
return nil, errors.Errorf("failed to find driver %q", name)
}
func GetDriver(ctx context.Context, name string, f Factory, endpointAddr string, api dockerclient.APIClient, auth Auth, kcc KubeClientConfig, flags []string, files map[string][]byte, do map[string]string, platforms []specs.Platform, contextPathHash string) (*DriverHandle, error) {
func GetDriver(ctx context.Context, name string, f Factory, endpointAddr string, api dockerclient.APIClient, auth Auth, kcc KubeClientConfig, flags []string, files map[string][]byte, do map[string]string, so map[string]string, platforms []specs.Platform, contextPathHash string) (*DriverHandle, error) {
ic := InitConfig{
EndpointAddr: endpointAddr,
DockerAPI: api,
@@ -112,6 +113,7 @@ func GetDriver(ctx context.Context, name string, f Factory, endpointAddr string,
Name: name,
BuildkitFlags: flags,
DriverOpts: do,
SecurityOpts: so,
Auth: auth,
Platforms: platforms,
ContextPathHash: contextPathHash,