From b5df8d3aa64444ca0e63a1a92dd30c3ebeaf6143 Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Tue, 5 Nov 2024 14:52:20 +1300 Subject: [PATCH] add unspecified options --- .../v1/bootstrappingconfig.pb.go | 111 ++++++++++-------- .../v1/bootstrappingconfig.proto | 16 ++- 2 files changed, 70 insertions(+), 57 deletions(-) diff --git a/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.pb.go b/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.pb.go index b644761a897..8955b41f601 100644 --- a/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.pb.go +++ b/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.pb.go @@ -23,36 +23,39 @@ const ( type BootstrappingConfig_BootstrappingAuthMethod int32 const ( + BootstrappingConfig_BAM_UNSPECIFIED BootstrappingConfig_BootstrappingAuthMethod = 0 // This is the default K8s bootstrap authentication method - a time limited bootstrap token. It's stored as a secret // with a particular type in the API server. // //nolint:gosec // this is a const string to use in switch statements, not hardcoded credentials - BootstrappingConfig_BOOTSTRAP_TOKEN BootstrappingConfig_BootstrappingAuthMethod = 0 + BootstrappingConfig_BOOTSTRAP_TOKEN BootstrappingConfig_BootstrappingAuthMethod = 1 // Secure TLS bootstrapping is a process where the node can use signed metadata from the Azure IMDS service to authenticate // against the api server - BootstrappingConfig_SECURE_TLS_BOOTSTRAPPING BootstrappingConfig_BootstrappingAuthMethod = 1 + BootstrappingConfig_SECURE_TLS_BOOTSTRAPPING BootstrappingConfig_BootstrappingAuthMethod = 2 // Nodes running outside Azure can use the Azure Arc MSI to authenticate to an API server. This only works when the cluster is // // using AAD authentication. - BootstrappingConfig_ARC_MSI BootstrappingConfig_BootstrappingAuthMethod = 2 + BootstrappingConfig_ARC_MSI BootstrappingConfig_BootstrappingAuthMethod = 3 // Nodes running inside Azure can use the Azure Arc MSI to authenticate to an API server. This only works when the cluster is // using AAD authentication. - BootstrappingConfig_AZURE_MSI BootstrappingConfig_BootstrappingAuthMethod = 3 + BootstrappingConfig_AZURE_MSI BootstrappingConfig_BootstrappingAuthMethod = 4 ) // Enum value maps for BootstrappingConfig_BootstrappingAuthMethod. var ( BootstrappingConfig_BootstrappingAuthMethod_name = map[int32]string{ - 0: "BOOTSTRAP_TOKEN", - 1: "SECURE_TLS_BOOTSTRAPPING", - 2: "ARC_MSI", - 3: "AZURE_MSI", + 0: "BAM_UNSPECIFIED", + 1: "BOOTSTRAP_TOKEN", + 2: "SECURE_TLS_BOOTSTRAPPING", + 3: "ARC_MSI", + 4: "AZURE_MSI", } BootstrappingConfig_BootstrappingAuthMethod_value = map[string]int32{ - "BOOTSTRAP_TOKEN": 0, - "SECURE_TLS_BOOTSTRAPPING": 1, - "ARC_MSI": 2, - "AZURE_MSI": 3, + "BAM_UNSPECIFIED": 0, + "BOOTSTRAP_TOKEN": 1, + "SECURE_TLS_BOOTSTRAPPING": 2, + "ARC_MSI": 3, + "AZURE_MSI": 4, } ) @@ -86,22 +89,25 @@ func (BootstrappingConfig_BootstrappingAuthMethod) EnumDescriptor() ([]byte, []i type BootstrappingConfig_ClusterJoinMethod int32 const ( + BootstrappingConfig_CJM_UNSPECIFIED BootstrappingConfig_ClusterJoinMethod = 0 // The default behaviour is for the node to make a certificate signing request (CSR) and then // use that CSR for ongoing communication. - BootstrappingConfig_GENERATE_CSR BootstrappingConfig_ClusterJoinMethod = 0 + BootstrappingConfig_GENERATE_CSR BootstrappingConfig_ClusterJoinMethod = 1 // In some cases, the node will use the bootstrapping auth to register itself as a node and for ongoing communications. - BootstrappingConfig_USE_BOOTSTRAPPING_AUTH BootstrappingConfig_ClusterJoinMethod = 1 + BootstrappingConfig_USE_BOOTSTRAPPING_AUTH BootstrappingConfig_ClusterJoinMethod = 2 ) // Enum value maps for BootstrappingConfig_ClusterJoinMethod. var ( BootstrappingConfig_ClusterJoinMethod_name = map[int32]string{ - 0: "GENERATE_CSR", - 1: "USE_BOOTSTRAPPING_AUTH", + 0: "CJM_UNSPECIFIED", + 1: "GENERATE_CSR", + 2: "USE_BOOTSTRAPPING_AUTH", } BootstrappingConfig_ClusterJoinMethod_value = map[string]int32{ - "GENERATE_CSR": 0, - "USE_BOOTSTRAPPING_AUTH": 1, + "CJM_UNSPECIFIED": 0, + "GENERATE_CSR": 1, + "USE_BOOTSTRAPPING_AUTH": 2, } ) @@ -183,14 +189,14 @@ func (x *BootstrappingConfig) GetBootstrappingAuthMethod() BootstrappingConfig_B if x != nil { return x.BootstrappingAuthMethod } - return BootstrappingConfig_BOOTSTRAP_TOKEN + return BootstrappingConfig_BAM_UNSPECIFIED } func (x *BootstrappingConfig) GetClusterJoinMethod() BootstrappingConfig_ClusterJoinMethod { if x != nil { return x.ClusterJoinMethod } - return BootstrappingConfig_GENERATE_CSR + return BootstrappingConfig_CJM_UNSPECIFIED } func (x *BootstrappingConfig) GetTlsBootstrappingToken() string { @@ -221,7 +227,7 @@ var file_pkg_proto_aksnodeconfig_v1_bootstrappingconfig_proto_rawDesc = []byte{ 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x61, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x22, 0x9b, 0x05, 0x0a, 0x13, 0x42, 0x6f, 0x6f, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x22, 0xc5, 0x05, 0x0a, 0x13, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x79, 0x0a, 0x19, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, @@ -247,37 +253,40 @@ var file_pkg_proto_aksnodeconfig_v1_bootstrappingconfig_proto_rawDesc = []byte{ 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x14, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x61, 0x61, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x41, 0x61, - 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x68, 0x0a, 0x17, + 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x7d, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, - 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4f, 0x4f, 0x54, 0x53, - 0x54, 0x52, 0x41, 0x50, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, - 0x53, 0x45, 0x43, 0x55, 0x52, 0x45, 0x5f, 0x54, 0x4c, 0x53, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, - 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x52, - 0x43, 0x5f, 0x4d, 0x53, 0x49, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x5a, 0x55, 0x52, 0x45, - 0x5f, 0x4d, 0x53, 0x49, 0x10, 0x03, 0x22, 0x41, 0x0a, 0x11, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x0c, 0x47, - 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x53, 0x52, 0x10, 0x00, 0x12, 0x1a, 0x0a, - 0x16, 0x55, 0x53, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, - 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x74, 0x6c, - 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x61, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x17, 0x0a, - 0x15, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x61, 0x61, 0x64, 0x5f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x42, 0xd9, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x61, - 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x42, - 0x18, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x2f, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x42, 0x61, 0x6b, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x61, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x41, 0x6b, 0x73, 0x6e, - 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x41, - 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1c, 0x41, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x41, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x41, 0x4d, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, + 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x43, 0x55, 0x52, 0x45, 0x5f, 0x54, 0x4c, 0x53, 0x5f, + 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x41, 0x52, 0x43, 0x5f, 0x4d, 0x53, 0x49, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, + 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x4d, 0x53, 0x49, 0x10, 0x04, 0x22, 0x56, 0x0a, 0x11, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4a, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, + 0x45, 0x5f, 0x43, 0x53, 0x52, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x53, 0x45, 0x5f, 0x42, + 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x54, + 0x48, 0x10, 0x02, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, + 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x61, 0x61, 0x64, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x5f, 0x61, 0x61, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x42, 0xd9, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x18, 0x42, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x6b, + 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x6b, 0x73, + 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x6b, + 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x41, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x41, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x41, 0x6b, 0x73, 0x6e, 0x6f, 0x64, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x41, 0x6b, 0x73, 0x6e, + 0x6f, 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x41, 0x6b, 0x73, 0x6e, 0x6f, + 0x64, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.proto b/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.proto index 0327c072676..d1dc2e9e4da 100644 --- a/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.proto +++ b/pkg/proto/aksnodeconfig/v1/bootstrappingconfig.proto @@ -18,26 +18,30 @@ message BootstrappingConfig { optional string custom_aad_client_id = 5; enum BootstrappingAuthMethod { + BAM_UNSPECIFIED = 0; + // This is the default K8s bootstrap authentication method - a time limited bootstrap token. It's stored as a secret // with a particular type in the API server. //nolint:gosec // this is a const string to use in switch statements, not hardcoded credentials - BOOTSTRAP_TOKEN = 0; + BOOTSTRAP_TOKEN = 1; // Secure TLS bootstrapping is a process where the node can use signed metadata from the Azure IMDS service to authenticate // against the api server - SECURE_TLS_BOOTSTRAPPING = 1; + SECURE_TLS_BOOTSTRAPPING = 2; // Nodes running outside Azure can use the Azure Arc MSI to authenticate to an API server. This only works when the cluster is // using AAD authentication. - ARC_MSI = 2; + ARC_MSI = 3; // Nodes running inside Azure can use the Azure Arc MSI to authenticate to an API server. This only works when the cluster is // using AAD authentication. - AZURE_MSI = 3; + AZURE_MSI = 4; } enum ClusterJoinMethod { + CJM_UNSPECIFIED = 0; + // The default behaviour is for the node to make a certificate signing request (CSR) and then // use that CSR for ongoing communication. - GENERATE_CSR = 0; + GENERATE_CSR = 1; // In some cases, the node will use the bootstrapping auth to register itself as a node and for ongoing communications. - USE_BOOTSTRAPPING_AUTH = 1; + USE_BOOTSTRAPPING_AUTH = 2; } } \ No newline at end of file