| 329 | } |
| 330 | |
| 331 | func commandServiceAccountStore(ctx context.Context) (*config.ServiceAccountStore, error) { |
| 332 | if runtime, ok := app.FromContext(ctx); ok { |
| 333 | if runtime.ServiceAccounts != nil { |
| 334 | return runtime.ServiceAccounts, nil |
| 335 | } |
| 336 | if err := configureRuntimeLayout(runtime, config.PathKindConfig, config.PathKindData); err != nil { |
| 337 | return nil, err |
| 338 | } |
| 339 | runtime.ServiceAccounts = config.NewServiceAccountStore(runtime.Layout) |
| 340 | return runtime.ServiceAccounts, nil |
| 341 | } |
| 342 | |
| 343 | return nil, errRuntimeRequired |
| 344 | } |
| 345 | |
| 346 | func commandUserConfigBase(ctx context.Context) (string, error) { |
| 347 | runtime, ok := app.FromContext(ctx) |