mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +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.
|
// supported by this api will be exposed as a flag.
|
||||||
type joinOptions struct {
|
type joinOptions struct {
|
||||||
cfgPath string
|
cfgPath string
|
||||||
token string
|
token string `datapolicy:"token"`
|
||||||
controlPlane bool
|
controlPlane bool
|
||||||
ignorePreflightErrors []string
|
ignorePreflightErrors []string
|
||||||
externalcfg *kubeadmapiv1beta2.JoinConfiguration
|
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
|
// 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 {
|
type BootstrapTokenOptions struct {
|
||||||
*kubeadmapiv1beta2.BootstrapToken
|
*kubeadmapiv1beta2.BootstrapToken
|
||||||
TokenStr string
|
TokenStr string `datapolicy:"token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddTokenFlag adds the --token flag to the given flagset
|
// 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
|
// tokenAuth struct holds info required to use a token to provide authentication info in a kubeconfig object
|
||||||
type tokenAuth struct {
|
type tokenAuth struct {
|
||||||
Token string
|
Token string `datapolicy:"token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// kubeConfigSpec struct holds info required to build a KubeConfig object
|
// kubeConfigSpec struct holds info required to build a KubeConfig object
|
||||||
@ -61,8 +61,8 @@ type kubeConfigSpec struct {
|
|||||||
CACert *x509.Certificate
|
CACert *x509.Certificate
|
||||||
APIServer string
|
APIServer string
|
||||||
ClientName string
|
ClientName string
|
||||||
TokenAuth *tokenAuth
|
TokenAuth *tokenAuth `datapolicy:"token"`
|
||||||
ClientCertAuth *clientCertAuth
|
ClientCertAuth *clientCertAuth `datapolicy:"security-key"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateJoinControlPlaneKubeConfigFiles will create and write to disk the kubeconfig files required by kubeadm
|
// 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"
|
"k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
type tlsKeyPair struct {
|
type tlsKeyPairPath struct {
|
||||||
name string
|
name string
|
||||||
cert string
|
cert string
|
||||||
key string
|
key string
|
||||||
@ -310,8 +310,8 @@ func createOpaqueSecretFromFile(secretName, file string) (*v1.Secret, error) {
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTLSKeyPairs() []*tlsKeyPair {
|
func getTLSKeyPairs() []*tlsKeyPairPath {
|
||||||
return []*tlsKeyPair{
|
return []*tlsKeyPairPath{
|
||||||
{
|
{
|
||||||
name: kubeadmconstants.CACertAndKeyBaseName,
|
name: kubeadmconstants.CACertAndKeyBaseName,
|
||||||
cert: kubeadmconstants.CACertName,
|
cert: kubeadmconstants.CACertName,
|
||||||
|
Loading…
Reference in New Issue
Block a user