Skip to content

Commit

Permalink
Merge branch 'dev' into devinwon/cred_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Devinwong authored Nov 19, 2024
2 parents 989c8fb + ee19195 commit 27648b4
Show file tree
Hide file tree
Showing 16 changed files with 711 additions and 497 deletions.
12 changes: 6 additions & 6 deletions aks-node-controller/parser/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,21 @@ func getCustomCACertsStatus(customCACerts []string) bool {
return len(customCACerts) > 0
}

func getEnableTLSBootstrap(bootstrapConfig *aksnodeconfigv1.TlsBootstrappingConfig) bool {
func getEnableTLSBootstrap(bootstrapConfig *aksnodeconfigv1.BootstrappingConfig) bool {
return bootstrapConfig.GetTlsBootstrappingToken() != ""
}

func getEnableSecureTLSBootstrap(bootstrapConfig *aksnodeconfigv1.TlsBootstrappingConfig) bool {
func getEnableSecureTLSBootstrap(bootstrapConfig *aksnodeconfigv1.BootstrappingConfig) bool {
// TODO: Change logic to default to false once Secure TLS Bootstrapping is complete
return bootstrapConfig.GetEnableSecureTlsBootstrapping()
return bootstrapConfig.GetBootstrappingAuthMethod() == aksnodeconfigv1.BootstrappingAuthMethod_BOOTSTRAPPING_AUTH_METHOD_SECURE_TLS_BOOTSTRAPPING
}

func getTLSBootstrapToken(bootstrapConfig *aksnodeconfigv1.TlsBootstrappingConfig) string {
func getTLSBootstrapToken(bootstrapConfig *aksnodeconfigv1.BootstrappingConfig) string {
return bootstrapConfig.GetTlsBootstrappingToken()
}

func getCustomSecureTLSBootstrapAADServerAppID(bootstrapConfig *aksnodeconfigv1.TlsBootstrappingConfig) string {
return bootstrapConfig.GetCustomSecureTlsBootstrappingAppserverAppid()
func getCustomSecureTLSBootstrapAADServerAppID(bootstrapConfig *aksnodeconfigv1.BootstrappingConfig) string {
return bootstrapConfig.GetCustomAadResource()
}

func getIsKrustlet(wr aksnodeconfigv1.WorkloadRuntime) bool {
Expand Down
8 changes: 4 additions & 4 deletions aks-node-controller/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ func getCSEEnv(config *aksnodeconfigv1.Configuration) map[string]string {
"HTTPS_PROXY_URLS": config.GetHttpProxyConfig().GetHttpsProxy(),
"NO_PROXY_URLS": getStringifiedStringArray(config.GetHttpProxyConfig().GetNoProxyEntries(), ","),
"PROXY_VARS": getProxyVariables(config.GetHttpProxyConfig()),
"ENABLE_TLS_BOOTSTRAPPING": fmt.Sprintf("%v", getEnableTLSBootstrap(config.GetTlsBootstrappingConfig())),
"ENABLE_SECURE_TLS_BOOTSTRAPPING": fmt.Sprintf("%v", getEnableSecureTLSBootstrap(config.GetTlsBootstrappingConfig())),
"CUSTOM_SECURE_TLS_BOOTSTRAP_AAD_SERVER_APP_ID": getCustomSecureTLSBootstrapAADServerAppID(config.GetTlsBootstrappingConfig()),
"ENABLE_TLS_BOOTSTRAPPING": fmt.Sprintf("%v", getEnableTLSBootstrap(config.GetBootstrappingConfig())),
"ENABLE_SECURE_TLS_BOOTSTRAPPING": fmt.Sprintf("%v", getEnableSecureTLSBootstrap(config.GetBootstrappingConfig())),
"CUSTOM_SECURE_TLS_BOOTSTRAP_AAD_SERVER_APP_ID": getCustomSecureTLSBootstrapAADServerAppID(config.GetBootstrappingConfig()),
"DHCPV6_SERVICE_FILEPATH": getDHCPV6ServiceFilepath(),
"DHCPV6_CONFIG_FILEPATH": getDHCPV6ConfigFilepath(),
"THP_ENABLED": config.GetCustomLinuxOsConfig().GetTransparentHugepageSupport(),
Expand All @@ -149,7 +149,7 @@ func getCSEEnv(config *aksnodeconfigv1.Configuration) map[string]string {
"MESSAGE_OF_THE_DAY": config.GetMessageOfTheDay(),
"HAS_KUBELET_DISK_TYPE": fmt.Sprintf("%v", getHasKubeletDiskType(config.GetKubeletConfig())),
"NEEDS_CGROUPV2": fmt.Sprintf("%v", config.GetNeedsCgroupv2()),
"TLS_BOOTSTRAP_TOKEN": getTLSBootstrapToken(config.GetTlsBootstrappingConfig()),
"TLS_BOOTSTRAP_TOKEN": getTLSBootstrapToken(config.GetBootstrappingConfig()),
"KUBELET_FLAGS": createSortedKeyValuePairs(config.GetKubeletConfig().GetKubeletFlags(), " "),
"NETWORK_POLICY": getStringFromNetworkPolicyType(config.GetNetworkConfig().GetNetworkPolicy()),
"KUBELET_NODE_LABELS": createSortedKeyValuePairs(config.GetKubeletConfig().GetKubeletNodeLabels(), ","),
Expand Down
4 changes: 2 additions & 2 deletions aks-node-controller/parser/testdata/test_aksnodeconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "v0",
"tls_bootstrapping_config": {
"enable_secure_tls_bootstrapping": false
"bootstrapping_config": {
"bootstrapping_auth_method": "BOOTSTRAPPING_AUTH_METHOD_BOOTSTRAP_TOKEN"
},
"cluster_config": {
"vm_type": "VM_TYPE_VMSS",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "v0",
"tls_bootstrapping_config": {
"enable_secure_tls_bootstrapping": false
"bootstrapping_config": {
"bootstrapping_auth_method": "BOOTSTRAPPING_AUTH_METHOD_BOOTSTRAP_TOKEN"
},
"cluster_config": {
"vm_type": 2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "v0",
"tls_bootstrapping_config": {
"enable_secure_tls_bootstrapping": false
"bootstrapping_config": {
"bootstrapping_auth_method": "BOOTSTRAPPING_AUTH_METHOD_BOOTSTRAP_TOKEN"
},
"cluster_config": {
"vm_type": 2,
Expand Down
Loading

0 comments on commit 27648b4

Please sign in to comment.