mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #95991 from serathius/datapolicy-kubeadm
Add datapolicy tags to cmd/kubeadm directory
This commit is contained in:
commit
acc3910964
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user