You will need to use environment variable “MSSQL_PID” for the product key. You will find all the environment variables In this link. https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017
How are you planning to persist the db state, after cg restart or failover. The only possibility way now is fileshare, hope that is what you are planning to do?