Skip to content

Commit

Permalink
safety for controller name
Browse files Browse the repository at this point in the history
Signed-off-by: qicz <qiczzhu@gmail.com>
  • Loading branch information
qicz committed Apr 9, 2024
1 parent 1ff7300 commit f583340
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/cmd/egctl/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap
},
Spec: typedSpec.(gwapiv1.GatewayClassSpec),
}
// fill controller name by default controller name when gatewayclass controller name empty.
if gatewayClass.Spec.ControllerName == "" {
gatewayClass.Spec.ControllerName = egv1a1.GatewayControllerName
}
resources.GatewayClass = gatewayClass
case gatewayapi.KindGateway:
typedSpec := spec.Interface()
Expand Down

0 comments on commit f583340

Please sign in to comment.