- Only admin user can detach function version.
- Admin user has read access to user's function version.
Change-Id: I345a2aa17d7131984038f99cdd6e6f246bec1d24
Story: 2001829
Task: 14456
Previously, if some fields are not set during object creation in
database, they are not shown in API response, which will cause some
issues for python-qinlingclient. For those missing fields, qinling
client will make an extra API request which is not efficient.
Change-Id: If6d95b6fe11b56183cf05291daaed233ad347cb0
Other changes in order to make this patch pass CI jobs:
- Incease default runtime replicas to 5
- Decrease tempest concurrency number to 2
Change-Id: If2186013c3c49f1d99ab0ca9b623a339f01680f6
Story: 2001829
Task: 14456
This patch adds some other API for function version:
- scale_up function version workers
- scale_down function version workers
- detach function version from workers
- get all workers for function version
This patch also fixes a unit test bug that job handler should be
disabled for api tests.
Change-Id: Ibd8e195bf8fa0f878cfe0bd8f777c820f4b2f24b
Story: 2001829
Task: 14438
Allow users to specify cpu/memory_size when creating function, and
allow to update their values saved in function database.
This patch is api part of customized cpu/mem in qinling server and
is based on patch [0].
[0]: https://review.openstack.org/#/c/562507/
Story: 2001586
Task: 14366
Change-Id: I7a245f93a445a00c2722238d3f94d3a960f16af4
qinling don't use the unittest module directly, but using unittest2 instead
assertRaisesRegexp is deprecated in unittest2 by assertRaisesRegex, see:
https://hg.python.org/unittest2/rev/27d6829cd8fa#l1.213
Change-Id: I255e2c0453e76d6cb4dd2832d723b6c35241ca9d
Now, all the underlying resources(pod, service) in k8s cluster have
version number in their labels. Different versions of the same function
will have different services exposed in k8s cluster.
Change-Id: Ic0b3045404105175073844b908fa0f6c2ef2ab8a
Story: #2001829
Task: #14350
When deleting a function version:
- The version should not being used by any job
- The version should not being used by any webhook
- Function latest_version should be updated if the version in request equals
to latest_version
Story: #2001829
Task: #14349
Change-Id: I5511304e04bec8f404d7224a6489b65d6a765316
Support 2 types of queries:
- Get basic function version information
- Download package of that specific function version
The previous function downloading process is not affected.
TODO:
- Test of downloading function version package will be added in
functional test(in the subsequent patch)
Change-Id: I1bcb7c13a7b65432e1d6714d7539077ab82ee831
Story: #2001829
Task: #14335
- List function versions
- Add 'latest_version' to get function response
Story: #2001829
Task: #14330
Change-Id: I40f1848872fc7d713d87f657ec891b48c579fee4
This patch supports to create function version.
- Versioning feature is only allowed for package type function for now
- New version creation code should be wrapped in lock to avoid any
race condition
- New version number is calculated by Qinling and no need to be
provided by end users
- Version creation is not allowed if no change happened to function
package.
- Only function owner can create version.
- Maximum version number is 10 by default, we will make it configurable
as needed in future.
- All function versions will be deleted when function itself is deleted
This patch only focuses on version creation, the other version
operations and related function operations will be handled in the
following patches.
Story: #2001829
Task: #14305
Change-Id: I62bb344da237766fc11cce2ffda65945313136b1
Old function package should be removed when updating package type
function.
Change-Id: I088a669e675fd8dabec241c9f53457cddaee06b2
Story: #2001829
Task: #12586
This is the preliminary patch for function versioning support. In order
to create a new function version, we need to check if the function
package data has been changed compared with the latest version.
The package md5 is stored as part of the package file path.
Change-Id: Icf7c3999033989762b31bb629571bab6ad06b05e
Story: #2001829
Task: #12586
This is a follow-up of [1], as a release note is needed for such a
change.
[1] I532f131abbfc8ed90de398cc135e9b8248d2757a
Change-Id: I14a03e7b5df4bcb2c04f3b42818947a695ec3edb
By now, qinling connects to the Kubernetes API server insecurely.
kubectl proxy is used for testing purpose. However, in real production
deployments, it is not a good idea to let qinling connect to the
Kubernetes API server without any authentication and authorization.
This commit adds the support in qinling for it to connect to the
Kubernetes API server with X509 Client Certs for authentication [1].
An example file is also added for users to grant specific access to the
Kubernetes API for qinling using the RBAC authorization of
Kubernetes [2]. With these users can control qinling's access to the
Kubernetes API [3] and ensure qinling uses a secure connection to talk
with the Kubernetes API.
Devstack plugin also setups qinling to connect to Kubernetes API server
using TLS certificates by default. This makes the deployment with
devstack closer to a production-ready environment. For testing purpose,
user can set the QINLING_K8S_APISERVER_TLS variable to False in
devstack's local.conf.
Note: a HOTWO document will be added in a follow-up commit.
[1] https://kubernetes.io/docs/admin/authentication/#x509-client-certs
[2] https://kubernetes.io/docs/admin/authorization/rbac/
[3] https://kubernetes.io/docs/admin/accessing-the-api/
Change-Id: I532f131abbfc8ed90de398cc135e9b8248d2757a