func ConfigureNativeHA(log *logger.Logger) error {
	file := "/etc/mqm/native-ha.ini"
	templateFile := file + ".tpl"
	templateMap := map[string]string{}
	templateMap["Name"] = os.Getenv("HOSTNAME")
	templateMap["NativeHAInstance0_Name"] = os.Getenv("MQ_NATIVE_HA_INSTANCE_0_NAME")
	templateMap["NativeHAInstance1_Name"] = os.Getenv("MQ_NATIVE_HA_INSTANCE_1_NAME")
	templateMap["NativeHAInstance2_Name"] = os.Getenv("MQ_NATIVE_HA_INSTANCE_2_NAME")
	templateMap["NativeHAInstance0_ReplicationAddress"] = os.Getenv("MQ_NATIVE_HA_INSTANCE_0_REPLICATION_ADDRESS")
	templateMap["NativeHAInstance1_ReplicationAddress"] = os.Getenv("MQ_NATIVE_HA_INSTANCE_1_REPLICATION_ADDRESS")
	templateMap["NativeHAInstance2_ReplicationAddress"] = os.Getenv("MQ_NATIVE_HA_INSTANCE_2_REPLICATION_ADDRESS")
	if os.Getenv("MQ_NATIVE_HA_TLS") == "true" {
		keyLabel, _, _, err := tls.ConfigureHATLSKeystore()
		if err != nil {
			return err
		}
		templateMap["CertificateLabel"] = keyLabel
		keyRepository, ok := os.LookupEnv("MQ_NATIVE_HA_KEY_REPOSITORY")
		if !ok {
			keyRepository = "/run/runmqserver/ha/tls/key"
		}
		templateMap["KeyRepository"] = keyRepository
		cipherSpec, ok := os.LookupEnv("MQ_NATIVE_HA_CIPHERSPEC")
		if ok {
			templateMap["CipherSpec"] = cipherSpec
		}
	}
	err := mqtemplate.ProcessTemplateFile(templateFile, file, templateMap, log)
	if err != nil {
		return err
	}
	return nil
}
ConfigureNativeHA configures native high availability
package ha
import (
	"os"
	"github.com/ibm-messaging/mq-container/internal/mqtemplate"
	"github.com/ibm-messaging/mq-container/internal/tls"
	"github.com/ibm-messaging/mq-container/pkg/logger"
)