in pkg/common/utils/resource/pod.go [560:603]
func buildKerberosEnv(info *v1.KerberosInfo, config map[string]interface{}, componentType v1.ComponentType) []corev1.EnvVar {
if info == nil {
return nil
}
var krb5ConfPath string
switch componentType {
case v1.Component_FE:
krb5ConfPath = kerberos.GetKrb5ConfFromJavaOpts(config)
case v1.Component_BE, v1.Component_CN:
// be config krb5.conf file must set 'kerberos_krb5_conf_path' in be.conf
// https://doris.apache.org/docs/3.0/lakehouse/datalake-analytics/hive?_highlight=kerberos_krb5_conf_path#connect-to-kerberos-enabled-hive
if value, exists := config["kerberos_krb5_conf_path"]; exists {
krb5ConfPath = value.(string)
} else {
krb5ConfPath = kerberos.KRB5_DEFAULT_CONFIG
}
}
keytabFinalUsedPath := keytab_default_mount_path
if info.KeytabPath != "" {
keytabFinalUsedPath = info.KeytabPath
}
return []corev1.EnvVar{
{
Name: KRB5_MOUNT_PATH,
Value: krb5_default_mount_path,
},
{
Name: KRB5_CONFIG,
Value: krb5ConfPath,
},
{
Name: KEYTAB_MOUNT_PATH,
Value: keytab_default_mount_path,
},
{
Name: KEYTAB_FINAL_USED_PATH,
Value: keytabFinalUsedPath,
},
}
}