Merge pull request #95991 from serathius/datapolicy-kubeadm

Add datapolicy tags to cmd/kubeadm directory
This commit is contained in:
Kubernetes Prow Robot 2020-11-03 22:50:17 -08:00 committed by GitHub
commit acc3910964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -124,7 +124,7 @@ var (
// supported by this api will be exposed as a flag.
type joinOptions struct {
cfgPath string
token string
token string `datapolicy:"token"`
controlPlane bool
ignorePreflightErrors []string
externalcfg *kubeadmapiv1beta2.JoinConfiguration

View File

@ -39,7 +39,7 @@ func NewBootstrapTokenOptions() *BootstrapTokenOptions {
// TODO: In the future, we might want to group the flags in a better way than adding them all individually like this
type BootstrapTokenOptions struct {
*kubeadmapiv1beta2.BootstrapToken
TokenStr string
TokenStr string `datapolicy:"token"`
}
// AddTokenFlag adds the --token flag to the given flagset

View File

@ -53,7 +53,7 @@ type clientCertAuth struct {
// tokenAuth struct holds info required to use a token to provide authentication info in a kubeconfig object
type tokenAuth struct {
Token string
Token string `datapolicy:"token"`
}
// kubeConfigSpec struct holds info required to build a KubeConfig object
@ -61,8 +61,8 @@ type kubeConfigSpec struct {
CACert *x509.Certificate
APIServer string
ClientName string
TokenAuth *tokenAuth
ClientCertAuth *clientCertAuth
TokenAuth *tokenAuth `datapolicy:"token"`
ClientCertAuth *clientCertAuth `datapolicy:"security-key"`
}
// CreateJoinControlPlaneKubeConfigFiles will create and write to disk the kubeconfig files required by kubeadm

View File

@ -29,7 +29,7 @@ import (
"k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient"
)
type tlsKeyPair struct {
type tlsKeyPairPath struct {
name string
cert string
key string
@ -310,8 +310,8 @@ func createOpaqueSecretFromFile(secretName, file string) (*v1.Secret, error) {
}, nil
}
func getTLSKeyPairs() []*tlsKeyPair {
return []*tlsKeyPair{
func getTLSKeyPairs() []*tlsKeyPairPath {
return []*tlsKeyPairPath{
{
name: kubeadmconstants.CACertAndKeyBaseName,
cert: kubeadmconstants.CACertName,