Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Use disable instead of disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-barry committed Dec 2, 2023
1 parent 0ea6e9f commit 281928b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions api/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/v1/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down

0 comments on commit 281928b

Please sign in to comment.