sigs.k8s.io/cluster-api@v1.7.1/util/secret/consts.go (about) 1 /* 2 Copyright 2019 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package secret 18 19 const ( 20 // KubeconfigDataName is the key used to store a Kubeconfig in the secret's data field. 21 KubeconfigDataName = "value" 22 23 // TLSKeyDataName is the key used to store a TLS private key in the secret's data field. 24 TLSKeyDataName = "tls.key" 25 26 // TLSCrtDataName is the key used to store a TLS certificate in the secret's data field. 27 TLSCrtDataName = "tls.crt" 28 ) 29 30 // Purpose is the name to append to the secret generated for a cluster. 31 type Purpose string 32 33 const ( 34 // Kubeconfig is the secret name suffix storing the Cluster Kubeconfig. 35 Kubeconfig = Purpose("kubeconfig") 36 37 // ClusterCA is the secret name suffix for APIServer CA. 38 ClusterCA = Purpose("ca") 39 40 // EtcdCA is the secret name suffix for the Etcd CA. 41 EtcdCA = Purpose("etcd") 42 43 // ServiceAccount is the secret name suffix for the Service Account keys. 44 ServiceAccount = Purpose("sa") 45 46 // FrontProxyCA is the secret name suffix for Front Proxy CA. 47 FrontProxyCA = Purpose("proxy") 48 49 // APIServerEtcdClient is the secret name of user-supplied secret containing the apiserver-etcd-client key/cert. 50 APIServerEtcdClient = Purpose("apiserver-etcd-client") 51 ) 52 53 var ( 54 // allSecretPurposes defines a lists with all the secret suffix used by Cluster API. 55 allSecretPurposes = []Purpose{Kubeconfig, ClusterCA, EtcdCA, ServiceAccount, FrontProxyCA, APIServerEtcdClient} 56 )