Skip to content

Commit

Permalink
added include flags to include security context
Browse files Browse the repository at this point in the history
  • Loading branch information
EraKin575 committed Jun 22, 2024
1 parent 930caf4 commit 4f43783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kn/commands/service/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func exportLatestService(latestSvc *servingv1.Service, withRoutes bool, withSecu
if withRoutes {
exportedSvc.Spec.RouteSpec = latestSvc.Spec.RouteSpec
}
if withSecurityContext {
if !withSecurityContext {
exportedSvc.Spec.Template.Spec.SecurityContext = nil
for i := range exportedSvc.Spec.Template.Spec.Containers {
exportedSvc.Spec.Template.Spec.Containers[i].SecurityContext = nil
Expand Down

0 comments on commit 4f43783

Please sign in to comment.