github.com/openshift/installer@v1.4.17/pkg/asset/tls/serviceaccountkeypair.go (about) 1 package tls 2 3 import ( 4 "context" 5 6 "github.com/openshift/installer/pkg/asset" 7 ) 8 9 // ServiceAccountKeyPair is the asset that generates the service-account public/private key pair. 10 type ServiceAccountKeyPair struct { 11 KeyPair 12 } 13 14 var _ asset.WritableAsset = (*ServiceAccountKeyPair)(nil) 15 16 // Dependencies returns the dependency of the the cert/key pair, which includes 17 // the parent CA, and install config if it depends on the install config for 18 // DNS names, etc. 19 func (a *ServiceAccountKeyPair) Dependencies() []asset.Asset { 20 return []asset.Asset{} 21 } 22 23 // Generate generates the cert/key pair based on its dependencies. 24 func (a *ServiceAccountKeyPair) Generate(ctx context.Context, dependencies asset.Parents) error { 25 return a.KeyPair.Generate(ctx, "service-account") 26 } 27 28 // Name returns the human-friendly name of the asset. 29 func (a *ServiceAccountKeyPair) Name() string { 30 return "Key Pair (service-account.pub)" 31 } 32 33 // Load is a no-op because the service account keypair is not written to disk. 34 func (a *ServiceAccountKeyPair) Load(asset.FileFetcher) (bool, error) { 35 return false, nil 36 }