Add Ingress host, path and annotations support (#1325)

For each ingress controller, the format of ingress host,
path and annotations are different. To support different
kinds of controller, this PR adds new ingress config field
to http trigger spec. A user can set annotations, host and
path based on the type of underlying ingress controller
with CLI.

Command example:

fission route create --name foo \
    --url /foo/{bar} --function foofn --createingress \
    --ingressannotation "nginx.ingress.kubernetes.io/ssl-redirect=false" \
    --ingressannotation "nginx.ingress.kubernetes.io/use-regex=true" \
    --ingressrule "*=/foo/*"
This commit is contained in:
Ta-Ching Chen
2019-09-26 16:54:16 +08:00
committed by GitHub
parent 82a7acf408
commit 49d60b19f3
14 changed files with 1421 additions and 138 deletions
+5
View File
@@ -441,6 +441,11 @@ func (fr *FissionResources) Validate(c *cli.Context) error {
if err != nil {
result = multierror.Append(result, err)
}
if len(t.Spec.Host) > 0 {
log.Warn(fmt.Sprintf("Host in HTTPTrigger spec.Host is now marked as deprecated, see 'help' for details"))
}
result = multierror.Append(result, t.Validate())
}
for _, t := range fr.KubernetesWatchTriggers {