diff --git a/cluster/kube/client_ingress.go b/cluster/kube/client_ingress.go index e4adecac..94c12d70 100644 --- a/cluster/kube/client_ingress.go +++ b/cluster/kube/client_ingress.go @@ -6,6 +6,7 @@ import ( "math" "strconv" "strings" + "os" netv1 "k8s.io/api/networking/v1" kubeErrors "k8s.io/apimachinery/pkg/api/errors" @@ -22,10 +23,18 @@ import ( ctypes "github.com/akash-network/provider/cluster/types/v1beta3" ) -const ( - akashIngressClassName = "akash-ingress-class" +var ( + akashIngressClassName = getIngressClassName() ) +func getIngressClassName() string { + val := os.Getenv("AKASH_INGRESS_CLASS_NAME") + if val != "" { + return val + } + return "akash-ingress-class" +} + func kubeNginxIngressAnnotations(directive ctypes.ConnectHostnameToDeploymentDirective) map[string]string { // For kubernetes/ingress-nginx // https://github.com/kubernetes/ingress-nginx