Skip to content

Commit 89ed457

Browse files
author
OpenShift Bot
authored
Merge pull request #12713 from JacobTanenbaum/BZ1391786v2
Merged by openshift-bot
2 parents 6daf164 + 5dbe228 commit 89ed457

12 files changed

+68
-2
lines changed

contrib/completions/bash/oc

+6
Original file line numberDiff line numberDiff line change
@@ -7595,6 +7595,8 @@ _oc_create_route_edge()
75957595
local_nonpersistent_flags+=("--template=")
75967596
flags+=("--validate")
75977597
local_nonpersistent_flags+=("--validate")
7598+
flags+=("--wildcardpolicy=")
7599+
local_nonpersistent_flags+=("--wildcardpolicy=")
75987600
flags+=("--as=")
75997601
flags+=("--certificate-authority=")
76007602
flags_with_completion+=("--certificate-authority")
@@ -7677,6 +7679,8 @@ _oc_create_route_passthrough()
76777679
local_nonpersistent_flags+=("--template=")
76787680
flags+=("--validate")
76797681
local_nonpersistent_flags+=("--validate")
7682+
flags+=("--wildcardpolicy=")
7683+
local_nonpersistent_flags+=("--wildcardpolicy=")
76807684
flags+=("--as=")
76817685
flags+=("--certificate-authority=")
76827686
flags_with_completion+=("--certificate-authority")
@@ -7777,6 +7781,8 @@ _oc_create_route_reencrypt()
77777781
local_nonpersistent_flags+=("--template=")
77787782
flags+=("--validate")
77797783
local_nonpersistent_flags+=("--validate")
7784+
flags+=("--wildcardpolicy=")
7785+
local_nonpersistent_flags+=("--wildcardpolicy=")
77807786
flags+=("--as=")
77817787
flags+=("--certificate-authority=")
77827788
flags_with_completion+=("--certificate-authority")

contrib/completions/bash/openshift

+6
Original file line numberDiff line numberDiff line change
@@ -12584,6 +12584,8 @@ _openshift_cli_create_route_edge()
1258412584
local_nonpersistent_flags+=("--template=")
1258512585
flags+=("--validate")
1258612586
local_nonpersistent_flags+=("--validate")
12587+
flags+=("--wildcardpolicy=")
12588+
local_nonpersistent_flags+=("--wildcardpolicy=")
1258712589
flags+=("--as=")
1258812590
flags+=("--azure-container-registry-config=")
1258912591
flags+=("--certificate-authority=")
@@ -12668,6 +12670,8 @@ _openshift_cli_create_route_passthrough()
1266812670
local_nonpersistent_flags+=("--template=")
1266912671
flags+=("--validate")
1267012672
local_nonpersistent_flags+=("--validate")
12673+
flags+=("--wildcardpolicy=")
12674+
local_nonpersistent_flags+=("--wildcardpolicy=")
1267112675
flags+=("--as=")
1267212676
flags+=("--azure-container-registry-config=")
1267312677
flags+=("--certificate-authority=")
@@ -12770,6 +12774,8 @@ _openshift_cli_create_route_reencrypt()
1277012774
local_nonpersistent_flags+=("--template=")
1277112775
flags+=("--validate")
1277212776
local_nonpersistent_flags+=("--validate")
12777+
flags+=("--wildcardpolicy=")
12778+
local_nonpersistent_flags+=("--wildcardpolicy=")
1277312779
flags+=("--as=")
1277412780
flags+=("--azure-container-registry-config=")
1277512781
flags+=("--certificate-authority=")

contrib/completions/zsh/oc

+6
Original file line numberDiff line numberDiff line change
@@ -7743,6 +7743,8 @@ _oc_create_route_edge()
77437743
local_nonpersistent_flags+=("--template=")
77447744
flags+=("--validate")
77457745
local_nonpersistent_flags+=("--validate")
7746+
flags+=("--wildcardpolicy=")
7747+
local_nonpersistent_flags+=("--wildcardpolicy=")
77467748
flags+=("--as=")
77477749
flags+=("--certificate-authority=")
77487750
flags_with_completion+=("--certificate-authority")
@@ -7825,6 +7827,8 @@ _oc_create_route_passthrough()
78257827
local_nonpersistent_flags+=("--template=")
78267828
flags+=("--validate")
78277829
local_nonpersistent_flags+=("--validate")
7830+
flags+=("--wildcardpolicy=")
7831+
local_nonpersistent_flags+=("--wildcardpolicy=")
78287832
flags+=("--as=")
78297833
flags+=("--certificate-authority=")
78307834
flags_with_completion+=("--certificate-authority")
@@ -7925,6 +7929,8 @@ _oc_create_route_reencrypt()
79257929
local_nonpersistent_flags+=("--template=")
79267930
flags+=("--validate")
79277931
local_nonpersistent_flags+=("--validate")
7932+
flags+=("--wildcardpolicy=")
7933+
local_nonpersistent_flags+=("--wildcardpolicy=")
79287934
flags+=("--as=")
79297935
flags+=("--certificate-authority=")
79307936
flags_with_completion+=("--certificate-authority")

contrib/completions/zsh/openshift

+6
Original file line numberDiff line numberDiff line change
@@ -12732,6 +12732,8 @@ _openshift_cli_create_route_edge()
1273212732
local_nonpersistent_flags+=("--template=")
1273312733
flags+=("--validate")
1273412734
local_nonpersistent_flags+=("--validate")
12735+
flags+=("--wildcardpolicy=")
12736+
local_nonpersistent_flags+=("--wildcardpolicy=")
1273512737
flags+=("--as=")
1273612738
flags+=("--azure-container-registry-config=")
1273712739
flags+=("--certificate-authority=")
@@ -12816,6 +12818,8 @@ _openshift_cli_create_route_passthrough()
1281612818
local_nonpersistent_flags+=("--template=")
1281712819
flags+=("--validate")
1281812820
local_nonpersistent_flags+=("--validate")
12821+
flags+=("--wildcardpolicy=")
12822+
local_nonpersistent_flags+=("--wildcardpolicy=")
1281912823
flags+=("--as=")
1282012824
flags+=("--azure-container-registry-config=")
1282112825
flags+=("--certificate-authority=")
@@ -12918,6 +12922,8 @@ _openshift_cli_create_route_reencrypt()
1291812922
local_nonpersistent_flags+=("--template=")
1291912923
flags+=("--validate")
1292012924
local_nonpersistent_flags+=("--validate")
12925+
flags+=("--wildcardpolicy=")
12926+
local_nonpersistent_flags+=("--wildcardpolicy=")
1292112927
flags+=("--as=")
1292212928
flags+=("--azure-container-registry-config=")
1292312929
flags+=("--certificate-authority=")

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

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
100100
\fB\-\-validate\fP=false
101101
If true, use a schema to validate the input before sending it
102102

103+
.PP
104+
\fB\-\-wildcardpolicy\fP=""
105+
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"
106+
103107

104108
.SH OPTIONS INHERITED FROM PARENT COMMANDS
105109
.PP

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

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
8080
\fB\-\-validate\fP=false
8181
If true, use a schema to validate the input before sending it
8282

83+
.PP
84+
\fB\-\-wildcardpolicy\fP=""
85+
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"
86+
8387

8488
.SH OPTIONS INHERITED FROM PARENT COMMANDS
8589
.PP

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

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
100100
\fB\-\-validate\fP=false
101101
If true, use a schema to validate the input before sending it
102102

103+
.PP
104+
\fB\-\-wildcardpolicy\fP=""
105+
Sets the WildcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"
106+
103107

104108
.SH OPTIONS INHERITED FROM PARENT COMMANDS
105109
.PP

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

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
100100
\fB\-\-validate\fP=false
101101
If true, use a schema to validate the input before sending it
102102

103+
.PP
104+
\fB\-\-wildcardpolicy\fP=""
105+
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"
106+
103107

104108
.SH OPTIONS INHERITED FROM PARENT COMMANDS
105109
.PP

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

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
8080
\fB\-\-validate\fP=false
8181
If true, use a schema to validate the input before sending it
8282

83+
.PP
84+
\fB\-\-wildcardpolicy\fP=""
85+
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"
86+
8387

8488
.SH OPTIONS INHERITED FROM PARENT COMMANDS
8589
.PP

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

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
100100
\fB\-\-validate\fP=false
101101
If true, use a schema to validate the input before sending it
102102

103+
.PP
104+
\fB\-\-wildcardpolicy\fP=""
105+
Sets the WildcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"
106+
103107

104108
.SH OPTIONS INHERITED FROM PARENT COMMANDS
105109
.PP

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

+18
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func NewCmdCreateEdgeRoute(fullName string, f *clientcmd.Factory, out io.Writer)
8585
cmd.MarkFlagFilename("key")
8686
cmd.Flags().String("ca-cert", "", "Path to a CA certificate file.")
8787
cmd.MarkFlagFilename("ca-cert")
88+
cmd.Flags().String("wildcardpolicy", "", "Sets the WilcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")
8889

8990
return cmd
9091
}
@@ -112,6 +113,11 @@ func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ar
112113
return err
113114
}
114115

116+
wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy")
117+
if len(wildcardpolicy) > 0 {
118+
route.Spec.WildcardPolicy = api.WildcardPolicyType(wildcardpolicy)
119+
}
120+
115121
route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
116122
route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")
117123

@@ -200,6 +206,7 @@ func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io.
200206
cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
201207
cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
202208
cmd.MarkFlagRequired("service")
209+
cmd.Flags().String("wildcardpolicy", "", "Sets the WilcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")
203210

204211
return cmd
205212
}
@@ -227,6 +234,11 @@ func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comm
227234
return err
228235
}
229236

237+
wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy")
238+
if len(wildcardpolicy) > 0 {
239+
route.Spec.WildcardPolicy = api.WildcardPolicyType(wildcardpolicy)
240+
}
241+
230242
route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
231243

232244
route.Spec.TLS = new(api.TLSConfig)
@@ -305,6 +317,7 @@ func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Wr
305317
cmd.Flags().String("dest-ca-cert", "", "Path to a CA certificate file, used for securing the connection from the router to the destination.")
306318
cmd.MarkFlagRequired("dest-ca-cert")
307319
cmd.MarkFlagFilename("dest-ca-cert")
320+
cmd.Flags().String("wildcardpolicy", "", "Sets the WildcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")
308321

309322
return cmd
310323
}
@@ -332,6 +345,11 @@ func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comman
332345
return err
333346
}
334347

348+
wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy")
349+
if len(wildcardpolicy) > 0 {
350+
route.Spec.WildcardPolicy = api.WildcardPolicyType(wildcardpolicy)
351+
}
352+
335353
route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
336354
route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")
337355

pkg/cmd/cli/describe/printer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var (
3636
imageStreamImageColumns = []string{"NAME", "DOCKER REF", "UPDATED", "IMAGENAME"}
3737
imageStreamColumns = []string{"NAME", "DOCKER REPO", "TAGS", "UPDATED"}
3838
projectColumns = []string{"NAME", "DISPLAY NAME", "STATUS"}
39-
routeColumns = []string{"NAME", "HOST/PORT", "PATH", "SERVICES", "PORT", "TERMINATION"}
39+
routeColumns = []string{"NAME", "HOST/PORT", "PATH", "SERVICES", "PORT", "TERMINATION", "WILDCARDPOLICY"}
4040
deploymentConfigColumns = []string{"NAME", "REVISION", "DESIRED", "CURRENT", "TRIGGERED BY"}
4141
templateColumns = []string{"NAME", "DESCRIPTION", "PARAMETERS", "OBJECTS"}
4242
policyColumns = []string{"NAME", "ROLES", "LAST MODIFIED"}
@@ -591,7 +591,7 @@ func printRoute(route *routeapi.Route, w io.Writer, opts kctl.PrintOptions) erro
591591
port = "<all>"
592592
}
593593

594-
if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s", name, host, route.Spec.Path, strings.Join(backendInfo, ","), port, policy); err != nil {
594+
if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s", name, host, route.Spec.Path, strings.Join(backendInfo, ","), port, policy, route.Spec.WildcardPolicy); err != nil {
595595
return err
596596
}
597597

0 commit comments

Comments
 (0)