diff --git a/api/v1/config.go b/api/v1/config.go index b26e0a3..0fc743b 100644 --- a/api/v1/config.go +++ b/api/v1/config.go @@ -18,7 +18,7 @@ type EgressType string const ( EgressType_UNDEFINED EgressType = "undefined" - EgressType_DISABLED EgressType = "disabled" + EgressType_DISABLE EgressType = "disable" EgressType_SERVICE EgressType = "service" EgressType_INJECT EgressType = "inject" ) @@ -51,8 +51,8 @@ func (c *Config) Init(pod *corev1.Pod) error { configMapName := "" switch v := namespace.Labels[NAMESPACE_EGRESS_LABEL]; EgressType(v) { - case EgressType_DISABLED: - c.EgressType = EgressType_DISABLED + case EgressType_DISABLE: + c.EgressType = EgressType_DISABLE return nil case EgressType_SERVICE: c.EgressType = EgressType_SERVICE @@ -69,8 +69,8 @@ func (c *Config) Init(pod *corev1.Pod) error { // order matters as pods override namespaces switch v := pod.Labels[POD_EGRESS_LABEL]; EgressType(v) { - case EgressType_DISABLED: - c.EgressType = EgressType_DISABLED + case EgressType_DISABLE: + c.EgressType = EgressType_DISABLE return nil case EgressType_SERVICE: c.EgressType = EgressType_SERVICE diff --git a/api/v1/webhook.go b/api/v1/webhook.go index 82f1200..9ffab4d 100644 --- a/api/v1/webhook.go +++ b/api/v1/webhook.go @@ -100,7 +100,7 @@ func (w *Webhook) Handle(ctx context.Context, req admission.Request) admission.R return admission.Errored(http.StatusInternalServerError, err) } } - case EgressType_DISABLED: + case EgressType_DISABLE: webhookLog.Info("Qpoint egress disabled, ignoring...") default: webhookLog.Info("Qpoint egress not enabled, ignoring...")