Skip to content

Commit

Permalink
Fix cilium gateway error messages (#602)
Browse files Browse the repository at this point in the history
Fix cilium gateway error messages
  • Loading branch information
HomayoonAlimohammadi authored Aug 13, 2024
1 parent 6b92ed7 commit 0662718
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/k8s/pkg/k8sd/features/cilium/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func ApplyGateway(ctx context.Context, snap snap.Snap, gateway types.Gateway, ne
Message: fmt.Sprintf(gatewayDeployFailedMsgTmpl, err),
}, err
} else {
err = fmt.Errorf("failed to install Gateway API GatewayClass: %w", err)
err = fmt.Errorf("failed to delete Gateway API GatewayClass: %w", err)
return types.FeatureStatus{
Enabled: false,
Version: ciliumAgentImageTag,
Expand All @@ -65,14 +65,14 @@ func ApplyGateway(ctx context.Context, snap snap.Snap, gateway types.Gateway, ne
changed, err := m.Apply(ctx, chartCilium, helm.StateUpgradeOnlyOrDeleted(network.GetEnabled()), map[string]any{"gatewayAPI": map[string]any{"enabled": gateway.GetEnabled()}})
if err != nil {
if gateway.GetEnabled() {
err = fmt.Errorf("failed to apply Gateway API cilium configuration: %w", err)
err = fmt.Errorf("failed to upgrade Gateway API cilium configuration: %w", err)
return types.FeatureStatus{
Enabled: false,
Version: ciliumAgentImageTag,
Message: fmt.Sprintf(gatewayDeployFailedMsgTmpl, err),
}, err
} else {
err = fmt.Errorf("failed to apply Gateway API cilium configuration: %w", err)
err = fmt.Errorf("failed to delete Gateway API cilium configuration: %w", err)
return types.FeatureStatus{
Enabled: false,
Version: ciliumAgentImageTag,
Expand Down

0 comments on commit 0662718

Please sign in to comment.