Skip to content

Commit 2c1513f

Browse files
author
OpenShift Bot
authored
Merge pull request #12725 from JacobTanenbaum/BZ1403155
Merged by openshift-bot
2 parents c773aad + daa215c commit 2c1513f

File tree

9 files changed

+44
-0
lines changed

9 files changed

+44
-0
lines changed

contrib/completions/bash/oc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7651,6 +7651,8 @@ _oc_create_route_passthrough()
76517651
local_nonpersistent_flags+=("--dry-run")
76527652
flags+=("--hostname=")
76537653
local_nonpersistent_flags+=("--hostname=")
7654+
flags+=("--insecure-policy=")
7655+
local_nonpersistent_flags+=("--insecure-policy=")
76547656
flags+=("--no-headers")
76557657
local_nonpersistent_flags+=("--no-headers")
76567658
flags+=("--output=")
@@ -7747,6 +7749,8 @@ _oc_create_route_reencrypt()
77477749
local_nonpersistent_flags+=("--dry-run")
77487750
flags+=("--hostname=")
77497751
local_nonpersistent_flags+=("--hostname=")
7752+
flags+=("--insecure-policy=")
7753+
local_nonpersistent_flags+=("--insecure-policy=")
77507754
flags+=("--key=")
77517755
flags_with_completion+=("--key")
77527756
flags_completion+=("_filedir")

contrib/completions/bash/openshift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12642,6 +12642,8 @@ _openshift_cli_create_route_passthrough()
1264212642
local_nonpersistent_flags+=("--dry-run")
1264312643
flags+=("--hostname=")
1264412644
local_nonpersistent_flags+=("--hostname=")
12645+
flags+=("--insecure-policy=")
12646+
local_nonpersistent_flags+=("--insecure-policy=")
1264512647
flags+=("--no-headers")
1264612648
local_nonpersistent_flags+=("--no-headers")
1264712649
flags+=("--output=")
@@ -12740,6 +12742,8 @@ _openshift_cli_create_route_reencrypt()
1274012742
local_nonpersistent_flags+=("--dry-run")
1274112743
flags+=("--hostname=")
1274212744
local_nonpersistent_flags+=("--hostname=")
12745+
flags+=("--insecure-policy=")
12746+
local_nonpersistent_flags+=("--insecure-policy=")
1274312747
flags+=("--key=")
1274412748
flags_with_completion+=("--key")
1274512749
flags_completion+=("_filedir")

contrib/completions/zsh/oc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7799,6 +7799,8 @@ _oc_create_route_passthrough()
77997799
local_nonpersistent_flags+=("--dry-run")
78007800
flags+=("--hostname=")
78017801
local_nonpersistent_flags+=("--hostname=")
7802+
flags+=("--insecure-policy=")
7803+
local_nonpersistent_flags+=("--insecure-policy=")
78027804
flags+=("--no-headers")
78037805
local_nonpersistent_flags+=("--no-headers")
78047806
flags+=("--output=")
@@ -7895,6 +7897,8 @@ _oc_create_route_reencrypt()
78957897
local_nonpersistent_flags+=("--dry-run")
78967898
flags+=("--hostname=")
78977899
local_nonpersistent_flags+=("--hostname=")
7900+
flags+=("--insecure-policy=")
7901+
local_nonpersistent_flags+=("--insecure-policy=")
78987902
flags+=("--key=")
78997903
flags_with_completion+=("--key")
79007904
flags_completion+=("_filedir")

contrib/completions/zsh/openshift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12790,6 +12790,8 @@ _openshift_cli_create_route_passthrough()
1279012790
local_nonpersistent_flags+=("--dry-run")
1279112791
flags+=("--hostname=")
1279212792
local_nonpersistent_flags+=("--hostname=")
12793+
flags+=("--insecure-policy=")
12794+
local_nonpersistent_flags+=("--insecure-policy=")
1279312795
flags+=("--no-headers")
1279412796
local_nonpersistent_flags+=("--no-headers")
1279512797
flags+=("--output=")
@@ -12888,6 +12890,8 @@ _openshift_cli_create_route_reencrypt()
1288812890
local_nonpersistent_flags+=("--dry-run")
1288912891
flags+=("--hostname=")
1289012892
local_nonpersistent_flags+=("--hostname=")
12893+
flags+=("--insecure-policy=")
12894+
local_nonpersistent_flags+=("--insecure-policy=")
1289112895
flags+=("--key=")
1289212896
flags_with_completion+=("--key")
1289312897
flags_completion+=("_filedir")

docs/man/man1/oc-create-route-passthrough.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
3232
\fB\-\-hostname\fP=""
3333
Set a hostname for the new route
3434

35+
.PP
36+
\fB\-\-insecure\-policy\fP=""
37+
Set an insecure policy for the new route
38+
3539
.PP
3640
\fB\-\-no\-headers\fP=false
3741
When using the default or custom\-column output format, don't print headers.

docs/man/man1/oc-create-route-reencrypt.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
4444
\fB\-\-hostname\fP=""
4545
Set a hostname for the new route
4646

47+
.PP
48+
\fB\-\-insecure\-policy\fP=""
49+
Set an insecure policy for the new route
50+
4751
.PP
4852
\fB\-\-key\fP=""
4953
Path to a key file.

docs/man/man1/openshift-cli-create-route-passthrough.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
3232
\fB\-\-hostname\fP=""
3333
Set a hostname for the new route
3434

35+
.PP
36+
\fB\-\-insecure\-policy\fP=""
37+
Set an insecure policy for the new route
38+
3539
.PP
3640
\fB\-\-no\-headers\fP=false
3741
When using the default or custom\-column output format, don't print headers.

docs/man/man1/openshift-cli-create-route-reencrypt.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
4444
\fB\-\-hostname\fP=""
4545
Set a hostname for the new route
4646

47+
.PP
48+
\fB\-\-insecure\-policy\fP=""
49+
Set an insecure policy for the new route
50+
4751
.PP
4852
\fB\-\-key\fP=""
4953
Path to a key file.

pkg/cmd/cli/cmd/create/route.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io.
204204
kcmdutil.AddDryRunFlag(cmd)
205205
cmd.Flags().String("hostname", "", "Set a hostname for the new route")
206206
cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
207+
cmd.Flags().String("insecure-policy", "", "Set an insecure policy for the new route")
207208
cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
208209
cmd.MarkFlagRequired("service")
209210
cmd.Flags().String("wildcardpolicy", "", "Sets the WilcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")
@@ -244,6 +245,11 @@ func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comm
244245
route.Spec.TLS = new(api.TLSConfig)
245246
route.Spec.TLS.Termination = api.TLSTerminationPassthrough
246247

248+
insecurePolicy := kcmdutil.GetFlagString(cmd, "insecure-policy")
249+
if len(insecurePolicy) > 0 {
250+
route.Spec.TLS.InsecureEdgeTerminationPolicy = api.InsecureEdgeTerminationPolicyType(insecurePolicy)
251+
}
252+
247253
dryRun := kcmdutil.GetFlagBool(cmd, "dry-run")
248254
actualRoute := route
249255

@@ -305,6 +311,7 @@ func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Wr
305311
kcmdutil.AddDryRunFlag(cmd)
306312
cmd.Flags().String("hostname", "", "Set a hostname for the new route")
307313
cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
314+
cmd.Flags().String("insecure-policy", "", "Set an insecure policy for the new route")
308315
cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
309316
cmd.MarkFlagRequired("service")
310317
cmd.Flags().String("path", "", "Path that the router watches to route traffic to the service.")
@@ -377,6 +384,11 @@ func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comman
377384
}
378385
route.Spec.TLS.DestinationCACertificate = string(destCACert)
379386

387+
insecurePolicy := kcmdutil.GetFlagString(cmd, "insecure-policy")
388+
if len(insecurePolicy) > 0 {
389+
route.Spec.TLS.InsecureEdgeTerminationPolicy = api.InsecureEdgeTerminationPolicyType(insecurePolicy)
390+
}
391+
380392
dryRun := kcmdutil.GetFlagBool(cmd, "dry-run")
381393
actualRoute := route
382394

0 commit comments

Comments
 (0)