@@ -8,24 +8,41 @@ import (
88 "github.com/openshift/installer/pkg/asset/installconfig"
99)
1010
11+ // Stock is the stock of TLS assets that can be generated.
1112type Stock interface {
13+ // RootCA is the asset that generates the root-ca key/cert pair.
1214 RootCA () asset.Asset
15+ // KubeCA is the asset that generates the kube-ca key/cert pair.
1316 KubeCA () asset.Asset
17+ // EtcdCA is the asset that generates the etcd-ca key/cert pair.
1418 EtcdCA () asset.Asset
19+ // AggregatorCA is the asset that generates the aggregator-ca key/cert pair.
1520 AggregatorCA () asset.Asset
21+ // ServiceServingCA is the asset that generates the service-serving-ca key/cert pair.
1622 ServiceServingCA () asset.Asset
23+ // EtcdClientCertKey is the asset that generates the etcd client key/cert pair.
1724 EtcdClientCertKey () asset.Asset
25+ // AdminCertKey is the asset that generates the admin key/cert pair.
1826 AdminCertKey () asset.Asset
27+ // IngressCertKey is the asset that generates the ingress key/cert pair.
1928 IngressCertKey () asset.Asset
29+ // APIServerCertKey is the asset that generates the API server key/cert pair.
2030 APIServerCertKey () asset.Asset
31+ // OpenshiftAPIServerCertKey is the asset that generates the Openshift API server key/cert pair.
2132 OpenshiftAPIServerCertKey () asset.Asset
33+ // APIServerProxyCertKey is the asset that generates the API server proxy key/cert pair.
2234 APIServerProxyCertKey () asset.Asset
35+ // KubeletCertKey is the asset that generates the kubelet key/cert pair.
2336 KubeletCertKey () asset.Asset
37+ // TNCCertKey is the asset that generates the TNC key/cert pair.
2438 TNCCertKey () asset.Asset
39+ // ClusterAPIServerCertKey is the asset that generates the cluster API server key/cert pair.
2540 ClusterAPIServerCertKey () asset.Asset
41+ // ServiceAccountKeyPair is the asset that generates the service-account public/private key pair.
2642 ServiceAccountKeyPair () asset.Asset
2743}
2844
45+ // StockImpl implements the Stock interface for tls assets.
2946type StockImpl struct {
3047 rootCA asset.Asset
3148 kubeCA asset.Asset
@@ -46,6 +63,7 @@ type StockImpl struct {
4663
4764var _ Stock = (* StockImpl )(nil )
4865
66+ // EstablishStock establishes the stock of assets in the specified directory.
4967func (s * StockImpl ) EstablishStock (rootDir string , stock installconfig.Stock ) {
5068 s .rootCA = & RootCA {rootDir : rootDir }
5169 s .kubeCA = & CertKey {
@@ -233,18 +251,47 @@ func (s *StockImpl) EstablishStock(rootDir string, stock installconfig.Stock) {
233251 }
234252}
235253
236- func (s * StockImpl ) RootCA () asset.Asset { return s .rootCA }
237- func (s * StockImpl ) KubeCA () asset.Asset { return s .kubeCA }
238- func (s * StockImpl ) EtcdCA () asset.Asset { return s .etcdCA }
239- func (s * StockImpl ) AggregatorCA () asset.Asset { return s .aggregatorCA }
240- func (s * StockImpl ) ServiceServingCA () asset.Asset { return s .serviceServingCA }
241- func (s * StockImpl ) EtcdClientCertKey () asset.Asset { return s .etcdClientCertKey }
242- func (s * StockImpl ) AdminCertKey () asset.Asset { return s .adminCertKey }
243- func (s * StockImpl ) IngressCertKey () asset.Asset { return s .ingressCertKey }
244- func (s * StockImpl ) APIServerCertKey () asset.Asset { return s .apiServerCertKey }
254+ // RootCA is the asset that generates the root-ca key/cert pair.
255+ func (s * StockImpl ) RootCA () asset.Asset { return s .rootCA }
256+
257+ // KubeCA is the asset that generates the kube-ca key/cert pair.
258+ func (s * StockImpl ) KubeCA () asset.Asset { return s .kubeCA }
259+
260+ // EtcdCA is the asset that generates the etcd-ca key/cert pair.
261+ func (s * StockImpl ) EtcdCA () asset.Asset { return s .etcdCA }
262+
263+ // AggregatorCA is the asset that generates the aggregator-ca key/cert pair.
264+ func (s * StockImpl ) AggregatorCA () asset.Asset { return s .aggregatorCA }
265+
266+ // ServiceServingCA is the asset that generates the service-serving-ca key/cert pair.
267+ func (s * StockImpl ) ServiceServingCA () asset.Asset { return s .serviceServingCA }
268+
269+ // EtcdClientCertKey is the asset that generates the etcd client key/cert pair.
270+ func (s * StockImpl ) EtcdClientCertKey () asset.Asset { return s .etcdClientCertKey }
271+
272+ // AdminCertKey is the asset that generates the admin key/cert pair.
273+ func (s * StockImpl ) AdminCertKey () asset.Asset { return s .adminCertKey }
274+
275+ // IngressCertKey is the asset that generates the ingress key/cert pair.
276+ func (s * StockImpl ) IngressCertKey () asset.Asset { return s .ingressCertKey }
277+
278+ // APIServerCertKey is the asset that generates the API server key/cert pair.
279+ func (s * StockImpl ) APIServerCertKey () asset.Asset { return s .apiServerCertKey }
280+
281+ // OpenshiftAPIServerCertKey is the asset that generates the Openshift API server key/cert pair.
245282func (s * StockImpl ) OpenshiftAPIServerCertKey () asset.Asset { return s .openshiftAPIServerCertKey }
246- func (s * StockImpl ) APIServerProxyCertKey () asset.Asset { return s .apiServerProxyCertKey }
247- func (s * StockImpl ) KubeletCertKey () asset.Asset { return s .kubeletCertKey }
248- func (s * StockImpl ) TNCCertKey () asset.Asset { return s .tncCertKey }
249- func (s * StockImpl ) ClusterAPIServerCertKey () asset.Asset { return s .clusterAPIServerCertKey }
250- func (s * StockImpl ) ServiceAccountKeyPair () asset.Asset { return s .serviceAccountKeyPair }
283+
284+ // APIServerProxyCertKey is the asset that generates the API server proxy key/cert pair.
285+ func (s * StockImpl ) APIServerProxyCertKey () asset.Asset { return s .apiServerProxyCertKey }
286+
287+ // KubeletCertKey is the asset that generates the kubelet key/cert pair.
288+ func (s * StockImpl ) KubeletCertKey () asset.Asset { return s .kubeletCertKey }
289+
290+ // TNCCertKey is the asset that generates the TNC key/cert pair.
291+ func (s * StockImpl ) TNCCertKey () asset.Asset { return s .tncCertKey }
292+
293+ // ClusterAPIServerCertKey is the asset that generates the cluster API server key/cert pair.
294+ func (s * StockImpl ) ClusterAPIServerCertKey () asset.Asset { return s .clusterAPIServerCertKey }
295+
296+ // ServiceAccountKeyPair is the asset that generates the service-account public/private key pair.
297+ func (s * StockImpl ) ServiceAccountKeyPair () asset.Asset { return s .serviceAccountKeyPair }
0 commit comments