Commit Graph
55 Commits
Author SHA1 Message Date
Ta-Ching ChenandGitHub f8e98f9f14 Always embed URL provided by user in the archive (#1413)
To keep archive creation implementation simple and prevent any
confusion, we decided to remove `--keepurl` flag and embed URL
directly without downloading the file from it . In this way, we can
ensure consistent behavior in either package creation or spec file
creation. Also, it increases the portability of spec file.
2019-11-18 10:05:49 +08:00
Ta-Ching ChenandGitHub b97a3c4b0a Fix wrong command and flag usage description (#1412) 2019-11-17 02:39:31 +08:00
Ta-Ching ChenandGitHub cf2d35291e Drop unreleased features (record & replay) (#1406)
1. The records are stored in redis which is not migratable to another cluster for the testing purposes.
2. Some of the requests fields are not recorded.
3. People should consider using https://github.com/buger/goreplay which is an existing mature and well-tested solution for testing purposes.
2019-11-13 15:10:32 +08:00
Ta-Ching ChenandGitHub 1cda7e051b Build error formatting on fission spec apply --wait (#1403)
The character `\n` in buildlog stores in package status
are escaped and so when we have to replace them with
actual line breaker.
2019-11-12 21:00:55 +08:00
Ta-Ching ChenandGitHub d0276f1d52 Fix fn test failed to query logs from log database (#1401)
When `fn test` failed to retrieve logs from the function
pod, it turns to query logs from the log database. However,
the logdb type flag is not set to `fn test`, hence the logdb
type is empty (even without default value) and cause `fn logs`
returns an error due to unable to find the corresponding log
database type.

This PR adds logdb type flag to `fn test` to resolve the problem.
2019-11-12 03:05:22 +08:00
Ta-Ching ChenandGitHub 7640f1199d Prettify console output message (#1396) 2019-11-10 16:42:34 +08:00
Ta-Ching ChenandGitHub 7b6e4318d4 Reorder command flag and add missing flags (#1394) 2019-11-10 14:58:29 +08:00
Ta-Ching ChenandGitHub d443eb1c96 Fix CLI exits with status 0 when error occurs (#1393) 2019-11-10 02:43:22 +08:00
Ta-Ching ChenandGitHub d3d8ff6c1b Replace flag text with const (#1391) 2019-11-09 22:13:35 +08:00
Ta-Ching ChenandGitHub 1888cd2ac7 Migrate from urfave/cli to cobra (#1385) 2019-11-08 21:22:00 +08:00
Ta-Ching ChenandGitHub 93d4b88d84 Make CLI functions return error instead of fatal out (#1379)
Before this PR, CLI functions fatal out when encountering error
instead of returning it. Such behavior makes it hard to reuse 
the functions nor writing unit tests. This PR aims to make functions 
return errors instead of error out.
2019-11-05 16:50:13 +08:00
Ta-Ching ChenandGitHub b0d27ee5d2 Refactor record command (#1378) 2019-11-05 10:30:16 +08:00
Ta-Ching ChenandGitHub c33f1e112e Fix reverse proxy shows 404 not found when Istio enabled (#1377)
Istio sidecar proxy blocks all requests sent through the reverse proxy
to the target service if the request.Host is not properly set to the
internal target service host. This PR sets the target service hosts
before establishing the proxy for the client in order to pass the
Istio sidecar proxy check.
2019-11-04 21:59:40 +08:00
Ta-Ching ChenandGitHub f288f0f258 Refactor time trigger command (#1376) 2019-11-04 18:26:21 +08:00
Ta-Ching ChenandGitHub d1ed089c3e Refactor mqtrigger command (#1375) 2019-11-04 07:40:18 +08:00
Vivek SinghandTa-Ching Chen e1a64dd0c1 PodSpec support in environment builder (#1369) 2019-11-03 23:05:02 +08:00
Ta-Ching ChenandGitHub 3b6749dce9 Refactor function command (#1372) 2019-11-03 13:31:47 +08:00
Ta-Ching ChenandGitHub ef0a2fa340 Refactor canary config command (#1370) 2019-11-01 15:36:40 +08:00
Ta-Ching ChenandGitHub 2b616ec4e2 Fix utility function uses the wrong flag text to get value (#1368)
The utility function GetMetadata uses wrong flag text to get the resource namespace and could cause the wrong results returned from the API server. This PR changes the function signature that allows users to pass in the flag text in order to get the correct value.
2019-11-01 00:59:50 +08:00
Ta-Ching ChenandGitHub fe02bb1678 Refactor HTTP trigger command (#1367) 2019-10-31 23:40:37 +08:00
Ta-Ching ChenandGitHub e22cdee5f5 Refactor kubewatch command (#1365) 2019-10-31 10:48:27 +08:00
Vivek SinghandTa-Ching Chen 698d591788 Provide secrets and configmaps while updating the functions (#1358) 2019-10-31 00:19:06 +08:00
Ta-Ching ChenandGitHub 3b11ca87f1 Fix accidentally removed timestamp when listing package (#1364) 2019-10-30 23:47:00 +08:00
Ta-Ching ChenandGitHub d20dc9aa64 Allow using URL as archive source when creating functions (#1360)
In the case of large files, it takes a long time for the user to download
the source from the URL and upload it to StorgeSvc through CLI.

This PR allows a user to use URL as the function source when creating a function
and provides a new flag "--keeparchiveurl" to let the user to decided
whether the CLI should download the file first or store the file URL in the
archive directly. If "--keeparchiveurl" is true, then no checksum will be
generated, it's the user's responsibility to ensure the file won't be changed.
2019-10-28 22:37:13 +08:00
Ta-Ching ChenandGitHub 52b5cb0902 Remove UID from CLI output (#1361) 2019-10-28 19:34:02 +08:00
Ta-Ching ChenandGitHub fed30e1b24 Refactor plugin & version subcommands (#1359) 2019-10-22 17:57:56 +08:00
Ta-Ching ChenandGitHub e42f81a7a1 Refactor package CLI command (#1345) 2019-10-13 01:30:20 +08:00
MengZeLeeandTa-Ching Chen c1a3bdd895 Add package filter feature (#1341) 2019-10-05 01:47:17 +08:00
Vivek SinghandTa-Ching Chen 96ae708163 package will now be listed, sorted by lastupdatedtime (#1334) 2019-10-01 15:30:51 +08:00
Ta-Ching ChenandGitHub 81ae6f38fc Fix spec doesn't update status of failed package when applying spec files (#1332)
Previously, the spec doesn't update the package status if nothing
in the spec file changed. Due to this, the failed package will
always stay in the failed state.

This PR adds a check to see whether a package is in the failed state.
If yes, then changes the state to pending for builder manager to rebuild it.
2019-09-28 04:35:57 +08:00
Ta-Ching ChenandGitHub 7fbb4098a4 Fix empty host value when list http triggers (#1328) 2019-09-28 00:28:14 +08:00
Ta-Ching ChenandGitHub f8af8b91f5 List/Delete HTTP triggers by function (#1327)
Previously, a user has to delete HTTP triggers point to
the same function one by one. This PR adds new flag --function
to list & delete commands. So that user can delete or list all
triggers with the same function. However, this feature is not
working for triggers with canary deployment setup.
2019-09-27 17:21:11 +08:00
Ta-Ching ChenandGitHub b5341edec0 Add Ingress TLS support (#1326)
This PR aims to add the Ingress TLS support by specifying the
TLS secret when creating/updating the HTTP trigger.

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/*"
    --ingresstls "foobartls"
2019-09-27 00:49:23 +08:00
Ta-Ching ChenandGitHub 49d60b19f3 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/*"
2019-09-26 16:54:16 +08:00
Ta-Ching ChenandGitHub 5d2d65f05c Fix failed to update specialization timeout (#1315) 2019-09-16 13:21:25 +08:00
Ta-Ching ChenandGitHub 6d3d277cb9 Fix potential nil pointer problem when using multierror pkg (#1311) 2019-09-16 11:03:23 +08:00
parauliyaandTa-Ching Chen 678a2c7ad8 Configurable function level timeout (#1284) 2019-09-10 23:28:08 +08:00
Ta-Ching ChenandGitHub 78026ac573 Add specialization timeout default value to CLI (#1305) 2019-09-10 17:24:35 +08:00
Ta-Ching ChenandGitHub 0d872020e3 Refactor support dump CLI (#1301) 2019-09-04 14:42:47 +08:00
moluzhangandTa-Ching Chen 62016b2f83 Support reverse query function for query log (#1298) 2019-09-02 18:02:07 +08:00
Vivek SinghandTa-Ching Chen cd36047660 Support for providing multiple CMs and secrets in fn create/update (#1282) 2019-08-30 17:13:24 +08:00
Ta-Ching ChenandGitHub c49377569e Refactor environment CLI command (#1265) 2019-08-27 15:43:59 +08:00
Ta-Ching ChenandGitHub b9997b2ece Add swagger (OpenAPI 2.0) support (#1245)
* Add swagger (OpenAPI 2.0) support
* Gererate swagger_doc before building bundle image
2019-08-21 15:49:41 +08:00
Suraj BanakarandTa-Ching Chen 80910562b3 Make NewDeployment specialization timeout configurable (#1260)
* Add specializationtimeout flag to function create/update
* Set specialization timeout of 120 seconds if not present
* Add default newdeploy timeout for rest of the test cases
* Comment out specialization timeout in validations for compatibility
* Add warning if specializationtimeout is lower than default value
2019-08-16 23:15:17 +08:00
Ta-Ching ChenandGitHub 7bbcaf2174 Allow to set deployment config uid during initialization (#1249) 2019-08-01 22:53:04 +08:00
Ta-Ching ChenandGitHub 74ad096158 Fix wrongly replace spec api version (#1254) 2019-07-29 13:49:05 +08:00
David SheldonandTa-Ching Chen be84f9ec93 Revert change of product name in README (#1250) 2019-07-26 19:37:55 +08:00
David SheldonandTa-Ching Chen 3bffd27c74 Fix typo where "spec" is spelt "sepc" in some dump directories. (#1239) 2019-07-16 09:47:07 +08:00
Ta-Ching ChenandGitHub 9e7dd5aa27 Fix nil pointer when CLI unable to get server version (#1223) 2019-07-07 09:55:00 +08:00
VishalandTa-Ching Chen 36e544b537 Configmaps/secrets in function exist check (#1214) 2019-07-01 18:09:07 +08:00