Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bda974a72c | ||
|
|
dbb2b49b55 | ||
|
|
e770c619e5 | ||
|
|
0d8d07d474 | ||
|
|
dd07c68201 | ||
|
|
e9804a5b76 | ||
|
|
85c384c64a | ||
|
|
fed5fd4c5e | ||
|
|
eec35b285e | ||
|
|
e2f1f778f3 | ||
|
|
7b87d7c52c | ||
|
|
c88fe59c71 | ||
|
|
9eac1512fb | ||
|
|
8f8afaf139 | ||
|
|
e651433727 | ||
|
|
8ac7db46e0 | ||
|
|
1e8148c051 | ||
|
|
520cc0e130 | ||
|
|
2338fbb06f | ||
|
|
3687602508 | ||
|
|
49ec161c5e | ||
|
|
4923708836 | ||
|
|
11f9ef1045 | ||
|
|
bb3e6d6907 | ||
|
|
574fb55fcf | ||
|
|
b96ca0735d | ||
|
|
c421e655c5 | ||
|
|
66d4669f36 | ||
|
|
953f63c7bd | ||
|
|
fca1123ee5 | ||
|
|
5eaf11b8aa | ||
|
|
0274ceb312 | ||
|
|
38f96c7e46 | ||
|
|
7b3cc8fdf0 | ||
|
|
c184e7be65 | ||
|
|
bfbb80efcf | ||
|
|
01bdc5bf89 | ||
|
|
711d7c2c41 | ||
|
|
2b4e53e926 | ||
|
|
9401c1ee85 | ||
|
|
5c704f053b | ||
|
|
eb1f971d52 | ||
|
|
83bc5508ee |
@@ -5,6 +5,7 @@ ignore:
|
|||||||
- "examples"
|
- "examples"
|
||||||
- "test"
|
- "test"
|
||||||
- "tools"
|
- "tools"
|
||||||
|
- "pkg/apis/genclient"
|
||||||
coverage:
|
coverage:
|
||||||
status:
|
status:
|
||||||
project:
|
project:
|
||||||
|
|||||||
+52
-19
@@ -1,24 +1,57 @@
|
|||||||
# 1.7.0-rc.2
|
# 1.7.1
|
||||||
[Documentation](https://docs.fission.io/)
|
[Documentation](https://docs.fission.io/)
|
||||||
## Downloads for 1.7.0-rc.2
|
## Downloads for 1.7.1
|
||||||
|
|
||||||
|
|
||||||
filename | sha256 hash
|
filename | sha256 hash
|
||||||
-------- | -----------
|
-------- | -----------
|
||||||
[fission-all-1.7.0-rc.2-openshift.yaml](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-all-1.7.0-rc.2-openshift.yaml) | `67c0ffcb0e156b87237cd3a712a1435f09365701f4c516d5e9a83cb3f1c73041`
|
[fission-core-1.7.1-openshift.yaml](https://github.com/fission/fission/releases/download/1.7.1/fission-core-1.7.1-openshift.yaml) | `95ab2841786f734bf958ed94ff49f7c94dd2eb869a84c1de82fba1c111884a2e`
|
||||||
[fission-core-1.7.0-rc.2.yaml](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-core-1.7.0-rc.2.yaml) | `79e620b73b6a6b9f3f0290aa5b8b6daf7f77e938e34e839fc8b84cee00351b49`
|
[fission-core-1.7.1.yaml](https://github.com/fission/fission/releases/download/1.7.1/fission-core-1.7.1.yaml) | `b329ea2ef925efd01f5d4daa74fe3114bf2e5f1789ab50c1c5b1645c290cbc10`
|
||||||
[fission-core-1.7.0-rc.2-openshift.yaml](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-core-1.7.0-rc.2-openshift.yaml) | `a180331a308500cc6bc936b6c6f262bef69e6d75d5d0a1a54e5912845822ff51`
|
[fission-all-1.7.1-minikube.yaml](https://github.com/fission/fission/releases/download/1.7.1/fission-all-1.7.1-minikube.yaml) | `fca2c8d79367196ca88ddf349d3e11ec198b7def76c26b0a3df8b231b041a6a3`
|
||||||
[fission-all-1.7.0-rc.2-minikube.yaml](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-all-1.7.0-rc.2-minikube.yaml) | `7c43a8acc3125e4a25444cedda15e045c90d911689cb18042ce7c4a0f7b6cc73`
|
[fission-all-1.7.1.yaml](https://github.com/fission/fission/releases/download/1.7.1/fission-all-1.7.1.yaml) | `c03c8a7ccb4d24e8ed4aba8af825024e38cae6e24468541c96e6bc11886a4a93`
|
||||||
[fission-core-1.7.0-rc.2-minikube.yaml](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-core-1.7.0-rc.2-minikube.yaml) | `9c052808104ae833e7d2ed23403f2c84a595f525ef7b9e53dee6b70a810cf032`
|
[fission-all-1.7.1-openshift.yaml](https://github.com/fission/fission/releases/download/1.7.1/fission-all-1.7.1-openshift.yaml) | `061e76092303480e6434af1ba5c61df9d773089725b93bb15ded60e1cc34af7e`
|
||||||
[fission-all-1.7.0-rc.2.yaml](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-all-1.7.0-rc.2.yaml) | `594ebff290c13ad590a0fa44bbbd45a5b5e0ee6fac853d197e7bc756773c5089`
|
[fission-core-1.7.1-minikube.yaml](https://github.com/fission/fission/releases/download/1.7.1/fission-core-1.7.1-minikube.yaml) | `2e8da962edc52e3e86c9479cc9df95587f96f15b38ece71b59b08d37203f9f6f`
|
||||||
[fission-core-1.7.0-rc.2.tgz](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-core-1.7.0-rc.2.tgz) | `8ba194e2bf9cf5ea95b851093675268d1bcb713bdf2f9f8ed0fae26fe7731718`
|
[fission-core-1.7.1.tgz](https://github.com/fission/fission/releases/download/1.7.1/fission-core-1.7.1.tgz) | `afddabfdc92e4fd26afa94637902b0f7a2c5be2882e121e7576e2ef913803475`
|
||||||
[fission-all-1.7.0-rc.2.tgz](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-all-1.7.0-rc.2.tgz) | `76359916272b408ee21e18a74e230d5f344bea5d95a050fc931547760a8b52b1`
|
[fission-all-1.7.1.tgz](https://github.com/fission/fission/releases/download/1.7.1/fission-all-1.7.1.tgz) | `f881a3be4a45834bed4323d2b5cb00ae277472e6daacc9645ff2f491b5633d38`
|
||||||
[fission-cli-osx](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-cli-osx) | `0b79ba3bd1d74e3fdac12f966753c5268df3f32f7fdab3d11431fdfbd8d3e5d2`
|
[fission-cli-osx](https://github.com/fission/fission/releases/download/1.7.1/fission-cli-osx) | `23e139108314ce616e863a1c13cd9774f637f4557fd19db2813f9b024d0cbadb`
|
||||||
[fission-cli-windows.exe](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-cli-windows.exe) | `9f94e3ad7248b7f5883e78a8a7c0fb41ec7467680be445582e7e5fb1f6a62a50`
|
[fission-cli-windows.exe](https://github.com/fission/fission/releases/download/1.7.1/fission-cli-windows.exe) | `82f40b59380279c4d68f893c6c940f3ec032c72929435caffd723219f56b824a`
|
||||||
[fission-cli-linux](https://github.com/fission/fission/releases/download/1.7.0-rc.2/fission-cli-linux) | `0f37a1164df007c540e36dead66226fc9919ad5182aa479baabc46da2e9ee72f`
|
[fission-cli-linux](https://github.com/fission/fission/releases/download/1.7.1/fission-cli-linux) | `dca11589c1e927f23e520e4686b165a7fb744ac7acda266047b7fa8d51ec9048`
|
||||||
|
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## [1.7.1](https://github.com/fission/fission/tree/1.7.1) (2019-12-09)
|
||||||
|
[Full Changelog](https://github.com/fission/fission/compare/v1.7.1...1.7.1)
|
||||||
|
|
||||||
|
## [v1.7.1](https://github.com/fission/fission/tree/v1.7.1) (2019-12-09)
|
||||||
|
[Full Changelog](https://github.com/fission/fission/compare/1.7.0...v1.7.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix name conflict when buildermanager merges podspec [\#1460](https://github.com/fission/fission/pull/1460) ([life1347](https://github.com/life1347))
|
||||||
|
- Not to exclude hidden file when creating archive [\#1458](https://github.com/fission/fission/pull/1458) ([life1347](https://github.com/life1347))
|
||||||
|
- Fission 1.7.0 [\#1457](https://github.com/fission/fission/pull/1457) ([life1347](https://github.com/life1347))
|
||||||
|
|
||||||
|
## [1.7.0](https://github.com/fission/fission/tree/1.7.0) (2019-12-02)
|
||||||
|
[Full Changelog](https://github.com/fission/fission/compare/v1.7.0...1.7.0)
|
||||||
|
|
||||||
|
## [v1.7.0](https://github.com/fission/fission/tree/v1.7.0) (2019-12-02)
|
||||||
|
[Full Changelog](https://github.com/fission/fission/compare/1.7.0-rc.2...v1.7.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix release script not uploads OpenShift deploy YAML file [\#1456](https://github.com/fission/fission/pull/1456) ([life1347](https://github.com/life1347))
|
||||||
|
- Let executor type manages how to do cleanup for old kubeobjects [\#1455](https://github.com/fission/fission/pull/1455) ([life1347](https://github.com/life1347))
|
||||||
|
- Prevent deployment from rolling update due to different instance-id [\#1454](https://github.com/fission/fission/pull/1454) ([life1347](https://github.com/life1347))
|
||||||
|
- Make AdoptExistingResources optional [\#1453](https://github.com/fission/fission/pull/1453) ([life1347](https://github.com/life1347))
|
||||||
|
- Prevent newdeploy updates deployment if no resources changed [\#1452](https://github.com/fission/fission/pull/1452) ([life1347](https://github.com/life1347))
|
||||||
|
- Fix CLI unable to get pod logs from controller [\#1451](https://github.com/fission/fission/pull/1451) ([life1347](https://github.com/life1347))
|
||||||
|
- Ignore hidden file when creating archive file [\#1450](https://github.com/fission/fission/pull/1450) ([life1347](https://github.com/life1347))
|
||||||
|
- Fix spec init overrides existing deploymentconfig [\#1449](https://github.com/fission/fission/pull/1449) ([life1347](https://github.com/life1347))
|
||||||
|
- Fix spec shows source archive is not used [\#1448](https://github.com/fission/fission/pull/1448) ([life1347](https://github.com/life1347))
|
||||||
|
- Fix adopted deployment uses old fetcher image [\#1447](https://github.com/fission/fission/pull/1447) ([life1347](https://github.com/life1347))
|
||||||
|
- Improve executor bootstrap speed [\#1446](https://github.com/fission/fission/pull/1446) ([life1347](https://github.com/life1347))
|
||||||
|
- Fission 1.7.0-rc.2 [\#1445](https://github.com/fission/fission/pull/1445) ([life1347](https://github.com/life1347))
|
||||||
|
|
||||||
## [1.7.0-rc.2](https://github.com/fission/fission/tree/1.7.0-rc.2) (2019-11-27)
|
## [1.7.0-rc.2](https://github.com/fission/fission/tree/1.7.0-rc.2) (2019-11-27)
|
||||||
[Full Changelog](https://github.com/fission/fission/compare/v1.7.0-rc.2...1.7.0-rc.2)
|
[Full Changelog](https://github.com/fission/fission/compare/v1.7.0-rc.2...1.7.0-rc.2)
|
||||||
|
|
||||||
@@ -35,7 +68,7 @@ filename | sha256 hash
|
|||||||
- Fix poolmanager sets 0 timeout for function specialization [\#1439](https://github.com/fission/fission/pull/1439) ([life1347](https://github.com/life1347))
|
- Fix poolmanager sets 0 timeout for function specialization [\#1439](https://github.com/fission/fission/pull/1439) ([life1347](https://github.com/life1347))
|
||||||
- Add huge response body test [\#1437](https://github.com/fission/fission/pull/1437) ([life1347](https://github.com/life1347))
|
- Add huge response body test [\#1437](https://github.com/fission/fission/pull/1437) ([life1347](https://github.com/life1347))
|
||||||
- Return error when specialization failed [\#1436](https://github.com/fission/fission/pull/1436) ([life1347](https://github.com/life1347))
|
- Return error when specialization failed [\#1436](https://github.com/fission/fission/pull/1436) ([life1347](https://github.com/life1347))
|
||||||
- Fix poolmanager terminates running function pod periodically [\#1435](https://github.com/fission/fission/pull/1435) ([life1347](https://github.com/life1347))
|
- Fix poolmanager terminates running function pod periodically [\#1435](https://github.com/fission/fission/pull/1435) ([life1347](https://github.com/life1347))
|
||||||
- Allow to tap multiple function services at one time [\#1434](https://github.com/fission/fission/pull/1434) ([life1347](https://github.com/life1347))
|
- Allow to tap multiple function services at one time [\#1434](https://github.com/fission/fission/pull/1434) ([life1347](https://github.com/life1347))
|
||||||
- Collect function metrics after finishing request [\#1433](https://github.com/fission/fission/pull/1433) ([life1347](https://github.com/life1347))
|
- Collect function metrics after finishing request [\#1433](https://github.com/fission/fission/pull/1433) ([life1347](https://github.com/life1347))
|
||||||
- Fix poolmanager crashes when failed to list environment [\#1432](https://github.com/fission/fission/pull/1432) ([life1347](https://github.com/life1347))
|
- Fix poolmanager crashes when failed to list environment [\#1432](https://github.com/fission/fission/pull/1432) ([life1347](https://github.com/life1347))
|
||||||
@@ -234,6 +267,7 @@ filename | sha256 hash
|
|||||||
- Fallback to get user home directory from env [\#1203](https://github.com/fission/fission/pull/1203) ([life1347](https://github.com/life1347))
|
- Fallback to get user home directory from env [\#1203](https://github.com/fission/fission/pull/1203) ([life1347](https://github.com/life1347))
|
||||||
- Fission v1.3.0 [\#1202](https://github.com/fission/fission/pull/1202) ([life1347](https://github.com/life1347))
|
- Fission v1.3.0 [\#1202](https://github.com/fission/fission/pull/1202) ([life1347](https://github.com/life1347))
|
||||||
- \[bugfix\] Fix CLI drops controller URL path when querying logs [\#1201](https://github.com/fission/fission/pull/1201) ([moluzhang](https://github.com/moluzhang))
|
- \[bugfix\] Fix CLI drops controller URL path when querying logs [\#1201](https://github.com/fission/fission/pull/1201) ([moluzhang](https://github.com/moluzhang))
|
||||||
|
- Fix dotnet example [\#1175](https://github.com/fission/fission/pull/1175) ([CanerPatir](https://github.com/CanerPatir))
|
||||||
- Enable go module support for go environment [\#1152](https://github.com/fission/fission/pull/1152) ([life1347](https://github.com/life1347))
|
- Enable go module support for go environment [\#1152](https://github.com/fission/fission/pull/1152) ([life1347](https://github.com/life1347))
|
||||||
|
|
||||||
## [1.3.0](https://github.com/fission/fission/tree/1.3.0) (2019-06-03)
|
## [1.3.0](https://github.com/fission/fission/tree/1.3.0) (2019-06-03)
|
||||||
@@ -254,8 +288,8 @@ filename | sha256 hash
|
|||||||
- V1.2.1 [\#1178](https://github.com/fission/fission/pull/1178) ([vishal-biyani](https://github.com/vishal-biyani))
|
- V1.2.1 [\#1178](https://github.com/fission/fission/pull/1178) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Skaffold for Fission [\#1172](https://github.com/fission/fission/pull/1172) ([vishal-biyani](https://github.com/vishal-biyani))
|
- Skaffold for Fission [\#1172](https://github.com/fission/fission/pull/1172) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Add affinity support [\#1170](https://github.com/fission/fission/pull/1170) ([laurence-hudson-mindfoundry](https://github.com/laurence-hudson-mindfoundry))
|
- Add affinity support [\#1170](https://github.com/fission/fission/pull/1170) ([laurence-hudson-mindfoundry](https://github.com/laurence-hudson-mindfoundry))
|
||||||
- Using templated imagePullPolicy for containers in deployment.yaml [\#1137](https://github.com/fission/fission/pull/1137) ([msshroff](https://github.com/msshroff))
|
|
||||||
- Refactor test framework [\#1128](https://github.com/fission/fission/pull/1128) ([darkgerm](https://github.com/darkgerm))
|
- Refactor test framework [\#1128](https://github.com/fission/fission/pull/1128) ([darkgerm](https://github.com/darkgerm))
|
||||||
|
- Function update after change in env [\#1116](https://github.com/fission/fission/pull/1116) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Pod specs [\#1106](https://github.com/fission/fission/pull/1106) ([vishal-biyani](https://github.com/vishal-biyani))
|
- Pod specs [\#1106](https://github.com/fission/fission/pull/1106) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Allow non-toplevel modules in python environment [\#1042](https://github.com/fission/fission/pull/1042) ([soamvasani](https://github.com/soamvasani))
|
- Allow non-toplevel modules in python environment [\#1042](https://github.com/fission/fission/pull/1042) ([soamvasani](https://github.com/soamvasani))
|
||||||
- Created dotnet2.0 Builder Image and Added /v2/specialized Endpoint to dotnet2.0 Envrionment [\#1001](https://github.com/fission/fission/pull/1001) ([paraspatidar](https://github.com/paraspatidar))
|
- Created dotnet2.0 Builder Image and Added /v2/specialized Endpoint to dotnet2.0 Envrionment [\#1001](https://github.com/fission/fission/pull/1001) ([paraspatidar](https://github.com/paraspatidar))
|
||||||
@@ -265,7 +299,6 @@ filename | sha256 hash
|
|||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Fix dotnet example [\#1175](https://github.com/fission/fission/pull/1175) ([CanerPatir](https://github.com/CanerPatir))
|
|
||||||
- V1.2.0 [\#1171](https://github.com/fission/fission/pull/1171) ([vishal-biyani](https://github.com/vishal-biyani))
|
- V1.2.0 [\#1171](https://github.com/fission/fission/pull/1171) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Fixes broken config path for functions [\#1177](https://github.com/fission/fission/pull/1177) ([vishal-biyani](https://github.com/vishal-biyani))
|
- Fixes broken config path for functions [\#1177](https://github.com/fission/fission/pull/1177) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
|
|
||||||
@@ -281,11 +314,11 @@ filename | sha256 hash
|
|||||||
- Fix TravisCI go environment version to avoid go bugs [\#1154](https://github.com/fission/fission/pull/1154) ([life1347](https://github.com/life1347))
|
- Fix TravisCI go environment version to avoid go bugs [\#1154](https://github.com/fission/fission/pull/1154) ([life1347](https://github.com/life1347))
|
||||||
- \#1132 nodejs environment, increase body size [\#1149](https://github.com/fission/fission/pull/1149) ([JannikZed](https://github.com/JannikZed))
|
- \#1132 nodejs environment, increase body size [\#1149](https://github.com/fission/fission/pull/1149) ([JannikZed](https://github.com/JannikZed))
|
||||||
- Added php builder to release script fixes \#1140 [\#1145](https://github.com/fission/fission/pull/1145) ([vishal-biyani](https://github.com/vishal-biyani))
|
- Added php builder to release script fixes \#1140 [\#1145](https://github.com/fission/fission/pull/1145) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
|
- Using templated imagePullPolicy for containers in deployment.yaml [\#1137](https://github.com/fission/fission/pull/1137) ([msshroff](https://github.com/msshroff))
|
||||||
- Migrate from glide to official dependencies management tool: Go Module [\#1136](https://github.com/fission/fission/pull/1136) ([life1347](https://github.com/life1347))
|
- Migrate from glide to official dependencies management tool: Go Module [\#1136](https://github.com/fission/fission/pull/1136) ([life1347](https://github.com/life1347))
|
||||||
- Fix misleading log when setup portforward [\#1134](https://github.com/fission/fission/pull/1134) ([life1347](https://github.com/life1347))
|
- Fix misleading log when setup portforward [\#1134](https://github.com/fission/fission/pull/1134) ([life1347](https://github.com/life1347))
|
||||||
- V1.1.0 [\#1129](https://github.com/fission/fission/pull/1129) ([vishal-biyani](https://github.com/vishal-biyani))
|
- V1.1.0 [\#1129](https://github.com/fission/fission/pull/1129) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- support KUBECONFIG with multiple kube config files [\#1126](https://github.com/fission/fission/pull/1126) ([grounded042](https://github.com/grounded042))
|
- support KUBECONFIG with multiple kube config files [\#1126](https://github.com/fission/fission/pull/1126) ([grounded042](https://github.com/grounded042))
|
||||||
- Function update after change in env [\#1116](https://github.com/fission/fission/pull/1116) ([vishal-biyani](https://github.com/vishal-biyani))
|
|
||||||
- Add configurable timeout to fission function test [\#1091](https://github.com/fission/fission/pull/1091) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
- Add configurable timeout to fission function test [\#1091](https://github.com/fission/fission/pull/1091) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||||
- Add links to examples for each Fission environment [\#1090](https://github.com/fission/fission/pull/1090) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
- Add links to examples for each Fission environment [\#1090](https://github.com/fission/fission/pull/1090) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||||
|
|
||||||
@@ -716,7 +749,6 @@ filename | sha256 hash
|
|||||||
- Fix pool manager crash problem if failed at http call [\#418](https://github.com/fission/fission/pull/418) ([life1347](https://github.com/life1347))
|
- Fix pool manager crash problem if failed at http call [\#418](https://github.com/fission/fission/pull/418) ([life1347](https://github.com/life1347))
|
||||||
- Update nats dependencies [\#411](https://github.com/fission/fission/pull/411) ([life1347](https://github.com/life1347))
|
- Update nats dependencies [\#411](https://github.com/fission/fission/pull/411) ([life1347](https://github.com/life1347))
|
||||||
- Prepare Fission for IPv6 uses [\#408](https://github.com/fission/fission/pull/408) ([valentin2105](https://github.com/valentin2105))
|
- Prepare Fission for IPv6 uses [\#408](https://github.com/fission/fission/pull/408) ([valentin2105](https://github.com/valentin2105))
|
||||||
- Executor API panics if there is err in getting function from backends [\#407](https://github.com/fission/fission/pull/407) ([vishal-biyani](https://github.com/vishal-biyani))
|
|
||||||
- fission function logs returns logs in correct order now [\#405](https://github.com/fission/fission/pull/405) ([prithviramesh](https://github.com/prithviramesh))
|
- fission function logs returns logs in correct order now [\#405](https://github.com/fission/fission/pull/405) ([prithviramesh](https://github.com/prithviramesh))
|
||||||
- Fetcher retry [\#403](https://github.com/fission/fission/pull/403) ([vishal-biyani](https://github.com/vishal-biyani))
|
- Fetcher retry [\#403](https://github.com/fission/fission/pull/403) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Add fission/builder image [\#397](https://github.com/fission/fission/pull/397) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
- Add fission/builder image [\#397](https://github.com/fission/fission/pull/397) ([erwinvaneyk](https://github.com/erwinvaneyk))
|
||||||
@@ -741,6 +773,7 @@ filename | sha256 hash
|
|||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Executor API panics if there is err in getting function from backends [\#407](https://github.com/fission/fission/pull/407) ([vishal-biyani](https://github.com/vishal-biyani))
|
||||||
- Use store to sync functions/triggers for fast synchronization [\#382](https://github.com/fission/fission/pull/382) ([life1347](https://github.com/life1347))
|
- Use store to sync functions/triggers for fast synchronization [\#382](https://github.com/fission/fission/pull/382) ([life1347](https://github.com/life1347))
|
||||||
- Switch from ThirdPartyResources to CustomResourceDefinitions [\#381](https://github.com/fission/fission/pull/381) ([life1347](https://github.com/life1347))
|
- Switch from ThirdPartyResources to CustomResourceDefinitions [\#381](https://github.com/fission/fission/pull/381) ([life1347](https://github.com/life1347))
|
||||||
- changed helm install pullPolicy from Always to IfNotPresent when building local docker image [\#378](https://github.com/fission/fission/pull/378) ([prithviramesh](https://github.com/prithviramesh))
|
- changed helm install pullPolicy from Always to IfNotPresent when building local docker image [\#378](https://github.com/fission/fission/pull/378) ([prithviramesh](https://github.com/prithviramesh))
|
||||||
@@ -922,6 +955,7 @@ filename | sha256 hash
|
|||||||
- bugfix \(cli\) Update the URL check to work with https [\#94](https://github.com/fission/fission/pull/94) ([andrewstuart](https://github.com/andrewstuart))
|
- bugfix \(cli\) Update the URL check to work with https [\#94](https://github.com/fission/fission/pull/94) ([andrewstuart](https://github.com/andrewstuart))
|
||||||
- Primary Helm chart for fission [\#90](https://github.com/fission/fission/pull/90) ([sanketsudake](https://github.com/sanketsudake))
|
- Primary Helm chart for fission [\#90](https://github.com/fission/fission/pull/90) ([sanketsudake](https://github.com/sanketsudake))
|
||||||
- Wait for Pod IP while waiting for pod ready [\#89](https://github.com/fission/fission/pull/89) ([soamvasani](https://github.com/soamvasani))
|
- Wait for Pod IP while waiting for pod ready [\#89](https://github.com/fission/fission/pull/89) ([soamvasani](https://github.com/soamvasani))
|
||||||
|
- Make go vet happy [\#87](https://github.com/fission/fission/pull/87) ([AlekSi](https://github.com/AlekSi))
|
||||||
- Added support for running C\# code in a dotnet core environment [\#84](https://github.com/fission/fission/pull/84) ([ktrance](https://github.com/ktrance))
|
- Added support for running C\# code in a dotnet core environment [\#84](https://github.com/fission/fission/pull/84) ([ktrance](https://github.com/ktrance))
|
||||||
|
|
||||||
## [alpha20170124](https://github.com/fission/fission/tree/alpha20170124) (2017-01-24)
|
## [alpha20170124](https://github.com/fission/fission/tree/alpha20170124) (2017-01-24)
|
||||||
@@ -929,7 +963,6 @@ filename | sha256 hash
|
|||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Make go vet happy [\#87](https://github.com/fission/fission/pull/87) ([AlekSi](https://github.com/AlekSi))
|
|
||||||
- Ignore glide cache in gofmt check [\#86](https://github.com/fission/fission/pull/86) ([soamvasani](https://github.com/soamvasani))
|
- Ignore glide cache in gofmt check [\#86](https://github.com/fission/fission/pull/86) ([soamvasani](https://github.com/soamvasani))
|
||||||
- Bugfix for internal routes [\#81](https://github.com/fission/fission/pull/81) ([soamvasani](https://github.com/soamvasani))
|
- Bugfix for internal routes [\#81](https://github.com/fission/fission/pull/81) ([soamvasani](https://github.com/soamvasani))
|
||||||
- Bug fix for handling a route's HTTP method in router [\#79](https://github.com/fission/fission/pull/79) ([soamvasani](https://github.com/soamvasani))
|
- Bug fix for handling a route's HTTP method in router [\#79](https://github.com/fission/fission/pull/79) ([soamvasani](https://github.com/soamvasani))
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
[](https://travis-ci.org/fission/fission)
|
[](https://travis-ci.org/fission/fission)
|
||||||
[](https://goreportcard.com/report/github.com/fission/fission)
|
[](https://goreportcard.com/report/github.com/fission/fission)
|
||||||
[](http://slack.fission.io)
|
|
||||||
|
|
||||||
[fission.io](http://fission.io) [@fissionio](http://twitter.com/fissionio)
|
[fission.io](http://fission.io) | [@fissionio](http://twitter.com/fissionio) | [Slack](https://join.slack.com/t/fissionio/shared_invite/enQtOTI3NjgyMjE5NzE3LTllODJiODBmYTBiYWUwMWQxZWRhNDhiZDMyN2EyNjAzMTFiYjE2Nzc1NzE0MTU4ZTg2MzVjMDQ1NWY3MGJhZmE)
|
||||||
|
|
||||||
Fission is a fast serverless framework for Kubernetes with a focus on
|
Fission is a fast serverless framework for Kubernetes with a focus on
|
||||||
developer productivity and high performance.
|
developer productivity and high performance.
|
||||||
@@ -75,9 +74,8 @@ You can learn more about Fission and get started from [Fission Docs](https://doc
|
|||||||
See the [compilation guide](https://docs.fission.io/docs/contributing/).
|
See the [compilation guide](https://docs.fission.io/docs/contributing/).
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
Reach us on [slack](http://slack.fission.io) or [twitter](https://twitter.com/fissionio).
|
|
||||||
|
|
||||||
Fission is a project by [many contributors](https://github.com/fission/fission/graphs/contributors).
|
Fission is a project by [many contributors](https://github.com/fission/fission/graphs/contributors).
|
||||||
|
Reach us on [slack](https://join.slack.com/t/fissionio/shared_invite/enQtOTI3NjgyMjE5NzE3LTllODJiODBmYTBiYWUwMWQxZWRhNDhiZDMyN2EyNjAzMTFiYjE2Nzc1NzE0MTU4ZTg2MzVjMDQ1NWY3MGJhZmE) or [twitter](https://twitter.com/fissionio).
|
||||||
|
|
||||||
## Community meeting
|
## Community meeting
|
||||||
|
|
||||||
@@ -91,6 +89,15 @@ the master branch are subject to changes and incompatibilities that will not be
|
|||||||
Builds from the master branch can have functionality changed and even removed at any time without compatibility support
|
Builds from the master branch can have functionality changed and even removed at any time without compatibility support
|
||||||
and without prior notice.
|
and without prior notice.
|
||||||
|
|
||||||
|
# Sponsors
|
||||||
|
The following companies, organizations, and individuals support Fission's ongoing maintenance and development.
|
||||||
|
Become a sponsor to get your logo on our README on Github with a link to your site.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="https://infracloud.io/"><img src="https://fission.io/sponsors/infracloud.png" alt="InfraCloud" height="70"></a>
|
||||||
|
<a href="https://srcmesh.com/"><img src="https://fission.io/sponsors/srcmesh.png" alt="Srcmesh" height="70"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
# Licensing
|
# Licensing
|
||||||
|
|
||||||
Fission is under the Apache 2.0 license.
|
Fission is under the Apache 2.0 license.
|
||||||
|
|||||||
+3
-3
@@ -43,10 +43,10 @@ Parameter | Description | Default
|
|||||||
`routerServiceType` | Type of Fission Router service to use. For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP. | `LoadBalancer`
|
`routerServiceType` | Type of Fission Router service to use. For minikube, set this to NodePort, elsewhere use LoadBalancer or ClusterIP. | `LoadBalancer`
|
||||||
`repository` | Image base repository | `index.docker.io`
|
`repository` | Image base repository | `index.docker.io`
|
||||||
`image` | Fission image repository | `fission/fission-bundle`
|
`image` | Fission image repository | `fission/fission-bundle`
|
||||||
`imageTag` | Fission image tag | `1.7.0`
|
`imageTag` | Fission image tag | `1.8.0`
|
||||||
`pullPolicy` | Image pull policy | `IfNotPresent`
|
`pullPolicy` | Image pull policy | `IfNotPresent`
|
||||||
`fetcherImage` | Fission fetcher repository | `fission/fetcher`
|
`fetcher.image` | Fission fetcher repository | `fission/fetcher`
|
||||||
`fetcherImageTag` | Fission fetcher image tag | `1.7.0`
|
`fetcher.imageTag` | Fission fetcher image tag | `1.8.0`
|
||||||
`controllerPort` | Fission Controller service port | `31313`
|
`controllerPort` | Fission Controller service port | `31313`
|
||||||
`routerPort` | Fission Router service port | ` 31314`
|
`routerPort` | Fission Router service port | ` 31314`
|
||||||
`functionNamespace` | Namespace in which to run fission functions (this is different from the release namespace) | `fission-function`
|
`functionNamespace` | Namespace in which to run fission functions (this is different from the release namespace) | `fission-function`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
name: fission-all
|
name: fission-all
|
||||||
version: 1.7.0
|
version: 1.8.0
|
||||||
description: Fission is a fast serverless framework for Kubernetes.
|
description: Fission is a fast serverless framework for Kubernetes.
|
||||||
keywords:
|
keywords:
|
||||||
- fission
|
- fission
|
||||||
@@ -12,4 +12,4 @@ maintainers:
|
|||||||
- name: Ta Ching Chen
|
- name: Ta Ching Chen
|
||||||
email: hello@tachingchen.com
|
email: hello@tachingchen.com
|
||||||
engine: gotpl
|
engine: gotpl
|
||||||
appVersion: 1.7.0
|
appVersion: 1.8.0
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ spec:
|
|||||||
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"]
|
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"]
|
||||||
env:
|
env:
|
||||||
- name: FETCHER_IMAGE
|
- name: FETCHER_IMAGE
|
||||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
value: "{{ .Values.fetcher.image }}:{{ .Values.fetcher.imageTag }}"
|
||||||
- name: FETCHER_IMAGE_PULL_POLICY
|
- name: FETCHER_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: RUNTIME_IMAGE_PULL_POLICY
|
- name: RUNTIME_IMAGE_PULL_POLICY
|
||||||
@@ -224,13 +224,13 @@ spec:
|
|||||||
- name: TRACING_SAMPLING_RATE
|
- name: TRACING_SAMPLING_RATE
|
||||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||||
- name: FETCHER_MINCPU
|
- name: FETCHER_MINCPU
|
||||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.requests | quote }}
|
||||||
- name: FETCHER_MINMEM
|
- name: FETCHER_MINMEM
|
||||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.requests | quote }}
|
||||||
- name: FETCHER_MAXCPU
|
- name: FETCHER_MAXCPU
|
||||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.limits | quote }}
|
||||||
- name: FETCHER_MAXMEM
|
- name: FETCHER_MAXMEM
|
||||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.limits | quote }}
|
||||||
- name: DEBUG_ENV
|
- name: DEBUG_ENV
|
||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
@@ -282,7 +282,7 @@ spec:
|
|||||||
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
||||||
env:
|
env:
|
||||||
- name: FETCHER_IMAGE
|
- name: FETCHER_IMAGE
|
||||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
value: "{{ .Values.fetcher.image }}:{{ .Values.fetcher.imageTag }}"
|
||||||
- name: FETCHER_IMAGE_PULL_POLICY
|
- name: FETCHER_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: BUILDER_IMAGE_PULL_POLICY
|
- name: BUILDER_IMAGE_PULL_POLICY
|
||||||
@@ -294,13 +294,13 @@ spec:
|
|||||||
- name: TRACING_SAMPLING_RATE
|
- name: TRACING_SAMPLING_RATE
|
||||||
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
value: {{ .Values.traceSamplingRate | default "0.5" | quote }}
|
||||||
- name: FETCHER_MINCPU
|
- name: FETCHER_MINCPU
|
||||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.requests | quote }}
|
||||||
- name: FETCHER_MINMEM
|
- name: FETCHER_MINMEM
|
||||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.requests | quote }}
|
||||||
- name: FETCHER_MAXCPU
|
- name: FETCHER_MAXCPU
|
||||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.limits | quote }}
|
||||||
- name: FETCHER_MAXMEM
|
- name: FETCHER_MAXMEM
|
||||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.limits | quote }}
|
||||||
- name: DEBUG_ENV
|
- name: DEBUG_ENV
|
||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-svc
|
||||||
|
|||||||
@@ -28,5 +28,5 @@ spec:
|
|||||||
- name: post-install-job
|
- name: post-install-job
|
||||||
image: "fission/alpinecurl"
|
image: "fission/alpinecurl"
|
||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.io/analytics || true"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ spec:
|
|||||||
- name: post-install-job
|
- name: post-install-job
|
||||||
image: "fission/alpinecurl"
|
image: "fission/alpinecurl"
|
||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.io/analytics || true"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ spec:
|
|||||||
- name: post-upgrade-job
|
- name: post-upgrade-job
|
||||||
image: "fission/alpinecurl"
|
image: "fission/alpinecurl"
|
||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.io/analytics || true"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ spec:
|
|||||||
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
||||||
{{- if .Values.analytics }}
|
{{- if .Values.analytics }}
|
||||||
- name: ANALYTICS_URL
|
- name: ANALYTICS_URL
|
||||||
value: "https://g.fission.sh/metrics"
|
value: "https://g.fission.io/metrics"
|
||||||
{{- else if .Values.analyticsNonHelmInstall }}
|
{{- else if .Values.analyticsNonHelmInstall }}
|
||||||
- name: ANALYTICS_URL
|
- name: ANALYTICS_URL
|
||||||
value: "https://g.fission.sh/metrics"
|
value: "https://g.fission.io/metrics"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
|
|||||||
@@ -20,13 +20,7 @@ image: fission/fission-bundle
|
|||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
## Fission image version
|
## Fission image version
|
||||||
imageTag: 1.7.0
|
imageTag: 1.8.0
|
||||||
|
|
||||||
## Fission fetcher repository
|
|
||||||
fetcherImage: fission/fetcher
|
|
||||||
|
|
||||||
## Fission fetcher image version
|
|
||||||
fetcherImageTag: 1.7.0
|
|
||||||
|
|
||||||
## Port at which Fission controller service should be exposed
|
## Port at which Fission controller service should be exposed
|
||||||
controllerPort: 31313
|
controllerPort: 31313
|
||||||
@@ -51,6 +45,23 @@ builderNamespace: fission-builder
|
|||||||
## Enable istio integration
|
## Enable istio integration
|
||||||
enableIstio: false
|
enableIstio: false
|
||||||
|
|
||||||
|
fetcher:
|
||||||
|
## Fetcher repository
|
||||||
|
image: fission/fetcher
|
||||||
|
## Fetcher image version
|
||||||
|
imageTag: 1.8.0
|
||||||
|
|
||||||
|
## Fetcher is only for to downloading or uploading archive.
|
||||||
|
## Normally, you don't need to change the value here, unless necessary.
|
||||||
|
resource:
|
||||||
|
cpu:
|
||||||
|
requests: "10m"
|
||||||
|
## Low CPU limits will increases the function specialization time.
|
||||||
|
limits: ""
|
||||||
|
mem:
|
||||||
|
requests: "16Mi"
|
||||||
|
limits: ""
|
||||||
|
|
||||||
## Logger config
|
## Logger config
|
||||||
logger:
|
logger:
|
||||||
influxdbAdmin: "admin"
|
influxdbAdmin: "admin"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
name: fission-core
|
name: fission-core
|
||||||
version: 1.7.0
|
version: 1.8.0
|
||||||
description: Fission is a fast serverless framework for Kubernetes.
|
description: Fission is a fast serverless framework for Kubernetes.
|
||||||
keywords:
|
keywords:
|
||||||
- fission
|
- fission
|
||||||
@@ -12,4 +12,4 @@ maintainers:
|
|||||||
- name: Ta Ching Chen
|
- name: Ta Ching Chen
|
||||||
email: hello@tachingchen.com
|
email: hello@tachingchen.com
|
||||||
engine: gotpl
|
engine: gotpl
|
||||||
appVersion: 1.7.0
|
appVersion: 1.8.0
|
||||||
|
|||||||
@@ -210,7 +210,9 @@ spec:
|
|||||||
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"]
|
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"]
|
||||||
env:
|
env:
|
||||||
- name: FETCHER_IMAGE
|
- name: FETCHER_IMAGE
|
||||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
value: "{{ .Values.fetcher.image }}:{{ .Values.fetcher.imageTag }}"
|
||||||
|
- name: RUNTIME_IMAGE_PULL_POLICY
|
||||||
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: FETCHER_IMAGE_PULL_POLICY
|
- name: FETCHER_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
- name: TRACE_JAEGER_COLLECTOR_ENDPOINT
|
||||||
@@ -222,13 +224,13 @@ spec:
|
|||||||
- name: ENABLE_ISTIO
|
- name: ENABLE_ISTIO
|
||||||
value: "{{ .Values.enableIstio }}"
|
value: "{{ .Values.enableIstio }}"
|
||||||
- name: FETCHER_MINCPU
|
- name: FETCHER_MINCPU
|
||||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.requests | quote }}
|
||||||
- name: FETCHER_MINMEM
|
- name: FETCHER_MINMEM
|
||||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.requests | quote }}
|
||||||
- name: FETCHER_MAXCPU
|
- name: FETCHER_MAXCPU
|
||||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.limits | quote }}
|
||||||
- name: FETCHER_MAXMEM
|
- name: FETCHER_MAXMEM
|
||||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.limits | quote }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: "/healthz"
|
path: "/healthz"
|
||||||
@@ -278,7 +280,7 @@ spec:
|
|||||||
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
||||||
env:
|
env:
|
||||||
- name: FETCHER_IMAGE
|
- name: FETCHER_IMAGE
|
||||||
value: "{{ .Values.fetcherImage }}:{{ .Values.fetcherImageTag }}"
|
value: "{{ .Values.fetcher.image }}:{{ .Values.fetcher.imageTag }}"
|
||||||
- name: FETCHER_IMAGE_PULL_POLICY
|
- name: FETCHER_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: BUILDER_IMAGE_PULL_POLICY
|
- name: BUILDER_IMAGE_PULL_POLICY
|
||||||
@@ -290,13 +292,13 @@ spec:
|
|||||||
- name: ENABLE_ISTIO
|
- name: ENABLE_ISTIO
|
||||||
value: "{{ .Values.enableIstio }}"
|
value: "{{ .Values.enableIstio }}"
|
||||||
- name: FETCHER_MINCPU
|
- name: FETCHER_MINCPU
|
||||||
value: {{ .Values.fetcherMinCpu | default "10m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.requests | quote }}
|
||||||
- name: FETCHER_MINMEM
|
- name: FETCHER_MINMEM
|
||||||
value: {{ .Values.fetcherMinMem | default "16Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.requests | quote }}
|
||||||
- name: FETCHER_MAXCPU
|
- name: FETCHER_MAXCPU
|
||||||
value: {{ .Values.fetcherMaxCpu | default "1000m" | quote }}
|
value: {{ .Values.fetcher.resource.cpu.limits | quote }}
|
||||||
- name: FETCHER_MAXMEM
|
- name: FETCHER_MAXMEM
|
||||||
value: {{ .Values.fetcherMaxMem | default "128Mi" | quote }}
|
value: {{ .Values.fetcher.resource.mem.limits | quote }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-svc
|
||||||
{{- if .Values.extraCoreComponentPodConfig }}
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: post-install-job
|
- name: post-install-job
|
||||||
image: "fission/alpinecurl"
|
image: "fission/alpinecurl"
|
||||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.io/analytics || true"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: post-install-job
|
- name: post-install-job
|
||||||
image: "fission/alpinecurl"
|
image: "fission/alpinecurl"
|
||||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.io/analytics || true"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: post-upgrade-job
|
- name: post-upgrade-job
|
||||||
image: "fission/alpinecurl"
|
image: "fission/alpinecurl"
|
||||||
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.io/analytics || true"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ spec:
|
|||||||
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
||||||
{{- if .Values.analytics }}
|
{{- if .Values.analytics }}
|
||||||
- name: ANALYTICS_URL
|
- name: ANALYTICS_URL
|
||||||
value: "https://g.fission.sh/metrics"
|
value: "https://g.fission.io/metrics"
|
||||||
{{- else if .Values.analyticsNonHelmInstall }}
|
{{- else if .Values.analyticsNonHelmInstall }}
|
||||||
- name: ANALYTICS_URL
|
- name: ANALYTICS_URL
|
||||||
value: "https://g.fission.sh/metrics"
|
value: "https://g.fission.io/metrics"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
|
|||||||
@@ -17,17 +17,11 @@ repository: index.docker.io
|
|||||||
image: fission/fission-bundle
|
image: fission/fission-bundle
|
||||||
|
|
||||||
## Fission image version
|
## Fission image version
|
||||||
imageTag: 1.7.0
|
imageTag: 1.8.0
|
||||||
|
|
||||||
## Image pull policy
|
## Image pull policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
## Fission fetcher repository
|
|
||||||
fetcherImage: fission/fetcher
|
|
||||||
|
|
||||||
## Fission fetcher image version
|
|
||||||
fetcherImageTag: 1.7.0
|
|
||||||
|
|
||||||
## Port at which Fission controller service should be exposed
|
## Port at which Fission controller service should be exposed
|
||||||
controllerPort: 31313
|
controllerPort: 31313
|
||||||
|
|
||||||
@@ -45,6 +39,23 @@ builderNamespace: fission-builder
|
|||||||
## Enable istio integration
|
## Enable istio integration
|
||||||
enableIstio: false
|
enableIstio: false
|
||||||
|
|
||||||
|
fetcher:
|
||||||
|
## Fetcher repository
|
||||||
|
image: fission/fetcher
|
||||||
|
## Fetcher image version
|
||||||
|
imageTag: 1.8.0
|
||||||
|
|
||||||
|
## Fetcher is only for to downloading or uploading archive.
|
||||||
|
## Normally, you don't need to change the value here, unless necessary.
|
||||||
|
resource:
|
||||||
|
cpu:
|
||||||
|
requests: "10m"
|
||||||
|
## Low CPU limits will increases the function specialization time.
|
||||||
|
limits: ""
|
||||||
|
mem:
|
||||||
|
requests: "16Mi"
|
||||||
|
limits: ""
|
||||||
|
|
||||||
executor:
|
executor:
|
||||||
adoptExistingResources: false
|
adoptExistingResources: false
|
||||||
|
|
||||||
@@ -161,7 +172,7 @@ debugEnv: false
|
|||||||
## Prometheus for scrapping service metrics
|
## Prometheus for scrapping service metrics
|
||||||
prometheus:
|
prometheus:
|
||||||
## set this flag to true if prometheus needs to be deployed along with fission
|
## set this flag to true if prometheus needs to be deployed along with fission
|
||||||
enabled: true
|
enabled: false
|
||||||
|
|
||||||
## If enabled is false, please assign the prometheus service URL
|
## If enabled is false, please assign the prometheus service URL
|
||||||
## that is accessible by components.
|
## that is accessible by components.
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import (
|
|||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"github.com/fission/fission/pkg/fetcher"
|
"github.com/fission/fission/pkg/fetcher"
|
||||||
"github.com/fission/fission/pkg/types"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func registerTraceExporter(collectorEndpoint string) error {
|
func registerTraceExporter(collectorEndpoint string) error {
|
||||||
@@ -94,7 +93,7 @@ func Run(logger *zap.Logger) {
|
|||||||
// do specialization in other goroutine to prevent blocking in newdeploy
|
// do specialization in other goroutine to prevent blocking in newdeploy
|
||||||
go func() {
|
go func() {
|
||||||
if *specializeOnStart {
|
if *specializeOnStart {
|
||||||
var specializeReq types.FunctionSpecializeRequest
|
var specializeReq fetcher.FunctionSpecializeRequest
|
||||||
|
|
||||||
err := json.Unmarshal([]byte(*specializePayload), &specializeReq)
|
err := json.Unmarshal([]byte(*specializePayload), &specializeReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package app
|
|||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"github.com/fission/fission/pkg/controller/client"
|
||||||
|
"github.com/fission/fission/pkg/controller/client/rest"
|
||||||
"github.com/fission/fission/pkg/fission-cli/cliwrapper/cli"
|
"github.com/fission/fission/pkg/fission-cli/cliwrapper/cli"
|
||||||
wrapper "github.com/fission/fission/pkg/fission-cli/cliwrapper/driver/cobra"
|
wrapper "github.com/fission/fission/pkg/fission-cli/cliwrapper/driver/cobra"
|
||||||
"github.com/fission/fission/pkg/fission-cli/cliwrapper/driver/cobra/helptemplate"
|
"github.com/fission/fission/pkg/fission-cli/cliwrapper/driver/cobra/helptemplate"
|
||||||
|
"github.com/fission/fission/pkg/fission-cli/cmd"
|
||||||
"github.com/fission/fission/pkg/fission-cli/cmd/canaryconfig"
|
"github.com/fission/fission/pkg/fission-cli/cmd/canaryconfig"
|
||||||
"github.com/fission/fission/pkg/fission-cli/cmd/environment"
|
"github.com/fission/fission/pkg/fission-cli/cmd/environment"
|
||||||
"github.com/fission/fission/pkg/fission-cli/cmd/function"
|
"github.com/fission/fission/pkg/fission-cli/cmd/function"
|
||||||
@@ -20,6 +23,7 @@ import (
|
|||||||
"github.com/fission/fission/pkg/fission-cli/console"
|
"github.com/fission/fission/pkg/fission-cli/console"
|
||||||
"github.com/fission/fission/pkg/fission-cli/flag"
|
"github.com/fission/fission/pkg/fission-cli/flag"
|
||||||
flagkey "github.com/fission/fission/pkg/fission-cli/flag/key"
|
flagkey "github.com/fission/fission/pkg/fission-cli/flag/key"
|
||||||
|
"github.com/fission/fission/pkg/fission-cli/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -40,6 +44,19 @@ func App() *cobra.Command {
|
|||||||
PersistentPreRunE: wrapper.Wrapper(
|
PersistentPreRunE: wrapper.Wrapper(
|
||||||
func(input cli.Input) error {
|
func(input cli.Input) error {
|
||||||
console.Verbosity = input.Int(flagkey.Verbosity)
|
console.Verbosity = input.Int(flagkey.Verbosity)
|
||||||
|
|
||||||
|
if input.IsSet(flagkey.ClientOnly) {
|
||||||
|
// TODO: use fake rest client for offline spec generation
|
||||||
|
cmd.SetClientset(client.MakeFakeClientset(nil))
|
||||||
|
} else {
|
||||||
|
serverUrl, err := util.GetServerURL(input)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
restClient := rest.NewRESTClient(serverUrl)
|
||||||
|
cmd.SetClientset(client.MakeClientset(restClient))
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -27,9 +27,8 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
|
|
||||||
fv1 "github.com/fission/fission/pkg/apis/fission.io/v1"
|
fv1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
"github.com/fission/fission/pkg/crd"
|
"github.com/fission/fission/pkg/crd"
|
||||||
"github.com/fission/fission/pkg/types"
|
|
||||||
"github.com/fission/fission/pkg/utils"
|
"github.com/fission/fission/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -90,7 +89,7 @@ func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
|
|||||||
var fList *fv1.FunctionList
|
var fList *fv1.FunctionList
|
||||||
|
|
||||||
for i := 0; i < maxRetries; i++ {
|
for i := 0; i < maxRetries; i++ {
|
||||||
fList, err = client.fissionClient.Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
fList, err = client.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -108,20 +107,20 @@ func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
|
|||||||
for _, fn := range fList.Items {
|
for _, fn := range fList.Items {
|
||||||
secrets := fn.Spec.Secrets
|
secrets := fn.Spec.Secrets
|
||||||
for _, secret := range secrets {
|
for _, secret := range secrets {
|
||||||
if secret.Namespace != fn.Metadata.Namespace {
|
if secret.Namespace != fn.ObjectMeta.Namespace {
|
||||||
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a secret : %s in namespace : %s", fn.Metadata.Name, fn.Metadata.Namespace, secret.Name, secret.Namespace))
|
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a secret : %s in namespace : %s", fn.ObjectMeta.Name, fn.ObjectMeta.Namespace, secret.Name, secret.Namespace))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configmaps := fn.Spec.ConfigMaps
|
configmaps := fn.Spec.ConfigMaps
|
||||||
for _, configmap := range configmaps {
|
for _, configmap := range configmaps {
|
||||||
if configmap.Namespace != fn.Metadata.Namespace {
|
if configmap.Namespace != fn.ObjectMeta.Namespace {
|
||||||
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a configmap : %s in namespace : %s", fn.Metadata.Name, fn.Metadata.Namespace, configmap.Name, configmap.Namespace))
|
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a configmap : %s in namespace : %s", fn.ObjectMeta.Name, fn.ObjectMeta.Namespace, configmap.Name, configmap.Namespace))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if fn.Spec.Package.PackageRef.Namespace != fn.Metadata.Namespace {
|
if fn.Spec.Package.PackageRef.Namespace != fn.ObjectMeta.Namespace {
|
||||||
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a package : %s in namespace : %s", fn.Metadata.Name, fn.Metadata.Namespace, fn.Spec.Package.PackageRef.Name, fn.Spec.Package.PackageRef.Namespace))
|
errs = multierror.Append(errs, fmt.Errorf("function : %s.%s cannot reference a package : %s in namespace : %s", fn.ObjectMeta.Name, fn.ObjectMeta.Namespace, fn.Spec.Package.PackageRef.Name, fn.Spec.Package.PackageRef.Namespace))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,12 +167,12 @@ func (client *PreUpgradeTaskClient) RemoveClusterAdminRolesForFissionSAs() {
|
|||||||
// This is because, we just deleted the ClusterRoleBindings for these service accounts in the previous function and
|
// This is because, we just deleted the ClusterRoleBindings for these service accounts in the previous function and
|
||||||
// for the existing functions to work, we need to give these SAs the right privileges
|
// for the existing functions to work, we need to give these SAs the right privileges
|
||||||
func (client *PreUpgradeTaskClient) NeedRoleBindings() bool {
|
func (client *PreUpgradeTaskClient) NeedRoleBindings() bool {
|
||||||
pkgList, err := client.fissionClient.Packages(metav1.NamespaceDefault).List(metav1.ListOptions{})
|
pkgList, err := client.fissionClient.CoreV1().Packages(metav1.NamespaceDefault).List(metav1.ListOptions{})
|
||||||
if err == nil && len(pkgList.Items) > 0 {
|
if err == nil && len(pkgList.Items) > 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
fnList, err := client.fissionClient.Functions(metav1.NamespaceDefault).List(metav1.ListOptions{})
|
fnList, err := client.fissionClient.CoreV1().Functions(metav1.NamespaceDefault).List(metav1.ListOptions{})
|
||||||
if err == nil && len(fnList.Items) > 0 {
|
if err == nil && len(fnList.Items) > 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -190,33 +189,33 @@ func (client *PreUpgradeTaskClient) SetupRoleBindings() {
|
|||||||
|
|
||||||
// the fact that we're here implies that there had been a prior installation of fission and objects are present still
|
// the fact that we're here implies that there had been a prior installation of fission and objects are present still
|
||||||
// so, we go ahead and create the role-bindings necessary for the fission-fetcher and fission-builder Service Accounts.
|
// so, we go ahead and create the role-bindings necessary for the fission-fetcher and fission-builder Service Accounts.
|
||||||
err := utils.SetupRoleBinding(client.logger, client.k8sClient, types.PackageGetterRB, metav1.NamespaceDefault, types.PackageGetterCR, types.ClusterRole, types.FissionFetcherSA, client.fnPodNs)
|
err := utils.SetupRoleBinding(client.logger, client.k8sClient, fv1.PackageGetterRB, metav1.NamespaceDefault, fv1.PackageGetterCR, fv1.ClusterRole, fv1.FissionFetcherSA, client.fnPodNs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
client.logger.Fatal("error setting up rolebinding for service account",
|
client.logger.Fatal("error setting up rolebinding for service account",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
zap.String("role_binding", types.PackageGetterRB),
|
zap.String("role_binding", fv1.PackageGetterRB),
|
||||||
zap.String("service_account", types.FissionFetcherSA),
|
zap.String("service_account", fv1.FissionFetcherSA),
|
||||||
zap.String("service_account_namespace", client.fnPodNs))
|
zap.String("service_account_namespace", client.fnPodNs))
|
||||||
}
|
}
|
||||||
|
|
||||||
err = utils.SetupRoleBinding(client.logger, client.k8sClient, types.PackageGetterRB, metav1.NamespaceDefault, types.PackageGetterCR, types.ClusterRole, types.FissionBuilderSA, client.envBuilderNs)
|
err = utils.SetupRoleBinding(client.logger, client.k8sClient, fv1.PackageGetterRB, metav1.NamespaceDefault, fv1.PackageGetterCR, fv1.ClusterRole, fv1.FissionBuilderSA, client.envBuilderNs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
client.logger.Fatal("error setting up rolebinding for service account",
|
client.logger.Fatal("error setting up rolebinding for service account",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
zap.String("role_binding", types.PackageGetterRB),
|
zap.String("role_binding", fv1.PackageGetterRB),
|
||||||
zap.String("service_account", types.FissionBuilderSA),
|
zap.String("service_account", fv1.FissionBuilderSA),
|
||||||
zap.String("service_account_namespace", client.envBuilderNs))
|
zap.String("service_account_namespace", client.envBuilderNs))
|
||||||
}
|
}
|
||||||
|
|
||||||
err = utils.SetupRoleBinding(client.logger, client.k8sClient, types.SecretConfigMapGetterRB, metav1.NamespaceDefault, types.SecretConfigMapGetterCR, types.ClusterRole, types.FissionFetcherSA, client.fnPodNs)
|
err = utils.SetupRoleBinding(client.logger, client.k8sClient, fv1.SecretConfigMapGetterRB, metav1.NamespaceDefault, fv1.SecretConfigMapGetterCR, fv1.ClusterRole, fv1.FissionFetcherSA, client.fnPodNs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
client.logger.Fatal("error setting up rolebinding for service account",
|
client.logger.Fatal("error setting up rolebinding for service account",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
zap.String("role_binding", types.SecretConfigMapGetterRB),
|
zap.String("role_binding", fv1.SecretConfigMapGetterRB),
|
||||||
zap.String("service_account", types.FissionFetcherSA),
|
zap.String("service_account", fv1.FissionFetcherSA),
|
||||||
zap.String("service_account_namespace", client.fnPodNs))
|
zap.String("service_account_namespace", client.fnPodNs))
|
||||||
}
|
}
|
||||||
|
|
||||||
client.logger.Info("created rolebindings in default namespace",
|
client.logger.Info("created rolebindings in default namespace",
|
||||||
zap.Strings("role_bindings", []string{types.PackageGetterRB, types.SecretConfigMapGetterRB}))
|
zap.Strings("role_bindings", []string{fv1.PackageGetterRB, fv1.SecretConfigMapGetterRB}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
ARG GO_VERSION=1.12.7
|
ARG GO_VERSION=1.12
|
||||||
|
|
||||||
FROM ubuntu:18.04 AS base
|
FROM ubuntu:18.04 AS base
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
ARG GO_VERSION=1.13
|
||||||
|
|
||||||
|
FROM ubuntu:18.04 AS base
|
||||||
|
WORKDIR /
|
||||||
|
RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
FROM golang:${GO_VERSION} AS builder
|
||||||
|
|
||||||
|
ENV GOPATH /usr
|
||||||
|
ENV APP ${GOPATH}/src/github.com/fission/fission/environments/go
|
||||||
|
|
||||||
|
WORKDIR ${APP}
|
||||||
|
|
||||||
|
ADD context ${APP}/context
|
||||||
|
ADD server.go ${APP}
|
||||||
|
|
||||||
|
RUN go get
|
||||||
|
RUN go build -a -o /server server.go
|
||||||
|
|
||||||
|
FROM base
|
||||||
|
COPY --from=builder /server /
|
||||||
|
|
||||||
|
ENTRYPOINT ["/server"]
|
||||||
|
EXPOSE 8888
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
ARG BUILDER_IMAGE=fission/builder
|
ARG BUILDER_IMAGE=fission/builder
|
||||||
ARG GO_VERSION=1.12.7
|
ARG GO_VERSION=1.12
|
||||||
|
|
||||||
FROM ${BUILDER_IMAGE}
|
FROM ${BUILDER_IMAGE}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
ARG BUILDER_IMAGE=fission/builder
|
||||||
|
ARG GO_VERSION=1.13
|
||||||
|
|
||||||
|
FROM ${BUILDER_IMAGE}
|
||||||
|
|
||||||
|
FROM golang:${GO_VERSION}
|
||||||
|
|
||||||
|
ENV GOPATH /usr
|
||||||
|
ENV GO111MODULE on
|
||||||
|
WORKDIR ${GOPATH}
|
||||||
|
|
||||||
|
COPY --from=0 /builder /builder
|
||||||
|
ADD build.sh /usr/local/bin/build
|
||||||
|
|
||||||
+38
-46
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -9,8 +10,12 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"plugin"
|
"plugin"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
// DO NOT IMPORT THIRD PARTY PACKAGES
|
||||||
"go.uber.org/zap"
|
// The 3rd party package version used by go server may be
|
||||||
|
// different from the one in user's source code and will
|
||||||
|
// cause plugin version mismatched. Hence, we should never
|
||||||
|
// import any external packages except the Fission or built-in
|
||||||
|
// packages.
|
||||||
|
|
||||||
"github.com/fission/fission/environments/go/context"
|
"github.com/fission/fission/environments/go/context"
|
||||||
)
|
)
|
||||||
@@ -40,33 +45,33 @@ type (
|
|||||||
|
|
||||||
var userFunc http.HandlerFunc
|
var userFunc http.HandlerFunc
|
||||||
|
|
||||||
func loadPlugin(logger *zap.Logger, codePath, entrypoint string) (http.HandlerFunc, error) {
|
func loadPlugin(codePath, entrypoint string) (http.HandlerFunc, error) {
|
||||||
|
|
||||||
// if codepath's a directory, load the file inside it
|
// if codepath's a directory, load the file inside it
|
||||||
info, err := os.Stat(codePath)
|
info, err := os.Stat(codePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error checking plugin path")
|
return nil, fmt.Errorf("error checking plugin path: %v", err)
|
||||||
}
|
}
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
files, err := ioutil.ReadDir(codePath)
|
files, err := ioutil.ReadDir(codePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error reading directory")
|
return nil, fmt.Errorf("error reading directory: %v", err)
|
||||||
}
|
}
|
||||||
if len(files) == 0 {
|
if len(files) == 0 {
|
||||||
return nil, errors.New("No files to load")
|
return nil, fmt.Errorf("no files to load: %v", codePath)
|
||||||
}
|
}
|
||||||
fi := files[0]
|
fi := files[0]
|
||||||
codePath = filepath.Join(codePath, fi.Name())
|
codePath = filepath.Join(codePath, fi.Name())
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info("loading plugin", zap.String("location", codePath))
|
log.Printf("loading plugin from %v", codePath)
|
||||||
p, err := plugin.Open(codePath)
|
p, err := plugin.Open(codePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error loading plugin")
|
return nil, fmt.Errorf("error loading plugin: %v", err)
|
||||||
}
|
}
|
||||||
sym, err := p.Lookup(entrypoint)
|
sym, err := p.Lookup(entrypoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "entry point not found")
|
return nil, fmt.Errorf("entry point not found: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch h := sym.(type) {
|
switch h := sym.(type) {
|
||||||
@@ -86,7 +91,7 @@ func loadPlugin(logger *zap.Logger, codePath, entrypoint string) (http.HandlerFu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func specializeHandler(logger *zap.Logger) func(http.ResponseWriter, *http.Request) {
|
func specializeHandler() func(http.ResponseWriter, *http.Request) {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
if userFunc != nil {
|
if userFunc != nil {
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
@@ -97,37 +102,33 @@ func specializeHandler(logger *zap.Logger) func(http.ResponseWriter, *http.Reque
|
|||||||
_, err := os.Stat(CODE_PATH)
|
_, err := os.Stat(CODE_PATH)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
|
log.Printf("code path (%v) does not exist: %v", CODE_PATH, err)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
logger.Error("code path does not exist",
|
|
||||||
zap.Error(err),
|
|
||||||
zap.String("code_path", CODE_PATH))
|
|
||||||
w.Write([]byte(CODE_PATH + ": not found"))
|
w.Write([]byte(CODE_PATH + ": not found"))
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
logger.Error("unknown error looking for code path",
|
log.Printf("unknown error looking for code path(%v): %v", CODE_PATH, err)
|
||||||
zap.Error(err),
|
err = fmt.Errorf("unknown error: %v", err)
|
||||||
zap.String("code_path", CODE_PATH))
|
|
||||||
err = errors.Wrap(err, "unknown error")
|
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info("specializing ...")
|
log.Println("specializing ...")
|
||||||
userFunc, err = loadPlugin(logger, CODE_PATH, "Handler")
|
userFunc, err = loadPlugin(CODE_PATH, "Handler")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e := "error specializing function"
|
err = fmt.Errorf("error specializing function: %v", err)
|
||||||
logger.Error(e, zap.Error(err))
|
log.Println(err.Error())
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
w.Write([]byte(errors.Wrap(err, e).Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logger.Info("done")
|
log.Println("done")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func specializeHandlerV2(logger *zap.Logger) func(http.ResponseWriter, *http.Request) {
|
func specializeHandlerV2() func(http.ResponseWriter, *http.Request) {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
if userFunc != nil {
|
if userFunc != nil {
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
@@ -137,7 +138,7 @@ func specializeHandlerV2(logger *zap.Logger) func(http.ResponseWriter, *http.Req
|
|||||||
|
|
||||||
body, err := ioutil.ReadAll(r.Body)
|
body, err := ioutil.ReadAll(r.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("error reading request body", zap.Error(err))
|
log.Printf("error reading request body: %v", err)
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -151,33 +152,29 @@ func specializeHandlerV2(logger *zap.Logger) func(http.ResponseWriter, *http.Req
|
|||||||
_, err = os.Stat(loadreq.FilePath)
|
_, err = os.Stat(loadreq.FilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
logger.Error("code path does not exist",
|
log.Printf("code path (%v) does not exist: %v", loadreq.FilePath, err)
|
||||||
zap.Error(err),
|
|
||||||
zap.String("code_path", loadreq.FilePath))
|
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
w.Write([]byte(loadreq.FilePath + ": not found"))
|
w.Write([]byte(loadreq.FilePath + ": not found"))
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
logger.Error("unknown error looking for code path",
|
log.Printf("unknown error looking for code path(%v): %v", loadreq.FilePath, err)
|
||||||
zap.Error(err),
|
err = fmt.Errorf("unknown error: %v", err)
|
||||||
zap.String("code_path", loadreq.FilePath))
|
|
||||||
err = errors.Wrap(err, "unknown error")
|
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info("specializing ...")
|
log.Println("specializing ...")
|
||||||
userFunc, err = loadPlugin(logger, loadreq.FilePath, loadreq.FunctionName)
|
userFunc, err = loadPlugin(loadreq.FilePath, loadreq.FunctionName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e := "error specializing function"
|
err = fmt.Errorf("error specializing function: %v", err)
|
||||||
logger.Error(e, zap.Error(err))
|
log.Println(err.Error())
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
w.Write([]byte(errors.Wrap(err, e).Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logger.Info("done")
|
log.Println("done")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,15 +183,10 @@ func readinessProbeHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
logger, err := zap.NewProduction()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("can't initialize zap logger: %v", err)
|
|
||||||
}
|
|
||||||
defer logger.Sync()
|
|
||||||
|
|
||||||
http.HandleFunc("/healthz", readinessProbeHandler)
|
http.HandleFunc("/healthz", readinessProbeHandler)
|
||||||
http.HandleFunc("/specialize", specializeHandler(logger.Named("specialize_handler")))
|
http.HandleFunc("/specialize", specializeHandler())
|
||||||
http.HandleFunc("/v2/specialize", specializeHandlerV2(logger.Named("specialize_v2_handler")))
|
http.HandleFunc("/v2/specialize", specializeHandlerV2())
|
||||||
|
|
||||||
// Generic route -- all http requests go to the user function.
|
// Generic route -- all http requests go to the user function.
|
||||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
@@ -206,6 +198,6 @@ func main() {
|
|||||||
userFunc(w, r)
|
userFunc(w, r)
|
||||||
})
|
})
|
||||||
|
|
||||||
logger.Info("listening on 8888 ...")
|
log.Println("listening on 8888 ...")
|
||||||
http.ListenAndServe(":8888", nil)
|
http.ListenAndServe(":8888", nil)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
<artifactId>fission-java-core</artifactId>
|
<artifactId>fission-java-core</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.2-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
|
<artifactId>jackson-dataformat-xml</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
rack (2.0.6)
|
daemons (1.3.1)
|
||||||
|
eventmachine (1.2.7)
|
||||||
|
rack (2.0.8)
|
||||||
|
thin (1.7.2)
|
||||||
|
daemons (~> 1.0, >= 1.0.9)
|
||||||
|
eventmachine (~> 1.0, >= 1.0.4)
|
||||||
|
rack (>= 1, < 3)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
rack
|
rack
|
||||||
|
thin
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.15.1
|
1.15.1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Hello World in JVM/Java on Fission
|
# Hello World in JVM/Java on Fission
|
||||||
|
|
||||||
The `io.fission.HelloWorld.java` class is a a very simple fission function that implements `io.fission.Function` and says "Hello, World!" .
|
The `io.fission.HelloWorld.java` class is a very simple fission function that implements `io.fission.Function` and says "Hello, World!" .
|
||||||
|
|
||||||
## Building and deploying using Fission
|
## Building and deploying using Fission
|
||||||
|
|
||||||
@@ -57,5 +57,4 @@ $ fission fn create --name hello --deploy target/hello-world-1.0-SNAPSHOT-jar-wi
|
|||||||
$ fission route create --function hello --url /hellop --method GET
|
$ fission route create --function hello --url /hellop --method GET
|
||||||
$ fission fn test --name hello
|
$ fission fn test --name hello
|
||||||
Hello World!
|
Hello World!
|
||||||
|
```
|
||||||
```
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: Environment
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: java
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
builder:
|
||||||
|
command: build
|
||||||
|
image: fission/jvm-builder:1.7.1
|
||||||
|
imagepullsecret: ""
|
||||||
|
keeparchive: true
|
||||||
|
poolsize: 3
|
||||||
|
resources: {}
|
||||||
|
runtime:
|
||||||
|
image: fission/jvm-env:1.7.1
|
||||||
|
version: 2
|
||||||
@@ -4,4 +4,4 @@
|
|||||||
apiVersion: fission.io/v1
|
apiVersion: fission.io/v1
|
||||||
kind: DeploymentConfig
|
kind: DeploymentConfig
|
||||||
name: java
|
name: java
|
||||||
uid: 3305cef5-21e6-4a55-b977-5c76ee62b0a6
|
uid: 908a303a-bf23-4bae-a22c-b1db9a1f71a9
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: Function
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: hello
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
InvokeStrategy:
|
||||||
|
ExecutionStrategy:
|
||||||
|
ExecutorType: poolmgr
|
||||||
|
MaxScale: 0
|
||||||
|
MinScale: 0
|
||||||
|
SpecializationTimeout: 120
|
||||||
|
TargetCPUPercent: 0
|
||||||
|
StrategyType: execution
|
||||||
|
configmaps: null
|
||||||
|
environment:
|
||||||
|
name: java
|
||||||
|
namespace: default
|
||||||
|
functionTimeout: 60
|
||||||
|
package:
|
||||||
|
functionName: io.fission.HelloWorld
|
||||||
|
packageref:
|
||||||
|
name: hellojava
|
||||||
|
namespace: default
|
||||||
|
resources: {}
|
||||||
|
secrets: null
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
include:
|
||||||
|
- src
|
||||||
|
- pom.xml
|
||||||
|
kind: ArchiveUploadSpec
|
||||||
|
name: src-URlE
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: Package
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: hellojava
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
deployment:
|
||||||
|
checksum: {}
|
||||||
|
environment:
|
||||||
|
name: java
|
||||||
|
namespace: default
|
||||||
|
source:
|
||||||
|
checksum: {}
|
||||||
|
type: url
|
||||||
|
url: archive://src-URlE
|
||||||
|
status:
|
||||||
|
buildstatus: pending
|
||||||
|
lastUpdateTimestamp: "2020-01-29T09:43:56Z"
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# Message Queue Trigger Demonstration - NATS Streaming
|
||||||
|
|
||||||
|
## Create spec
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ fission spec init
|
||||||
|
$ fission env create --name go --image fission/go-env-1.12:1.7.1 --builder fission/go-builder-1.12:1.7.1 --period 5 --spec
|
||||||
|
$ fission pkg create --name publisher --src mqtrigger/* --spec
|
||||||
|
$ fission fn create --name publisher --env go --pkg publisher --entrypoint "Handler" --spec
|
||||||
|
$ fission fn create --name hello --env go --src https://raw.githubusercontent.com/fission/fission/master/examples/go/hello.go --entrypoint "Handler" --spec
|
||||||
|
$ fission mqt create --name mqtrigger --function hello --mqtype nats-streaming --topic foobar --spec
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apply CRDs
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ fission spec apply
|
||||||
|
|
||||||
|
# wait for package build status become succeeded
|
||||||
|
$ fission pkg list
|
||||||
|
NAME BUILD_STATUS ENV LASTUPDATEDAT
|
||||||
|
hello-98476132-84ff-4e74-8b0f-2d1005871d1c succeeded go 19 Dec 19 17:31 UTC
|
||||||
|
publisher succeeded go 19 Dec 19 17:19 UTC
|
||||||
|
|
||||||
|
# you can rebuild the package if it shows failed
|
||||||
|
$ fission pkg rebuild --name <pkg-name>
|
||||||
|
|
||||||
|
$ fission fn test --name publisher
|
||||||
|
Publish Success
|
||||||
|
|
||||||
|
$ kubectl -n fission-function get pod -l functionName=hello
|
||||||
|
NAME READY STATUS RESTARTS AGE
|
||||||
|
poolmgr-go-default-610954-55664ccc68-b258c 2/2 Running 0 18m
|
||||||
|
|
||||||
|
# you should be able to see the function prints message
|
||||||
|
$ kubectl -n fission-function logs -f -c go poolmgr-go-default-610954-55664ccc68-b258c
|
||||||
|
{"level":"info","ts":1576775701.7085218,"caller":"go/server.go:209","msg":"listening on 8888 ..."}
|
||||||
|
{"level":"info","ts":1576776720.3545933,"logger":"specialize_v2_handler","caller":"go/server.go:171","msg":"specializing ..."}
|
||||||
|
{"level":"info","ts":1576776720.3546736,"logger":"specialize_v2_handler","caller":"go/server.go:62","msg":"loading plugin","location":"/userfunc/15382797-f381-48af-9189-561f45f9285c/hello-98476132-84ff-4e74-8b0f-2d1005871d1c-7693uh-pwsz5u"}
|
||||||
|
{"level":"info","ts":1576776720.3640525,"logger":"specialize_v2_handler","caller":"go/server.go:180","msg":"done"}
|
||||||
|
2019/12/19 17:32:00 Hello, world!
|
||||||
|
```
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Handler is the entry point for this fission function
|
||||||
|
func Handler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
log.Print("Hello, world!")
|
||||||
|
msg := "Hello, world!\n"
|
||||||
|
w.Write([]byte(msg))
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
module github.com/fission/mqtrigger
|
||||||
|
|
||||||
|
go 1.12
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/gogo/protobuf v1.3.1 // indirect
|
||||||
|
github.com/nats-io/go-nats v1.7.2 // indirect
|
||||||
|
github.com/nats-io/go-nats-streaming v0.4.4
|
||||||
|
github.com/nats-io/nkeys v0.1.3 // indirect
|
||||||
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
|
github.com/satori/go.uuid v1.2.0 // indirect
|
||||||
|
)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
|
||||||
|
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||||
|
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||||
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
|
github.com/nats-io/go-nats v1.7.2 h1:cJujlwCYR8iMz5ofZSD/p2WLW8FabhkQ2lIEVbSvNSA=
|
||||||
|
github.com/nats-io/go-nats v1.7.2/go.mod h1:+t7RHT5ApZebkrQdnn6AhQJmhJJiKAvJUio1PiiCtj0=
|
||||||
|
github.com/nats-io/go-nats-streaming v0.4.4 h1:1I3lkZDRdQYXb+holjdqZ2J6xyekrD06o9Fd8rWlgP4=
|
||||||
|
github.com/nats-io/go-nats-streaming v0.4.4/go.mod h1:gfq4R3c9sKAINOpelo0gn/b9QDMBZnmrttcsNF+lqyo=
|
||||||
|
github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k=
|
||||||
|
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||||
|
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||||
|
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||||
|
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||||
|
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
|
||||||
|
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
nats "github.com/nats-io/go-nats-streaming"
|
||||||
|
uuid "github.com/satori/go.uuid"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
authToken = "defaultFissionAuthToken"
|
||||||
|
host = "nats-streaming.fission"
|
||||||
|
clusterID = "fissionMQTrigger"
|
||||||
|
topic = "foobar"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Handler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
addr := fmt.Sprintf("nats://%v@%v:4222", authToken, host)
|
||||||
|
nc, err := nats.Connect(clusterID, uuid.NewV4().String(), nats.NatsURL(addr))
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Printf("Publishing message to topic '%v'\n", topic)
|
||||||
|
|
||||||
|
err = nc.Publish(topic, []byte("dummy"))
|
||||||
|
if err != nil {
|
||||||
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
|
w.Write([]byte(err.Error()))
|
||||||
|
log.Printf("error sending message to topic: %v", err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
nc.Close()
|
||||||
|
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
w.Write([]byte("Publish Success"))
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
Fission Specs
|
||||||
|
=============
|
||||||
|
|
||||||
|
This is a set of specifications for a Fission app. This includes functions,
|
||||||
|
environments, and triggers; we collectively call these things "resources".
|
||||||
|
|
||||||
|
How to use these specs
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
These specs are handled with the 'fission spec' command. See 'fission spec --help'.
|
||||||
|
|
||||||
|
'fission spec apply' will "apply" all resources specified in this directory to your
|
||||||
|
cluster. That means it checks what resources exist on your cluster, what resources are
|
||||||
|
specified in the specs directory, and reconciles the difference by creating, updating or
|
||||||
|
deleting resources on the cluster.
|
||||||
|
|
||||||
|
'fission spec apply' will also package up your source code (or compiled binaries) and
|
||||||
|
upload the archives to the cluster if needed. It uses 'ArchiveUploadSpec' resources in
|
||||||
|
this directory to figure out which files to archive.
|
||||||
|
|
||||||
|
You can use 'fission spec apply --watch' to watch for file changes and continuously keep
|
||||||
|
the cluster updated.
|
||||||
|
|
||||||
|
You can add YAMLs to this directory by writing them manually, but it's easier to generate
|
||||||
|
them. Use 'fission function create --spec' to generate a function spec,
|
||||||
|
'fission environment create --spec' to generate an environment spec, and so on.
|
||||||
|
|
||||||
|
You can edit any of the files in this directory, except 'fission-deployment-config.yaml',
|
||||||
|
which contains a UID that you should never change. To apply your changes simply use
|
||||||
|
'fission spec apply'.
|
||||||
|
|
||||||
|
fission-deployment-config.yaml
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
fission-deployment-config.yaml contains a UID. This UID is what fission uses to correlate
|
||||||
|
resources on the cluster to resources in this directory.
|
||||||
|
|
||||||
|
All resources created by 'fission spec apply' are annotated with this UID. Resources on
|
||||||
|
the cluster that are _not_ annotated with this UID are never modified or deleted by
|
||||||
|
fission.
|
||||||
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: Environment
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: go
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
builder:
|
||||||
|
command: build
|
||||||
|
image: fission/go-builder-1.12:1.7.1
|
||||||
|
imagepullsecret: ""
|
||||||
|
keeparchive: false
|
||||||
|
poolsize: 3
|
||||||
|
resources: {}
|
||||||
|
runtime:
|
||||||
|
image: fission/go-env-1.12:1.7.1
|
||||||
|
version: 2
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# This file is generated by the 'fission spec init' command.
|
||||||
|
# See the README in this directory for background and usage information.
|
||||||
|
# Do not edit the UID below: that will break 'fission spec apply'
|
||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: DeploymentConfig
|
||||||
|
name: nats-streaming
|
||||||
|
uid: 9d6b82e4-3d73-49de-9007-1e47fbc377de
|
||||||
+14
-12
@@ -1,52 +1,54 @@
|
|||||||
include:
|
include:
|
||||||
- src/
|
- hello.go
|
||||||
- pom.xml
|
|
||||||
kind: ArchiveUploadSpec
|
kind: ArchiveUploadSpec
|
||||||
name: helloworld-java
|
name: hello-go-zqZW
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: fission.io/v1
|
apiVersion: fission.io/v1
|
||||||
kind: Package
|
kind: Package
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: helloworld-java-127w
|
name: hello-98476132-84ff-4e74-8b0f-2d1005871d1c
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
deployment:
|
deployment:
|
||||||
checksum: {}
|
checksum: {}
|
||||||
environment:
|
environment:
|
||||||
name: java
|
name: go
|
||||||
namespace: default
|
namespace: default
|
||||||
source:
|
source:
|
||||||
checksum: {}
|
checksum: {}
|
||||||
type: url
|
type: url
|
||||||
url: archive://helloworld-java
|
url: archive://hello-go-zqZW
|
||||||
status:
|
status:
|
||||||
buildstatus: pending
|
buildstatus: pending
|
||||||
|
lastUpdateTimestamp: "2019-12-19T17:31:23.43918Z"
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: fission.io/v1
|
apiVersion: fission.io/v1
|
||||||
kind: Function
|
kind: Function
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: hello-java
|
name: hello
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
InvokeStrategy:
|
InvokeStrategy:
|
||||||
ExecutionStrategy:
|
ExecutionStrategy:
|
||||||
ExecutorType: poolmgr
|
ExecutorType: poolmgr
|
||||||
MaxScale: 1
|
MaxScale: 0
|
||||||
MinScale: 0
|
MinScale: 0
|
||||||
TargetCPUPercent: 80
|
SpecializationTimeout: 120
|
||||||
|
TargetCPUPercent: 0
|
||||||
StrategyType: execution
|
StrategyType: execution
|
||||||
configmaps: null
|
configmaps: null
|
||||||
environment:
|
environment:
|
||||||
name: java
|
name: go
|
||||||
namespace: default
|
namespace: default
|
||||||
|
functionTimeout: 60
|
||||||
package:
|
package:
|
||||||
functionName: io.fission.HelloWorld
|
functionName: Handler
|
||||||
packageref:
|
packageref:
|
||||||
name: helloworld-java-127w
|
name: hello-98476132-84ff-4e74-8b0f-2d1005871d1c
|
||||||
namespace: default
|
namespace: default
|
||||||
resources: {}
|
resources: {}
|
||||||
secrets: null
|
secrets: null
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: Function
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: publisher
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
InvokeStrategy:
|
||||||
|
ExecutionStrategy:
|
||||||
|
ExecutorType: poolmgr
|
||||||
|
MaxScale: 0
|
||||||
|
MinScale: 0
|
||||||
|
SpecializationTimeout: 120
|
||||||
|
TargetCPUPercent: 0
|
||||||
|
StrategyType: execution
|
||||||
|
configmaps: null
|
||||||
|
environment:
|
||||||
|
name: go
|
||||||
|
namespace: default
|
||||||
|
functionTimeout: 60
|
||||||
|
package:
|
||||||
|
functionName: Handler
|
||||||
|
packageref:
|
||||||
|
name: publisher
|
||||||
|
namespace: default
|
||||||
|
resources: {}
|
||||||
|
secrets: null
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
include:
|
||||||
|
- mqtrigger/*
|
||||||
|
kind: ArchiveUploadSpec
|
||||||
|
name: mqtrigger-Z3l6
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: fission.io/v1
|
||||||
|
kind: Package
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: publisher
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
deployment:
|
||||||
|
checksum: {}
|
||||||
|
environment:
|
||||||
|
name: go
|
||||||
|
namespace: default
|
||||||
|
source:
|
||||||
|
checksum: {}
|
||||||
|
type: url
|
||||||
|
url: archive://mqtrigger-Z3l6
|
||||||
|
status:
|
||||||
|
buildstatus: pending
|
||||||
|
lastUpdateTimestamp: "2019-12-19T17:18:45.81397Z"
|
||||||
@@ -4,6 +4,14 @@ metadata:
|
|||||||
name: hello
|
name: hello
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
|
InvokeStrategy:
|
||||||
|
ExecutionStrategy:
|
||||||
|
ExecutorType: poolmgr
|
||||||
|
MaxScale: 0
|
||||||
|
MinScale: 0
|
||||||
|
SpecializationTimeout: 120
|
||||||
|
TargetCPUPercent: 0
|
||||||
|
StrategyType: execution
|
||||||
environment:
|
environment:
|
||||||
name: python-27
|
name: python-27
|
||||||
namespace: default
|
namespace: default
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ require (
|
|||||||
github.com/gogo/protobuf v1.2.1 // indirect
|
github.com/gogo/protobuf v1.2.1 // indirect
|
||||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
|
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
|
||||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
|
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
|
||||||
github.com/golang/protobuf v1.3.1
|
|
||||||
github.com/gomodule/redigo v0.0.0-20180627144507-2cd21d9966bf
|
|
||||||
github.com/google/gofuzz v1.0.0 // indirect
|
github.com/google/gofuzz v1.0.0 // indirect
|
||||||
github.com/googleapis/gnostic v0.3.0 // indirect
|
github.com/googleapis/gnostic v0.3.0 // indirect
|
||||||
github.com/gophercloud/gophercloud v0.2.0 // indirect
|
github.com/gophercloud/gophercloud v0.2.0 // indirect
|
||||||
@@ -63,7 +61,6 @@ require (
|
|||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/stretchr/testify v1.3.0
|
github.com/stretchr/testify v1.3.0
|
||||||
github.com/ulikunitz/xz v0.0.0-20180703112113-636d36a76670 // indirect
|
github.com/ulikunitz/xz v0.0.0-20180703112113-636d36a76670 // indirect
|
||||||
github.com/urfave/cli v1.20.0
|
|
||||||
github.com/wcharczuk/go-chart v2.0.1+incompatible
|
github.com/wcharczuk/go-chart v2.0.1+incompatible
|
||||||
go.etcd.io/bbolt v1.3.2 // indirect
|
go.etcd.io/bbolt v1.3.2 // indirect
|
||||||
go.opencensus.io v0.22.0
|
go.opencensus.io v0.22.0
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1
|
|||||||
github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||||
github.com/emicklei/go-restful-openapi v1.2.0 h1:ohRZ1yEZERGzqaozBgxa3A0lt6c6KF14xhs3IL9ECwg=
|
github.com/emicklei/go-restful-openapi v1.2.0 h1:ohRZ1yEZERGzqaozBgxa3A0lt6c6KF14xhs3IL9ECwg=
|
||||||
github.com/emicklei/go-restful-openapi v1.2.0/go.mod h1:cy7o3Ge8ZWZ5E90mpEY81sJZZFs2pkuYcLvfngYy1l0=
|
github.com/emicklei/go-restful-openapi v1.2.0/go.mod h1:cy7o3Ge8ZWZ5E90mpEY81sJZZFs2pkuYcLvfngYy1l0=
|
||||||
|
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550 h1:mV9jbLoSW/8m4VK16ZkHTozJa8sesK5u5kTMFysTYac=
|
||||||
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
@@ -149,8 +150,6 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg
|
|||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
|
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
|
||||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/gomodule/redigo v0.0.0-20180627144507-2cd21d9966bf h1:QiyWcEIeOkPTyeLwN4mguSULP/PWjmejPsU9elZAOeY=
|
|
||||||
github.com/gomodule/redigo v0.0.0-20180627144507-2cd21d9966bf/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
|
||||||
github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
@@ -333,8 +332,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1
|
|||||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||||
github.com/ulikunitz/xz v0.0.0-20180703112113-636d36a76670 h1:HQWT4ta3wW5GZ790GaqLCS+w1dvuA3rMfEQxLi+UOYU=
|
github.com/ulikunitz/xz v0.0.0-20180703112113-636d36a76670 h1:HQWT4ta3wW5GZ790GaqLCS+w1dvuA3rMfEQxLi+UOYU=
|
||||||
github.com/ulikunitz/xz v0.0.0-20180703112113-636d36a76670/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
|
github.com/ulikunitz/xz v0.0.0-20180703112113-636d36a76670/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
|
||||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
|
||||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
|
||||||
github.com/wcharczuk/go-chart v2.0.1+incompatible h1:0pz39ZAycJFF7ju/1mepnk26RLVLBCWz1STcD3doU0A=
|
github.com/wcharczuk/go-chart v2.0.1+incompatible h1:0pz39ZAycJFF7ju/1mepnk26RLVLBCWz1STcD3doU0A=
|
||||||
github.com/wcharczuk/go-chart v2.0.1+incompatible/go.mod h1:PF5tmL4EIx/7Wf+hEkpCqYi5He4u90sw+0+6FhrryuE=
|
github.com/wcharczuk/go-chart v2.0.1+incompatible/go.mod h1:PF5tmL4EIx/7Wf+hEkpCqYi5He4u90sw+0+6FhrryuE=
|
||||||
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
@@ -504,6 +501,7 @@ k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8
|
|||||||
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||||
k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c=
|
k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c=
|
||||||
k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||||
|
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30 h1:TRb4wNWoBVrH9plmkp2q86FIDppkbrEXdXlxU3a3BMI=
|
||||||
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
|
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
|
||||||
k8s.io/utils v0.0.0-20190221042446-c2654d5206da h1:ElyM7RPonbKnQqOcw7dG2IK5uvQQn3b/WPHqD5mBvP4=
|
k8s.io/utils v0.0.0-20190221042446-c2654d5206da h1:ElyM7RPonbKnQqOcw7dG2IK5uvQQn3b/WPHqD5mBvP4=
|
||||||
k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
|
k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ build_all_envs() {
|
|||||||
build_env_image "$version" "go" "go-env" ""
|
build_env_image "$version" "go" "go-env" ""
|
||||||
build_env_image "$version" "go" "go-env" "1.11.4"
|
build_env_image "$version" "go" "go-env" "1.11.4"
|
||||||
build_env_image "$version" "go" "go-env" "1.12"
|
build_env_image "$version" "go" "go-env" "1.12"
|
||||||
|
build_env_image "$version" "go" "go-env" "1.13"
|
||||||
build_env_image "$version" "perl" "perl-env" ""
|
build_env_image "$version" "perl" "perl-env" ""
|
||||||
build_env_image "$version" "php7" "php-env" ""
|
build_env_image "$version" "php7" "php-env" ""
|
||||||
build_env_image "$version" "python" "python-env" ""
|
build_env_image "$version" "python" "python-env" ""
|
||||||
@@ -182,6 +183,7 @@ build_all_env_builders() {
|
|||||||
build_env_builder_image "$version" "go" "go-builder" ""
|
build_env_builder_image "$version" "go" "go-builder" ""
|
||||||
build_env_builder_image "$version" "go" "go-builder" "1.11.4"
|
build_env_builder_image "$version" "go" "go-builder" "1.11.4"
|
||||||
build_env_builder_image "$version" "go" "go-builder" "1.12"
|
build_env_builder_image "$version" "go" "go-builder" "1.12"
|
||||||
|
build_env_builder_image "$version" "go" "go-builder" "1.13"
|
||||||
build_env_builder_image "$version" "jvm" "jvm-builder" ""
|
build_env_builder_image "$version" "jvm" "jvm-builder" ""
|
||||||
build_env_builder_image "$version" "nodejs" "node-builder" ""
|
build_env_builder_image "$version" "nodejs" "node-builder" ""
|
||||||
build_env_builder_image "$version" "php7" "php-builder" ""
|
build_env_builder_image "$version" "php7" "php-builder" ""
|
||||||
@@ -282,13 +284,13 @@ build_all() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
generate_swagger_doc() {
|
generate_swagger_doc() {
|
||||||
pushd $DIR/pkg/apis/fission.io/v1/tool
|
pushd $DIR/pkg/apis/core/v1/tool
|
||||||
./update-generated-swagger-docs.sh
|
./update-generated-swagger-docs.sh
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_generated_swagger_doc() {
|
remove_generated_swagger_doc() {
|
||||||
rm $DIR/pkg/apis/fission.io/v1/types_swagger_doc_generated.go
|
rm $DIR/pkg/apis/core/v1/types_swagger_doc_generated.go
|
||||||
}
|
}
|
||||||
|
|
||||||
version=${VERSION}
|
version=${VERSION}
|
||||||
|
|||||||
+12
-9
@@ -81,6 +81,7 @@ push_all_envs() {
|
|||||||
push_env_image "$version" "go" "go-env" ""
|
push_env_image "$version" "go" "go-env" ""
|
||||||
push_env_image "$version" "go" "go-env" "1.11.4"
|
push_env_image "$version" "go" "go-env" "1.11.4"
|
||||||
push_env_image "$version" "go" "go-env" "1.12"
|
push_env_image "$version" "go" "go-env" "1.12"
|
||||||
|
push_env_image "$version" "go" "go-env" "1.13"
|
||||||
push_env_image "$version" "perl" "perl-env" ""
|
push_env_image "$version" "perl" "perl-env" ""
|
||||||
push_env_image "$version" "php7" "php-env" ""
|
push_env_image "$version" "php7" "php-env" ""
|
||||||
push_env_image "$version" "python" "python-env" ""
|
push_env_image "$version" "python" "python-env" ""
|
||||||
@@ -115,15 +116,17 @@ push_all_env_builders() {
|
|||||||
local version=$1
|
local version=$1
|
||||||
|
|
||||||
# call with version, env dir, image name base, image name variant
|
# call with version, env dir, image name base, image name variant
|
||||||
push_env_builder_image "$version" "python" "python-builder" ""
|
push_env_builder_image "$version" "python" "python-builder" ""
|
||||||
push_env_builder_image "$version" "binary" "binary-builder" ""
|
push_env_builder_image "$version" "binary" "binary-builder" ""
|
||||||
push_env_builder_image "$version" "go" "go-builder" ""
|
push_env_builder_image "$version" "go" "go-builder" ""
|
||||||
push_env_builder_image "$version" "go" "go-builder" "1.11.4"
|
push_env_builder_image "$version" "go" "go-builder" "1.11.4"
|
||||||
push_env_builder_image "$version" "go" "go-builder" "1.12"
|
push_env_builder_image "$version" "go" "go-builder" "1.12"
|
||||||
push_env_builder_image "$version" "jvm" "jvm-builder" ""
|
push_env_builder_image "$version" "go" "go-builder" "1.13"
|
||||||
push_env_builder_image "$version" "nodejs" "node-builder" ""
|
push_env_builder_image "$version" "jvm" "jvm-builder" ""
|
||||||
push_env_builder_image "$version" "ruby" "ruby-builder" ""
|
push_env_builder_image "$version" "nodejs" "node-builder" ""
|
||||||
push_env_builder_image "$version" "dotnet20" "dotnet20-builder" ""
|
push_env_builder_image "$version" "ruby" "ruby-builder" ""
|
||||||
|
push_env_builder_image "$version" "dotnet20" "dotnet20-builder" ""
|
||||||
|
push_env_builder_image "$version" "php7" "php-builder" ""
|
||||||
}
|
}
|
||||||
|
|
||||||
# Push pre-upgrade-checks image
|
# Push pre-upgrade-checks image
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ echo $FISSION_CI_SERVICE_ACCOUNT | base64 -d - > ${HOME}/gcloud-service-key.json
|
|||||||
gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
|
gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
|
||||||
|
|
||||||
# get kube config
|
# get kube config
|
||||||
gcloud container clusters get-credentials fission-ci-1 --zone us-central1-a --project fission-ci
|
gcloud container clusters get-credentials fission-ci --zone us-central1-a --project $GKE_PROJECT_NAME
|
||||||
|
|
||||||
# remove gcloud creds
|
# remove gcloud creds
|
||||||
unset FISSION_CI_SERVICE_ACCOUNT
|
unset FISSION_CI_SERVICE_ACCOUNT
|
||||||
@@ -91,3 +91,19 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
kubectl get node
|
kubectl get node
|
||||||
|
|
||||||
|
# install helm tiller. It will no longer needed as we upgrade to Helmv3.
|
||||||
|
if ! helm list >/dev/null 2>&1 ; then
|
||||||
|
echo "Installing helm..."
|
||||||
|
kubectl -n kube-system create sa tiller
|
||||||
|
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
|
||||||
|
helm init --service-account tiller
|
||||||
|
|
||||||
|
printf "Waiting for Helm"
|
||||||
|
until helm list >/dev/null 2>&1
|
||||||
|
do
|
||||||
|
printf "."
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
printf "\n"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
go vet -v $(go list ./...| grep -v "vendor" | grep -v "examples" | grep -v "demos" | grep -v "test")
|
go vet -v $(go list ./...| grep -v "vendor" | grep -v "examples" | grep -v "genclient" | grep -v "demos" | grep -v "test")
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
go list ./...| grep -v vendor | grep -v "examples" | grep -v "demos" | grep -v "test" | xargs -I@ staticcheck @
|
go list ./...| grep -v vendor | grep -v "examples" | grep -v "demos" | grep -v "genclient" | grep -v "test" | xargs -I@ staticcheck @
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Fission CRD generation
|
||||||
|
|
||||||
|
* Clone https://github.com/fission/code-generator to generate fission CRD object deepcopy and client methods.
|
||||||
|
* MUST run code-generator in the fission root directory.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
$ cd $GOPATH/src/github.com/fission/fission/
|
||||||
|
$ bash $GOPATH/src/k8s.io/code-generator/generate-groups.sh \
|
||||||
|
all \
|
||||||
|
github.com/fission/fission/pkg/apis/genclient \
|
||||||
|
github.com/fission/fission/pkg/apis \
|
||||||
|
"core:v1" \
|
||||||
|
--go-header-file $GOPATH/src/github.com/fission/fission/pkg/apis/boilerplate.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
# Reference
|
||||||
|
|
||||||
|
* https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
@@ -105,3 +105,42 @@ const (
|
|||||||
const (
|
const (
|
||||||
DefaultSpecializationTimeOut = 120
|
DefaultSpecializationTimeOut = 120
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
FETCH_SOURCE = iota
|
||||||
|
FETCH_DEPLOYMENT
|
||||||
|
FETCH_URL
|
||||||
|
)
|
||||||
|
|
||||||
|
// executor kubernetes object label key
|
||||||
|
const (
|
||||||
|
ENVIRONMENT_NAMESPACE = "environmentNamespace"
|
||||||
|
ENVIRONMENT_NAME = "environmentName"
|
||||||
|
ENVIRONMENT_UID = "environmentUid"
|
||||||
|
FUNCTION_NAMESPACE = "functionNamespace"
|
||||||
|
FUNCTION_NAME = "functionName"
|
||||||
|
FUNCTION_UID = "functionUid"
|
||||||
|
FUNCTION_RESOURCE_VERSION = "functionResourceVersion"
|
||||||
|
EXECUTOR_TYPE = "executorType"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
ANNOTATION_SVC_HOST = "svcHost"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
ArchiveLiteralSizeLimit int64 = 256 * 1024
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
FissionBuilderSA = "fission-builder"
|
||||||
|
FissionFetcherSA = "fission-fetcher"
|
||||||
|
|
||||||
|
SecretConfigMapGetterCR = "secret-configmap-getter"
|
||||||
|
SecretConfigMapGetterRB = "secret-configmap-getter-binding"
|
||||||
|
|
||||||
|
PackageGetterCR = "package-getter"
|
||||||
|
PackageGetterRB = "package-getter-binding"
|
||||||
|
|
||||||
|
ClusterRole = "ClusterRole"
|
||||||
|
)
|
||||||
@@ -20,10 +20,15 @@ limitations under the License.
|
|||||||
// +k8s:deepcopy-gen=package
|
// +k8s:deepcopy-gen=package
|
||||||
// +k8s:defaulter-gen=TypeMeta
|
// +k8s:defaulter-gen=TypeMeta
|
||||||
// +groupName=fission.io
|
// +groupName=fission.io
|
||||||
|
// +groupGoName=core
|
||||||
|
//
|
||||||
|
// In order not to break the backward compatibility, keep coreV1 types stay
|
||||||
|
// at "fission.io" group instead of moving them to "core.fission.io".
|
||||||
|
// If the value of group is different from the one we register, the
|
||||||
|
// CRD client will not be able to get anything from the API server.
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CRD_VERSION = "fission.io/v1"
|
CRD_VERSION = "fission.io/v1"
|
||||||
|
|
||||||
CRD_NAME_ENVIRONMENT = "Environment"
|
CRD_NAME_ENVIRONMENT = "Environment"
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// The file comes from Kubernetes code-generator repo with custom modification.
|
||||||
|
// https://github.com/kubernetes/code-generator/blob/0826954c61ed88ac5d75e771ade6aae646ca5268/_examples/HyphenGroup/apis/example/v1/register.go
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
)
|
||||||
|
|
||||||
|
// In order not to break the backward compatibility, keep coreV1 types stay
|
||||||
|
// at "fission.io" group instead of moving them to "core.fission.io".
|
||||||
|
// If the value of group is different from the one we register, the
|
||||||
|
// CRD client will not be able to get anything from the API server.
|
||||||
|
var SchemeGroupVersion = schema.GroupVersion{Group: "fission.io", Version: "v1"}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
|
||||||
|
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
|
||||||
|
SchemeBuilder runtime.SchemeBuilder
|
||||||
|
localSchemeBuilder = &SchemeBuilder
|
||||||
|
AddToScheme = localSchemeBuilder.AddToScheme
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// We only register manually written functions here. The registration of the
|
||||||
|
// generated functions takes place in the generated files. The separation
|
||||||
|
// makes the code compile even when the generated files are missing.
|
||||||
|
localSchemeBuilder.Register(addKnownTypes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
|
func Resource(resource string) schema.GroupResource {
|
||||||
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds the list of known types to the given scheme.
|
||||||
|
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||||
|
scheme.AddKnownTypes(
|
||||||
|
SchemeGroupVersion,
|
||||||
|
&Function{},
|
||||||
|
&FunctionList{},
|
||||||
|
&Environment{},
|
||||||
|
&EnvironmentList{},
|
||||||
|
&HTTPTrigger{},
|
||||||
|
&HTTPTriggerList{},
|
||||||
|
&KubernetesWatchTrigger{},
|
||||||
|
&KubernetesWatchTriggerList{},
|
||||||
|
&TimeTrigger{},
|
||||||
|
&TimeTriggerList{},
|
||||||
|
&MessageQueueTrigger{},
|
||||||
|
&MessageQueueTriggerList{},
|
||||||
|
&Package{},
|
||||||
|
&PackageList{},
|
||||||
|
&CanaryConfig{},
|
||||||
|
&CanaryConfigList{},
|
||||||
|
)
|
||||||
|
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -17,14 +17,11 @@ limitations under the License.
|
|||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
|
||||||
|
|
||||||
apiv1 "k8s.io/api/core/v1"
|
apiv1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// To add a Fission CRD type:
|
// To add a Fission CRD type:
|
||||||
// 1. Create a "spec" type, for everything in the type except metadata
|
// 1. Create a "spec" type, for everything in the type except metadata
|
||||||
@@ -42,11 +39,13 @@ import (
|
|||||||
type (
|
type (
|
||||||
|
|
||||||
// Packages. Think of these as function-level images.
|
// Packages. Think of these as function-level images.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
Package struct {
|
Package struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec PackageSpec `json:"spec"`
|
|
||||||
|
Spec PackageSpec `json:"spec"`
|
||||||
|
|
||||||
// Status indicates the build status of package.
|
// Status indicates the build status of package.
|
||||||
Status PackageStatus `json:"status"`
|
Status PackageStatus `json:"status"`
|
||||||
@@ -56,121 +55,130 @@ type (
|
|||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
PackageList struct {
|
PackageList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
Items []Package `json:"items"`
|
Items []Package `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function is function runs within environment runtime with given package and secrets/configmaps.
|
// Function is function runs within environment runtime with given package and secrets/configmaps.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
Function struct {
|
Function struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec FunctionSpec `json:"spec"`
|
Spec FunctionSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FunctionList is a list of Functions.
|
// FunctionList is a list of Functions.
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
FunctionList struct {
|
FunctionList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
Items []Function `json:"items"`
|
Items []Function `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Environment is environment for building and running user functions.
|
// Environment is environment for building and running user functions.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
Environment struct {
|
Environment struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec EnvironmentSpec `json:"spec"`
|
Spec EnvironmentSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnvironmentList is a list of Environments.
|
// EnvironmentList is a list of Environments.
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
EnvironmentList struct {
|
EnvironmentList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
Items []Environment `json:"items"`
|
Items []Environment `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTPTrigger is the trigger invokes user functions when receiving HTTP requests.
|
// HTTPTrigger is the trigger invokes user functions when receiving HTTP requests.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
HTTPTrigger struct {
|
HTTPTrigger struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec HTTPTriggerSpec `json:"spec"`
|
Spec HTTPTriggerSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTPTriggerList is a list of HTTPTriggers
|
// HTTPTriggerList is a list of HTTPTriggers
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
HTTPTriggerList struct {
|
HTTPTriggerList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
Items []HTTPTrigger `json:"items"`
|
Items []HTTPTrigger `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// KubernetesWatchTrigger watches kubernetes resource events and invokes functions.
|
// KubernetesWatchTrigger watches kubernetes resource events and invokes functions.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
KubernetesWatchTrigger struct {
|
KubernetesWatchTrigger struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec KubernetesWatchTriggerSpec `json:"spec"`
|
Spec KubernetesWatchTriggerSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// KubernetesWatchTriggerList is a list of KubernetesWatchTriggers
|
// KubernetesWatchTriggerList is a list of KubernetesWatchTriggers
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
KubernetesWatchTriggerList struct {
|
KubernetesWatchTriggerList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
Items []KubernetesWatchTrigger `json:"items"`
|
Items []KubernetesWatchTrigger `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TimeTrigger invokes functions based on given cron schedule.
|
// TimeTrigger invokes functions based on given cron schedule.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
TimeTrigger struct {
|
TimeTrigger struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec TimeTriggerSpec `json:"spec"`
|
|
||||||
|
Spec TimeTriggerSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TimeTriggerList is a list of TimeTriggers.
|
// TimeTriggerList is a list of TimeTriggers.
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
TimeTriggerList struct {
|
TimeTriggerList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
|
|
||||||
Items []TimeTrigger `json:"items"`
|
Items []TimeTrigger `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to.
|
// MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
MessageQueueTrigger struct {
|
MessageQueueTrigger struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec MessageQueueTriggerSpec `json:"spec"`
|
|
||||||
|
Spec MessageQueueTriggerSpec `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MessageQueueTriggerList is a list of MessageQueueTriggers.
|
// MessageQueueTriggerList is a list of MessageQueueTriggers.
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
MessageQueueTriggerList struct {
|
MessageQueueTriggerList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
Items []MessageQueueTrigger `json:"items"`
|
Items []MessageQueueTrigger `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CanaryConfig is for canary deployment of two functions.
|
// CanaryConfig is for canary deployment of two functions.
|
||||||
|
// +genclient
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
CanaryConfig struct {
|
CanaryConfig struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ObjectMeta `json:"metadata"`
|
metav1.ObjectMeta `json:"metadata"`
|
||||||
Spec CanaryConfigSpec `json:"spec"`
|
Spec CanaryConfigSpec `json:"spec"`
|
||||||
Status CanaryConfigStatus `json:"status"`
|
Status CanaryConfigStatus `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CanaryConfigList is a list of CanaryConfigs.
|
// CanaryConfigList is a list of CanaryConfigs.
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
CanaryConfigList struct {
|
CanaryConfigList struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
Metadata metav1.ListMeta `json:"metadata"`
|
metav1.ListMeta `json:"metadata"`
|
||||||
|
|
||||||
Items []CanaryConfig `json:"items"`
|
Items []CanaryConfig `json:"items"`
|
||||||
}
|
}
|
||||||
@@ -260,6 +268,9 @@ type (
|
|||||||
|
|
||||||
// PackageStatus contains the build status of a package also the build log for examination.
|
// PackageStatus contains the build status of a package also the build log for examination.
|
||||||
PackageStatus struct {
|
PackageStatus struct {
|
||||||
|
// TODO: Add another status field to indicate whether a package
|
||||||
|
// is ready for deploy instead of setting "none" in build status.
|
||||||
|
|
||||||
// BuildStatus is the package build status.
|
// BuildStatus is the package build status.
|
||||||
BuildStatus BuildStatus `json:"buildstatus,omitempty"`
|
BuildStatus BuildStatus `json:"buildstatus,omitempty"`
|
||||||
|
|
||||||
@@ -267,7 +278,9 @@ type (
|
|||||||
BuildLog string `json:"buildlog,omitempty"` // output of the build (errors etc)
|
BuildLog string `json:"buildlog,omitempty"` // output of the build (errors etc)
|
||||||
|
|
||||||
// LastUpdateTimestamp will store the timestamp the package was last updated
|
// LastUpdateTimestamp will store the timestamp the package was last updated
|
||||||
LastUpdateTimestamp time.Time `json:"lastUpdateTimestamp,omitempty"`
|
// metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
|
||||||
|
// https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
|
||||||
|
LastUpdateTimestamp metav1.Time `json:"lastUpdateTimestamp,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackageRef is a reference to the package.
|
// PackageRef is a reference to the package.
|
||||||
@@ -666,4 +679,15 @@ type (
|
|||||||
CanaryConfigStatus struct {
|
CanaryConfigStatus struct {
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MetadataAccessor lets you work with object metadata and type metadata
|
||||||
|
// from any of the versioned or internal API objects.
|
||||||
|
MetadataAccessor interface {
|
||||||
|
GetObjectKind() schema.ObjectKind
|
||||||
|
GetObjectMeta() metav1.Object
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (a Archive) IsEmpty() bool {
|
||||||
|
return len(a.Literal) == 0 && len(a.URL) == 0
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@ import (
|
|||||||
"github.com/hashicorp/go-multierror"
|
"github.com/hashicorp/go-multierror"
|
||||||
nsUtil "github.com/nats-io/nats-streaming-server/util"
|
nsUtil "github.com/nats-io/nats-streaming-server/util"
|
||||||
"github.com/robfig/cron"
|
"github.com/robfig/cron"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/validation"
|
"k8s.io/apimachinery/pkg/util/validation"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -556,3 +557,135 @@ func (spec TimeTriggerSpec) Validate() error {
|
|||||||
|
|
||||||
return result.ErrorOrNil()
|
return result.ErrorOrNil()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validateMetadata(field string, m metav1.ObjectMeta) error {
|
||||||
|
return ValidateKubeReference(field, m.Name, m.Namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *Package) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("Package", p.ObjectMeta),
|
||||||
|
p.Spec.Validate(),
|
||||||
|
p.Status.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (pl *PackageList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
// not validate ListMeta
|
||||||
|
for _, p := range pl.Items {
|
||||||
|
result = multierror.Append(result, p.Validate())
|
||||||
|
}
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *Function) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("Function", f.ObjectMeta),
|
||||||
|
f.Spec.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fl *FunctionList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
for _, f := range fl.Items {
|
||||||
|
result = multierror.Append(result, f.Validate())
|
||||||
|
}
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *Environment) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("Environment", e.ObjectMeta),
|
||||||
|
e.Spec.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (el *EnvironmentList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
for _, e := range el.Items {
|
||||||
|
result = multierror.Append(result, e.Validate())
|
||||||
|
}
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *HTTPTrigger) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("HTTPTrigger", h.ObjectMeta),
|
||||||
|
h.Spec.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (hl *HTTPTriggerList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
for _, h := range hl.Items {
|
||||||
|
result = multierror.Append(result, h.Validate())
|
||||||
|
}
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k *KubernetesWatchTrigger) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("KubernetesWatchTrigger", k.ObjectMeta),
|
||||||
|
k.Spec.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (kl *KubernetesWatchTriggerList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
for _, k := range kl.Items {
|
||||||
|
result = multierror.Append(result, k.Validate())
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *TimeTrigger) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("TimeTrigger", t.ObjectMeta),
|
||||||
|
t.Spec.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (tl *TimeTriggerList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
for _, t := range tl.Items {
|
||||||
|
result = multierror.Append(result, t.Validate())
|
||||||
|
}
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MessageQueueTrigger) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
|
||||||
|
result = multierror.Append(result,
|
||||||
|
validateMetadata("MessageQueueTrigger", m.ObjectMeta),
|
||||||
|
m.Spec.Validate())
|
||||||
|
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ml *MessageQueueTriggerList) Validate() error {
|
||||||
|
result := &multierror.Error{}
|
||||||
|
for _, m := range ml.Items {
|
||||||
|
result = multierror.Append(result, m.Validate())
|
||||||
|
}
|
||||||
|
return result.ErrorOrNil()
|
||||||
|
}
|
||||||
+53
-18
@@ -1,7 +1,7 @@
|
|||||||
// +build !ignore_autogenerated
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright The Kubernetes Authors.
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -55,6 +55,11 @@ func (in *Builder) DeepCopyInto(out *Builder) {
|
|||||||
*out = new(corev1.Container)
|
*out = new(corev1.Container)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
|
if in.PodSpec != nil {
|
||||||
|
in, out := &in.PodSpec, &out.PodSpec
|
||||||
|
*out = new(corev1.PodSpec)
|
||||||
|
(*in).DeepCopyInto(*out)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +77,7 @@ func (in *Builder) DeepCopy() *Builder {
|
|||||||
func (in *CanaryConfig) DeepCopyInto(out *CanaryConfig) {
|
func (in *CanaryConfig) DeepCopyInto(out *CanaryConfig) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
out.Spec = in.Spec
|
out.Spec = in.Spec
|
||||||
out.Status = in.Status
|
out.Status = in.Status
|
||||||
return
|
return
|
||||||
@@ -100,7 +105,7 @@ func (in *CanaryConfig) DeepCopyObject() runtime.Object {
|
|||||||
func (in *CanaryConfigList) DeepCopyInto(out *CanaryConfigList) {
|
func (in *CanaryConfigList) DeepCopyInto(out *CanaryConfigList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]CanaryConfig, len(*in))
|
*out = make([]CanaryConfig, len(*in))
|
||||||
@@ -197,7 +202,7 @@ func (in *ConfigMapReference) DeepCopy() *ConfigMapReference {
|
|||||||
func (in *Environment) DeepCopyInto(out *Environment) {
|
func (in *Environment) DeepCopyInto(out *Environment) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -224,7 +229,7 @@ func (in *Environment) DeepCopyObject() runtime.Object {
|
|||||||
func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList) {
|
func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]Environment, len(*in))
|
*out = make([]Environment, len(*in))
|
||||||
@@ -308,7 +313,7 @@ func (in *ExecutionStrategy) DeepCopy() *ExecutionStrategy {
|
|||||||
func (in *Function) DeepCopyInto(out *Function) {
|
func (in *Function) DeepCopyInto(out *Function) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -335,7 +340,7 @@ func (in *Function) DeepCopyObject() runtime.Object {
|
|||||||
func (in *FunctionList) DeepCopyInto(out *FunctionList) {
|
func (in *FunctionList) DeepCopyInto(out *FunctionList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]Function, len(*in))
|
*out = make([]Function, len(*in))
|
||||||
@@ -438,7 +443,7 @@ func (in *FunctionSpec) DeepCopy() *FunctionSpec {
|
|||||||
func (in *HTTPTrigger) DeepCopyInto(out *HTTPTrigger) {
|
func (in *HTTPTrigger) DeepCopyInto(out *HTTPTrigger) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -465,7 +470,7 @@ func (in *HTTPTrigger) DeepCopyObject() runtime.Object {
|
|||||||
func (in *HTTPTriggerList) DeepCopyInto(out *HTTPTriggerList) {
|
func (in *HTTPTriggerList) DeepCopyInto(out *HTTPTriggerList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]HTTPTrigger, len(*in))
|
*out = make([]HTTPTrigger, len(*in))
|
||||||
@@ -498,6 +503,7 @@ func (in *HTTPTriggerList) DeepCopyObject() runtime.Object {
|
|||||||
func (in *HTTPTriggerSpec) DeepCopyInto(out *HTTPTriggerSpec) {
|
func (in *HTTPTriggerSpec) DeepCopyInto(out *HTTPTriggerSpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
in.FunctionReference.DeepCopyInto(&out.FunctionReference)
|
in.FunctionReference.DeepCopyInto(&out.FunctionReference)
|
||||||
|
in.IngressConfig.DeepCopyInto(&out.IngressConfig)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -511,6 +517,29 @@ func (in *HTTPTriggerSpec) DeepCopy() *HTTPTriggerSpec {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *IngressConfig) DeepCopyInto(out *IngressConfig) {
|
||||||
|
*out = *in
|
||||||
|
if in.Annotations != nil {
|
||||||
|
in, out := &in.Annotations, &out.Annotations
|
||||||
|
*out = make(map[string]string, len(*in))
|
||||||
|
for key, val := range *in {
|
||||||
|
(*out)[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressConfig.
|
||||||
|
func (in *IngressConfig) DeepCopy() *IngressConfig {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(IngressConfig)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *InvokeStrategy) DeepCopyInto(out *InvokeStrategy) {
|
func (in *InvokeStrategy) DeepCopyInto(out *InvokeStrategy) {
|
||||||
*out = *in
|
*out = *in
|
||||||
@@ -532,7 +561,7 @@ func (in *InvokeStrategy) DeepCopy() *InvokeStrategy {
|
|||||||
func (in *KubernetesWatchTrigger) DeepCopyInto(out *KubernetesWatchTrigger) {
|
func (in *KubernetesWatchTrigger) DeepCopyInto(out *KubernetesWatchTrigger) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -559,7 +588,7 @@ func (in *KubernetesWatchTrigger) DeepCopyObject() runtime.Object {
|
|||||||
func (in *KubernetesWatchTriggerList) DeepCopyInto(out *KubernetesWatchTriggerList) {
|
func (in *KubernetesWatchTriggerList) DeepCopyInto(out *KubernetesWatchTriggerList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]KubernetesWatchTrigger, len(*in))
|
*out = make([]KubernetesWatchTrigger, len(*in))
|
||||||
@@ -616,7 +645,7 @@ func (in *KubernetesWatchTriggerSpec) DeepCopy() *KubernetesWatchTriggerSpec {
|
|||||||
func (in *MessageQueueTrigger) DeepCopyInto(out *MessageQueueTrigger) {
|
func (in *MessageQueueTrigger) DeepCopyInto(out *MessageQueueTrigger) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -643,7 +672,7 @@ func (in *MessageQueueTrigger) DeepCopyObject() runtime.Object {
|
|||||||
func (in *MessageQueueTriggerList) DeepCopyInto(out *MessageQueueTriggerList) {
|
func (in *MessageQueueTriggerList) DeepCopyInto(out *MessageQueueTriggerList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]MessageQueueTrigger, len(*in))
|
*out = make([]MessageQueueTrigger, len(*in))
|
||||||
@@ -693,9 +722,9 @@ func (in *MessageQueueTriggerSpec) DeepCopy() *MessageQueueTriggerSpec {
|
|||||||
func (in *Package) DeepCopyInto(out *Package) {
|
func (in *Package) DeepCopyInto(out *Package) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
out.Status = in.Status
|
in.Status.DeepCopyInto(&out.Status)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,7 +750,7 @@ func (in *Package) DeepCopyObject() runtime.Object {
|
|||||||
func (in *PackageList) DeepCopyInto(out *PackageList) {
|
func (in *PackageList) DeepCopyInto(out *PackageList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]Package, len(*in))
|
*out = make([]Package, len(*in))
|
||||||
@@ -788,6 +817,7 @@ func (in *PackageSpec) DeepCopy() *PackageSpec {
|
|||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *PackageStatus) DeepCopyInto(out *PackageStatus) {
|
func (in *PackageStatus) DeepCopyInto(out *PackageStatus) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
in.LastUpdateTimestamp.DeepCopyInto(&out.LastUpdateTimestamp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -809,6 +839,11 @@ func (in *Runtime) DeepCopyInto(out *Runtime) {
|
|||||||
*out = new(corev1.Container)
|
*out = new(corev1.Container)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
|
if in.PodSpec != nil {
|
||||||
|
in, out := &in.PodSpec, &out.PodSpec
|
||||||
|
*out = new(corev1.PodSpec)
|
||||||
|
(*in).DeepCopyInto(*out)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -842,7 +877,7 @@ func (in *SecretReference) DeepCopy() *SecretReference {
|
|||||||
func (in *TimeTrigger) DeepCopyInto(out *TimeTrigger) {
|
func (in *TimeTrigger) DeepCopyInto(out *TimeTrigger) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
in.Metadata.DeepCopyInto(&out.Metadata)
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -869,7 +904,7 @@ func (in *TimeTrigger) DeepCopyObject() runtime.Object {
|
|||||||
func (in *TimeTriggerList) DeepCopyInto(out *TimeTriggerList) {
|
func (in *TimeTriggerList) DeepCopyInto(out *TimeTriggerList) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.TypeMeta = in.TypeMeta
|
out.TypeMeta = in.TypeMeta
|
||||||
out.Metadata = in.Metadata
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
if in.Items != nil {
|
if in.Items != nil {
|
||||||
in, out := &in.Items, &out.Items
|
in, out := &in.Items, &out.Items
|
||||||
*out = make([]TimeTrigger, len(*in))
|
*out = make([]TimeTrigger, len(*in))
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Fission CRD generation
|
|
||||||
|
|
||||||
* Use [code-generator](https://github.com/kubernetes/code-generator) to generate fission CRD object deepcopy and client methods.
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
$ vendor/k8s.io/code-generator/generate-groups.sh deepcopy \
|
|
||||||
github.com/fission/fission/pkg/client \
|
|
||||||
github.com/fission/fission/pkg/apis \
|
|
||||||
fission.io:v1
|
|
||||||
```
|
|
||||||
|
|
||||||
# Reference
|
|
||||||
|
|
||||||
* https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/
|
|
||||||
@@ -1,266 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2019 The Fission Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package v1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/hashicorp/go-multierror"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Each CRD type needs:
|
|
||||||
// GetObjectKind (to satisfy the Object interface)
|
|
||||||
//
|
|
||||||
// In addition, each singular CRD type needs:
|
|
||||||
// GetObjectMeta (to satisfy the ObjectMetaAccessor interface)
|
|
||||||
//
|
|
||||||
// And each list CRD type needs:
|
|
||||||
// GetListMeta (to satisfy the ListMetaAccessor interface)
|
|
||||||
|
|
||||||
func (f *Function) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &f.TypeMeta
|
|
||||||
}
|
|
||||||
func (e *Environment) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &e.TypeMeta
|
|
||||||
}
|
|
||||||
func (ht *HTTPTrigger) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &ht.TypeMeta
|
|
||||||
}
|
|
||||||
func (w *KubernetesWatchTrigger) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &w.TypeMeta
|
|
||||||
}
|
|
||||||
func (t *TimeTrigger) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &t.TypeMeta
|
|
||||||
}
|
|
||||||
func (m *MessageQueueTrigger) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &m.TypeMeta
|
|
||||||
}
|
|
||||||
func (p *Package) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &p.TypeMeta
|
|
||||||
}
|
|
||||||
func (c *CanaryConfig) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &c.TypeMeta
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Function) GetObjectMeta() metav1.Object {
|
|
||||||
return &f.Metadata
|
|
||||||
}
|
|
||||||
func (e *Environment) GetObjectMeta() metav1.Object {
|
|
||||||
return &e.Metadata
|
|
||||||
}
|
|
||||||
func (ht *HTTPTrigger) GetObjectMeta() metav1.Object {
|
|
||||||
return &ht.Metadata
|
|
||||||
}
|
|
||||||
func (w *KubernetesWatchTrigger) GetObjectMeta() metav1.Object {
|
|
||||||
return &w.Metadata
|
|
||||||
}
|
|
||||||
func (t *TimeTrigger) GetObjectMeta() metav1.Object {
|
|
||||||
return &t.Metadata
|
|
||||||
}
|
|
||||||
func (m *MessageQueueTrigger) GetObjectMeta() metav1.Object {
|
|
||||||
return &m.Metadata
|
|
||||||
}
|
|
||||||
func (p *Package) GetObjectMeta() metav1.Object {
|
|
||||||
return &p.Metadata
|
|
||||||
}
|
|
||||||
func (c *CanaryConfig) GetObjectMeta() metav1.Object {
|
|
||||||
return &c.Metadata
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fl *FunctionList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &fl.TypeMeta
|
|
||||||
}
|
|
||||||
func (el *EnvironmentList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &el.TypeMeta
|
|
||||||
}
|
|
||||||
func (hl *HTTPTriggerList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &hl.TypeMeta
|
|
||||||
}
|
|
||||||
func (wl *KubernetesWatchTriggerList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &wl.TypeMeta
|
|
||||||
}
|
|
||||||
func (wl *TimeTriggerList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &wl.TypeMeta
|
|
||||||
}
|
|
||||||
func (ml *MessageQueueTriggerList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &ml.TypeMeta
|
|
||||||
}
|
|
||||||
func (pl *PackageList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &pl.TypeMeta
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cl *CanaryConfigList) GetObjectKind() schema.ObjectKind {
|
|
||||||
return &cl.TypeMeta
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fl *FunctionList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &fl.Metadata
|
|
||||||
}
|
|
||||||
func (el *EnvironmentList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &el.Metadata
|
|
||||||
}
|
|
||||||
func (hl *HTTPTriggerList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &hl.Metadata
|
|
||||||
}
|
|
||||||
func (wl *KubernetesWatchTriggerList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &wl.Metadata
|
|
||||||
}
|
|
||||||
func (wl *TimeTriggerList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &wl.Metadata
|
|
||||||
}
|
|
||||||
func (ml *MessageQueueTriggerList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &ml.Metadata
|
|
||||||
}
|
|
||||||
func (pl *PackageList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &pl.Metadata
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cl *CanaryConfigList) GetListMeta() metav1.ListInterface {
|
|
||||||
return &cl.Metadata
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateMetadata(field string, m metav1.ObjectMeta) error {
|
|
||||||
return ValidateKubeReference(field, m.Name, m.Namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *Package) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("Package", p.Metadata),
|
|
||||||
p.Spec.Validate(),
|
|
||||||
p.Status.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (pl *PackageList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
// not validate ListMeta
|
|
||||||
for _, p := range pl.Items {
|
|
||||||
result = multierror.Append(result, p.Validate())
|
|
||||||
}
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *Function) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("Function", f.Metadata),
|
|
||||||
f.Spec.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fl *FunctionList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
for _, f := range fl.Items {
|
|
||||||
result = multierror.Append(result, f.Validate())
|
|
||||||
}
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *Environment) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("Environment", e.Metadata),
|
|
||||||
e.Spec.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (el *EnvironmentList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
for _, e := range el.Items {
|
|
||||||
result = multierror.Append(result, e.Validate())
|
|
||||||
}
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (h *HTTPTrigger) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("HTTPTrigger", h.Metadata),
|
|
||||||
h.Spec.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (hl *HTTPTriggerList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
for _, h := range hl.Items {
|
|
||||||
result = multierror.Append(result, h.Validate())
|
|
||||||
}
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (k *KubernetesWatchTrigger) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("KubernetesWatchTrigger", k.Metadata),
|
|
||||||
k.Spec.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (kl *KubernetesWatchTriggerList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
for _, k := range kl.Items {
|
|
||||||
result = multierror.Append(result, k.Validate())
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *TimeTrigger) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("TimeTrigger", t.Metadata),
|
|
||||||
t.Spec.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (tl *TimeTriggerList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
for _, t := range tl.Items {
|
|
||||||
result = multierror.Append(result, t.Validate())
|
|
||||||
}
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *MessageQueueTrigger) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
|
|
||||||
result = multierror.Append(result,
|
|
||||||
validateMetadata("MessageQueueTrigger", m.Metadata),
|
|
||||||
m.Spec.Validate())
|
|
||||||
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (ml *MessageQueueTriggerList) Validate() error {
|
|
||||||
result := &multierror.Error{}
|
|
||||||
for _, m := range ml.Items {
|
|
||||||
result = multierror.Append(result, m.Validate())
|
|
||||||
}
|
|
||||||
return result.ErrorOrNil()
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package versioned
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/typed/core/v1"
|
||||||
|
discovery "k8s.io/client-go/discovery"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Interface interface {
|
||||||
|
Discovery() discovery.DiscoveryInterface
|
||||||
|
CoreV1() corev1.CoreV1Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
|
// version included in a Clientset.
|
||||||
|
type Clientset struct {
|
||||||
|
*discovery.DiscoveryClient
|
||||||
|
coreV1 *corev1.CoreV1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// CoreV1 retrieves the CoreV1Client
|
||||||
|
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
|
||||||
|
return c.coreV1
|
||||||
|
}
|
||||||
|
|
||||||
|
// Discovery retrieves the DiscoveryClient
|
||||||
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.DiscoveryClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new Clientset for the given config.
|
||||||
|
// If config's RateLimiter is not set and QPS and Burst are acceptable,
|
||||||
|
// NewForConfig will generate a rate-limiter in configShallowCopy.
|
||||||
|
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||||
|
configShallowCopy := *c
|
||||||
|
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||||
|
if configShallowCopy.Burst <= 0 {
|
||||||
|
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||||
|
}
|
||||||
|
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||||
|
}
|
||||||
|
var cs Clientset
|
||||||
|
var err error
|
||||||
|
cs.coreV1, err = corev1.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &cs, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
|
var cs Clientset
|
||||||
|
cs.coreV1 = corev1.NewForConfigOrDie(c)
|
||||||
|
|
||||||
|
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
|
return &cs
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new Clientset for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *Clientset {
|
||||||
|
var cs Clientset
|
||||||
|
cs.coreV1 = corev1.New(c)
|
||||||
|
|
||||||
|
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
|
return &cs
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// This package has the automatically generated clientset.
|
||||||
|
package versioned
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
clientset "github.com/fission/fission/pkg/apis/genclient/clientset/versioned"
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/typed/core/v1"
|
||||||
|
fakecorev1 "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/typed/core/v1/fake"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
|
"k8s.io/client-go/discovery"
|
||||||
|
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||||
|
"k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||||
|
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||||
|
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||||
|
// for a real clientset and is mostly useful in simple unit tests.
|
||||||
|
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||||
|
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||||
|
for _, obj := range objects {
|
||||||
|
if err := o.Add(obj); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cs := &Clientset{tracker: o}
|
||||||
|
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||||
|
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||||
|
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||||
|
gvr := action.GetResource()
|
||||||
|
ns := action.GetNamespace()
|
||||||
|
watch, err := o.Watch(gvr, ns)
|
||||||
|
if err != nil {
|
||||||
|
return false, nil, err
|
||||||
|
}
|
||||||
|
return true, watch, nil
|
||||||
|
})
|
||||||
|
|
||||||
|
return cs
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||||
|
// struct to get a default implementation. This makes faking out just the method
|
||||||
|
// you want to test easier.
|
||||||
|
type Clientset struct {
|
||||||
|
testing.Fake
|
||||||
|
discovery *fakediscovery.FakeDiscovery
|
||||||
|
tracker testing.ObjectTracker
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
|
return c.discovery
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Clientset) Tracker() testing.ObjectTracker {
|
||||||
|
return c.tracker
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ clientset.Interface = &Clientset{}
|
||||||
|
|
||||||
|
// CoreV1 retrieves the CoreV1Client
|
||||||
|
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
|
||||||
|
return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// This package has the automatically generated fake clientset.
|
||||||
|
package fake
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
var scheme = runtime.NewScheme()
|
||||||
|
var codecs = serializer.NewCodecFactory(scheme)
|
||||||
|
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||||
|
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||||
|
corev1.AddToScheme,
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||||
|
// of clientsets, like in:
|
||||||
|
//
|
||||||
|
// import (
|
||||||
|
// "k8s.io/client-go/kubernetes"
|
||||||
|
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||||
|
// )
|
||||||
|
//
|
||||||
|
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||||
|
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||||
|
//
|
||||||
|
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||||
|
// correctly.
|
||||||
|
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||||
|
utilruntime.Must(AddToScheme(scheme))
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// This package contains the scheme of the automatically generated clientset.
|
||||||
|
package scheme
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package scheme
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
var Scheme = runtime.NewScheme()
|
||||||
|
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||||
|
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||||
|
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||||
|
corev1.AddToScheme,
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||||
|
// of clientsets, like in:
|
||||||
|
//
|
||||||
|
// import (
|
||||||
|
// "k8s.io/client-go/kubernetes"
|
||||||
|
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||||
|
// )
|
||||||
|
//
|
||||||
|
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||||
|
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||||
|
//
|
||||||
|
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||||
|
// correctly.
|
||||||
|
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||||
|
utilruntime.Must(AddToScheme(Scheme))
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CanaryConfigsGetter has a method to return a CanaryConfigInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type CanaryConfigsGetter interface {
|
||||||
|
CanaryConfigs(namespace string) CanaryConfigInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// CanaryConfigInterface has methods to work with CanaryConfig resources.
|
||||||
|
type CanaryConfigInterface interface {
|
||||||
|
Create(*v1.CanaryConfig) (*v1.CanaryConfig, error)
|
||||||
|
Update(*v1.CanaryConfig) (*v1.CanaryConfig, error)
|
||||||
|
UpdateStatus(*v1.CanaryConfig) (*v1.CanaryConfig, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.CanaryConfig, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.CanaryConfigList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CanaryConfig, err error)
|
||||||
|
CanaryConfigExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// canaryConfigs implements CanaryConfigInterface
|
||||||
|
type canaryConfigs struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newCanaryConfigs returns a CanaryConfigs
|
||||||
|
func newCanaryConfigs(c *CoreV1Client, namespace string) *canaryConfigs {
|
||||||
|
return &canaryConfigs{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||||
|
func (c *canaryConfigs) Get(name string, options metav1.GetOptions) (result *v1.CanaryConfig, err error) {
|
||||||
|
result = &v1.CanaryConfig{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||||
|
func (c *canaryConfigs) List(opts metav1.ListOptions) (result *v1.CanaryConfigList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.CanaryConfigList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested canaryConfigs.
|
||||||
|
func (c *canaryConfigs) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _canaryConfig and creates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||||
|
func (c *canaryConfigs) Create(_canaryConfig *v1.CanaryConfig) (result *v1.CanaryConfig, err error) {
|
||||||
|
result = &v1.CanaryConfig{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
Body(_canaryConfig).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _canaryConfig and updates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||||
|
func (c *canaryConfigs) Update(_canaryConfig *v1.CanaryConfig) (result *v1.CanaryConfig, err error) {
|
||||||
|
result = &v1.CanaryConfig{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
Name(_canaryConfig.Name).
|
||||||
|
Body(_canaryConfig).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
|
func (c *canaryConfigs) UpdateStatus(_canaryConfig *v1.CanaryConfig) (result *v1.CanaryConfig, err error) {
|
||||||
|
result = &v1.CanaryConfig{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
Name(_canaryConfig.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(_canaryConfig).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *canaryConfigs) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *canaryConfigs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched canaryConfig.
|
||||||
|
func (c *canaryConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CanaryConfig, err error) {
|
||||||
|
result = &v1.CanaryConfig{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("canaryconfigs").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
"github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CoreV1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
CanaryConfigsGetter
|
||||||
|
EnvironmentsGetter
|
||||||
|
FunctionsGetter
|
||||||
|
HTTPTriggersGetter
|
||||||
|
KubernetesWatchTriggersGetter
|
||||||
|
MessageQueueTriggersGetter
|
||||||
|
PackagesGetter
|
||||||
|
TimeTriggersGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// CoreV1Client is used to interact with features provided by the fission.io group.
|
||||||
|
type CoreV1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) CanaryConfigs(namespace string) CanaryConfigInterface {
|
||||||
|
return newCanaryConfigs(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) Environments(namespace string) EnvironmentInterface {
|
||||||
|
return newEnvironments(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) Functions(namespace string) FunctionInterface {
|
||||||
|
return newFunctions(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) HTTPTriggers(namespace string) HTTPTriggerInterface {
|
||||||
|
return newHTTPTriggers(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerInterface {
|
||||||
|
return newKubernetesWatchTriggers(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) MessageQueueTriggers(namespace string) MessageQueueTriggerInterface {
|
||||||
|
return newMessageQueueTriggers(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) Packages(namespace string) PackageInterface {
|
||||||
|
return newPackages(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CoreV1Client) TimeTriggers(namespace string) TimeTriggerInterface {
|
||||||
|
return newTimeTriggers(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new CoreV1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &CoreV1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new CoreV1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new CoreV1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *CoreV1Client {
|
||||||
|
return &CoreV1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv := v1.SchemeGroupVersion
|
||||||
|
config.GroupVersion = &gv
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||||
|
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *CoreV1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EnvironmentsGetter has a method to return a EnvironmentInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type EnvironmentsGetter interface {
|
||||||
|
Environments(namespace string) EnvironmentInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// EnvironmentInterface has methods to work with Environment resources.
|
||||||
|
type EnvironmentInterface interface {
|
||||||
|
Create(*v1.Environment) (*v1.Environment, error)
|
||||||
|
Update(*v1.Environment) (*v1.Environment, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.Environment, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.EnvironmentList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Environment, err error)
|
||||||
|
EnvironmentExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// environments implements EnvironmentInterface
|
||||||
|
type environments struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newEnvironments returns a Environments
|
||||||
|
func newEnvironments(c *CoreV1Client, namespace string) *environments {
|
||||||
|
return &environments{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||||
|
func (c *environments) Get(name string, options metav1.GetOptions) (result *v1.Environment, err error) {
|
||||||
|
result = &v1.Environment{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||||
|
func (c *environments) List(opts metav1.ListOptions) (result *v1.EnvironmentList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.EnvironmentList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested environments.
|
||||||
|
func (c *environments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _environment and creates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||||
|
func (c *environments) Create(_environment *v1.Environment) (result *v1.Environment, err error) {
|
||||||
|
result = &v1.Environment{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
Body(_environment).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _environment and updates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||||
|
func (c *environments) Update(_environment *v1.Environment) (result *v1.Environment, err error) {
|
||||||
|
result = &v1.Environment{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
Name(_environment.Name).
|
||||||
|
Body(_environment).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *environments) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *environments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched environment.
|
||||||
|
func (c *environments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Environment, err error) {
|
||||||
|
result = &v1.Environment{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("environments").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeCanaryConfigs implements CanaryConfigInterface
|
||||||
|
type FakeCanaryConfigs struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var canaryconfigsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "canaryconfigs"}
|
||||||
|
|
||||||
|
var canaryconfigsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "CanaryConfig"}
|
||||||
|
|
||||||
|
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||||
|
func (c *FakeCanaryConfigs) Get(name string, options v1.GetOptions) (result *corev1.CanaryConfig, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.CanaryConfig), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||||
|
func (c *FakeCanaryConfigs) List(opts v1.ListOptions) (result *corev1.CanaryConfigList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(canaryconfigsResource, canaryconfigsKind, c.ns, opts), &corev1.CanaryConfigList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.CanaryConfigList{ListMeta: obj.(*corev1.CanaryConfigList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.CanaryConfigList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested canaryConfigs.
|
||||||
|
func (c *FakeCanaryConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(canaryconfigsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _canaryConfig and creates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||||
|
func (c *FakeCanaryConfigs) Create(_canaryConfig *corev1.CanaryConfig) (result *corev1.CanaryConfig, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.CanaryConfig), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _canaryConfig and updates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||||
|
func (c *FakeCanaryConfigs) Update(_canaryConfig *corev1.CanaryConfig) (result *corev1.CanaryConfig, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.CanaryConfig), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
func (c *FakeCanaryConfigs) UpdateStatus(_canaryConfig *corev1.CanaryConfig) (*corev1.CanaryConfig, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(canaryconfigsResource, "status", c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.CanaryConfig), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeCanaryConfigs) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeCanaryConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(canaryconfigsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.CanaryConfigList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched canaryConfig.
|
||||||
|
func (c *FakeCanaryConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.CanaryConfig, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, name, pt, data, subresources...), &corev1.CanaryConfig{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.CanaryConfig), err
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/typed/core/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeCoreV1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) CanaryConfigs(namespace string) v1.CanaryConfigInterface {
|
||||||
|
return &FakeCanaryConfigs{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) Environments(namespace string) v1.EnvironmentInterface {
|
||||||
|
return &FakeEnvironments{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) Functions(namespace string) v1.FunctionInterface {
|
||||||
|
return &FakeFunctions{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) HTTPTriggers(namespace string) v1.HTTPTriggerInterface {
|
||||||
|
return &FakeHTTPTriggers{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) KubernetesWatchTriggers(namespace string) v1.KubernetesWatchTriggerInterface {
|
||||||
|
return &FakeKubernetesWatchTriggers{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) MessageQueueTriggers(namespace string) v1.MessageQueueTriggerInterface {
|
||||||
|
return &FakeMessageQueueTriggers{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) Packages(namespace string) v1.PackageInterface {
|
||||||
|
return &FakePackages{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeCoreV1) TimeTriggers(namespace string) v1.TimeTriggerInterface {
|
||||||
|
return &FakeTimeTriggers{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeCoreV1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeEnvironments implements EnvironmentInterface
|
||||||
|
type FakeEnvironments struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var environmentsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "environments"}
|
||||||
|
|
||||||
|
var environmentsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Environment"}
|
||||||
|
|
||||||
|
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||||
|
func (c *FakeEnvironments) Get(name string, options v1.GetOptions) (result *corev1.Environment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Environment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||||
|
func (c *FakeEnvironments) List(opts v1.ListOptions) (result *corev1.EnvironmentList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(environmentsResource, environmentsKind, c.ns, opts), &corev1.EnvironmentList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.EnvironmentList{ListMeta: obj.(*corev1.EnvironmentList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.EnvironmentList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested environments.
|
||||||
|
func (c *FakeEnvironments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(environmentsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _environment and creates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||||
|
func (c *FakeEnvironments) Create(_environment *corev1.Environment) (result *corev1.Environment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Environment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _environment and updates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||||
|
func (c *FakeEnvironments) Update(_environment *corev1.Environment) (result *corev1.Environment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Environment), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeEnvironments) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeEnvironments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(environmentsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.EnvironmentList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched environment.
|
||||||
|
func (c *FakeEnvironments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Environment, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(environmentsResource, c.ns, name, pt, data, subresources...), &corev1.Environment{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Environment), err
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeFunctions implements FunctionInterface
|
||||||
|
type FakeFunctions struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var functionsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "functions"}
|
||||||
|
|
||||||
|
var functionsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Function"}
|
||||||
|
|
||||||
|
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||||
|
func (c *FakeFunctions) Get(name string, options v1.GetOptions) (result *corev1.Function, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Function), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||||
|
func (c *FakeFunctions) List(opts v1.ListOptions) (result *corev1.FunctionList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(functionsResource, functionsKind, c.ns, opts), &corev1.FunctionList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.FunctionList{ListMeta: obj.(*corev1.FunctionList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.FunctionList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested functions.
|
||||||
|
func (c *FakeFunctions) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(functionsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _function and creates it. Returns the server's representation of the function, and an error, if there is any.
|
||||||
|
func (c *FakeFunctions) Create(_function *corev1.Function) (result *corev1.Function, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Function), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _function and updates it. Returns the server's representation of the function, and an error, if there is any.
|
||||||
|
func (c *FakeFunctions) Update(_function *corev1.Function) (result *corev1.Function, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Function), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeFunctions) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeFunctions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(functionsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.FunctionList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched function.
|
||||||
|
func (c *FakeFunctions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Function, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(functionsResource, c.ns, name, pt, data, subresources...), &corev1.Function{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Function), err
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeHTTPTriggers implements HTTPTriggerInterface
|
||||||
|
type FakeHTTPTriggers struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var httptriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "httptriggers"}
|
||||||
|
|
||||||
|
var httptriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "HTTPTrigger"}
|
||||||
|
|
||||||
|
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||||
|
func (c *FakeHTTPTriggers) Get(name string, options v1.GetOptions) (result *corev1.HTTPTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.HTTPTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||||
|
func (c *FakeHTTPTriggers) List(opts v1.ListOptions) (result *corev1.HTTPTriggerList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(httptriggersResource, httptriggersKind, c.ns, opts), &corev1.HTTPTriggerList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.HTTPTriggerList{ListMeta: obj.(*corev1.HTTPTriggerList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.HTTPTriggerList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested hTTPTriggers.
|
||||||
|
func (c *FakeHTTPTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(httptriggersResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _hTTPTrigger and creates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeHTTPTriggers) Create(_hTTPTrigger *corev1.HTTPTrigger) (result *corev1.HTTPTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.HTTPTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _hTTPTrigger and updates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeHTTPTriggers) Update(_hTTPTrigger *corev1.HTTPTrigger) (result *corev1.HTTPTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.HTTPTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeHTTPTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeHTTPTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(httptriggersResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.HTTPTriggerList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||||
|
func (c *FakeHTTPTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.HTTPTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(httptriggersResource, c.ns, name, pt, data, subresources...), &corev1.HTTPTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.HTTPTrigger), err
|
||||||
|
}
|
||||||
+128
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeKubernetesWatchTriggers implements KubernetesWatchTriggerInterface
|
||||||
|
type FakeKubernetesWatchTriggers struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var kuberneteswatchtriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "kuberneteswatchtriggers"}
|
||||||
|
|
||||||
|
var kuberneteswatchtriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "KubernetesWatchTrigger"}
|
||||||
|
|
||||||
|
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) Get(name string, options v1.GetOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) List(opts v1.ListOptions) (result *corev1.KubernetesWatchTriggerList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(kuberneteswatchtriggersResource, kuberneteswatchtriggersKind, c.ns, opts), &corev1.KubernetesWatchTriggerList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.KubernetesWatchTriggerList{ListMeta: obj.(*corev1.KubernetesWatchTriggerList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.KubernetesWatchTriggerList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested kubernetesWatchTriggers.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(kuberneteswatchtriggersResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _kubernetesWatchTrigger and creates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) Create(_kubernetesWatchTrigger *corev1.KubernetesWatchTrigger) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _kubernetesWatchTrigger and updates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) Update(_kubernetesWatchTrigger *corev1.KubernetesWatchTrigger) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(kuberneteswatchtriggersResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.KubernetesWatchTriggerList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||||
|
func (c *FakeKubernetesWatchTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(kuberneteswatchtriggersResource, c.ns, name, pt, data, subresources...), &corev1.KubernetesWatchTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||||
|
}
|
||||||
+128
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeMessageQueueTriggers implements MessageQueueTriggerInterface
|
||||||
|
type FakeMessageQueueTriggers struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var messagequeuetriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "messagequeuetriggers"}
|
||||||
|
|
||||||
|
var messagequeuetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "MessageQueueTrigger"}
|
||||||
|
|
||||||
|
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||||
|
func (c *FakeMessageQueueTriggers) Get(name string, options v1.GetOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.MessageQueueTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||||
|
func (c *FakeMessageQueueTriggers) List(opts v1.ListOptions) (result *corev1.MessageQueueTriggerList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(messagequeuetriggersResource, messagequeuetriggersKind, c.ns, opts), &corev1.MessageQueueTriggerList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.MessageQueueTriggerList{ListMeta: obj.(*corev1.MessageQueueTriggerList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.MessageQueueTriggerList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested messageQueueTriggers.
|
||||||
|
func (c *FakeMessageQueueTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(messagequeuetriggersResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _messageQueueTrigger and creates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeMessageQueueTriggers) Create(_messageQueueTrigger *corev1.MessageQueueTrigger) (result *corev1.MessageQueueTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.MessageQueueTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _messageQueueTrigger and updates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeMessageQueueTriggers) Update(_messageQueueTrigger *corev1.MessageQueueTrigger) (result *corev1.MessageQueueTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.MessageQueueTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeMessageQueueTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeMessageQueueTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(messagequeuetriggersResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.MessageQueueTriggerList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||||
|
func (c *FakeMessageQueueTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.MessageQueueTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(messagequeuetriggersResource, c.ns, name, pt, data, subresources...), &corev1.MessageQueueTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.MessageQueueTrigger), err
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakePackages implements PackageInterface
|
||||||
|
type FakePackages struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var packagesResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "packages"}
|
||||||
|
|
||||||
|
var packagesKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Package"}
|
||||||
|
|
||||||
|
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||||
|
func (c *FakePackages) Get(name string, options v1.GetOptions) (result *corev1.Package, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Package), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||||
|
func (c *FakePackages) List(opts v1.ListOptions) (result *corev1.PackageList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(packagesResource, packagesKind, c.ns, opts), &corev1.PackageList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.PackageList{ListMeta: obj.(*corev1.PackageList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.PackageList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested packages.
|
||||||
|
func (c *FakePackages) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(packagesResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _package and creates it. Returns the server's representation of the package, and an error, if there is any.
|
||||||
|
func (c *FakePackages) Create(_package *corev1.Package) (result *corev1.Package, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Package), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _package and updates it. Returns the server's representation of the package, and an error, if there is any.
|
||||||
|
func (c *FakePackages) Update(_package *corev1.Package) (result *corev1.Package, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Package), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
func (c *FakePackages) UpdateStatus(_package *corev1.Package) (*corev1.Package, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(packagesResource, "status", c.ns, _package), &corev1.Package{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Package), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakePackages) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakePackages) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(packagesResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.PackageList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched package.
|
||||||
|
func (c *FakePackages) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Package, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, name, pt, data, subresources...), &corev1.Package{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.Package), err
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeTimeTriggers implements TimeTriggerInterface
|
||||||
|
type FakeTimeTriggers struct {
|
||||||
|
Fake *FakeCoreV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var timetriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "timetriggers"}
|
||||||
|
|
||||||
|
var timetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "TimeTrigger"}
|
||||||
|
|
||||||
|
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||||
|
func (c *FakeTimeTriggers) Get(name string, options v1.GetOptions) (result *corev1.TimeTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.TimeTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||||
|
func (c *FakeTimeTriggers) List(opts v1.ListOptions) (result *corev1.TimeTriggerList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(timetriggersResource, timetriggersKind, c.ns, opts), &corev1.TimeTriggerList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &corev1.TimeTriggerList{ListMeta: obj.(*corev1.TimeTriggerList).ListMeta}
|
||||||
|
for _, item := range obj.(*corev1.TimeTriggerList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested timeTriggers.
|
||||||
|
func (c *FakeTimeTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(timetriggersResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _timeTrigger and creates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeTimeTriggers) Create(_timeTrigger *corev1.TimeTrigger) (result *corev1.TimeTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.TimeTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _timeTrigger and updates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||||
|
func (c *FakeTimeTriggers) Update(_timeTrigger *corev1.TimeTrigger) (result *corev1.TimeTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.TimeTrigger), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeTimeTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeTimeTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(timetriggersResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &corev1.TimeTriggerList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched timeTrigger.
|
||||||
|
func (c *FakeTimeTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.TimeTrigger, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(timetriggersResource, c.ns, name, pt, data, subresources...), &corev1.TimeTrigger{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*corev1.TimeTrigger), err
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FunctionsGetter has a method to return a FunctionInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type FunctionsGetter interface {
|
||||||
|
Functions(namespace string) FunctionInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// FunctionInterface has methods to work with Function resources.
|
||||||
|
type FunctionInterface interface {
|
||||||
|
Create(*v1.Function) (*v1.Function, error)
|
||||||
|
Update(*v1.Function) (*v1.Function, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.Function, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.FunctionList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Function, err error)
|
||||||
|
FunctionExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// functions implements FunctionInterface
|
||||||
|
type functions struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newFunctions returns a Functions
|
||||||
|
func newFunctions(c *CoreV1Client, namespace string) *functions {
|
||||||
|
return &functions{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||||
|
func (c *functions) Get(name string, options metav1.GetOptions) (result *v1.Function, err error) {
|
||||||
|
result = &v1.Function{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||||
|
func (c *functions) List(opts metav1.ListOptions) (result *v1.FunctionList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.FunctionList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested functions.
|
||||||
|
func (c *functions) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _function and creates it. Returns the server's representation of the function, and an error, if there is any.
|
||||||
|
func (c *functions) Create(_function *v1.Function) (result *v1.Function, err error) {
|
||||||
|
result = &v1.Function{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
Body(_function).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _function and updates it. Returns the server's representation of the function, and an error, if there is any.
|
||||||
|
func (c *functions) Update(_function *v1.Function) (result *v1.Function, err error) {
|
||||||
|
result = &v1.Function{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
Name(_function.Name).
|
||||||
|
Body(_function).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *functions) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *functions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched function.
|
||||||
|
func (c *functions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Function, err error) {
|
||||||
|
result = &v1.Function{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("functions").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
type CanaryConfigExpansion interface{}
|
||||||
|
|
||||||
|
type EnvironmentExpansion interface{}
|
||||||
|
|
||||||
|
type FunctionExpansion interface{}
|
||||||
|
|
||||||
|
type HTTPTriggerExpansion interface{}
|
||||||
|
|
||||||
|
type KubernetesWatchTriggerExpansion interface{}
|
||||||
|
|
||||||
|
type MessageQueueTriggerExpansion interface{}
|
||||||
|
|
||||||
|
type PackageExpansion interface{}
|
||||||
|
|
||||||
|
type TimeTriggerExpansion interface{}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HTTPTriggersGetter has a method to return a HTTPTriggerInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type HTTPTriggersGetter interface {
|
||||||
|
HTTPTriggers(namespace string) HTTPTriggerInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTTPTriggerInterface has methods to work with HTTPTrigger resources.
|
||||||
|
type HTTPTriggerInterface interface {
|
||||||
|
Create(*v1.HTTPTrigger) (*v1.HTTPTrigger, error)
|
||||||
|
Update(*v1.HTTPTrigger) (*v1.HTTPTrigger, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.HTTPTrigger, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.HTTPTriggerList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HTTPTrigger, err error)
|
||||||
|
HTTPTriggerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// hTTPTriggers implements HTTPTriggerInterface
|
||||||
|
type hTTPTriggers struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newHTTPTriggers returns a HTTPTriggers
|
||||||
|
func newHTTPTriggers(c *CoreV1Client, namespace string) *hTTPTriggers {
|
||||||
|
return &hTTPTriggers{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||||
|
func (c *hTTPTriggers) Get(name string, options metav1.GetOptions) (result *v1.HTTPTrigger, err error) {
|
||||||
|
result = &v1.HTTPTrigger{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||||
|
func (c *hTTPTriggers) List(opts metav1.ListOptions) (result *v1.HTTPTriggerList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.HTTPTriggerList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested hTTPTriggers.
|
||||||
|
func (c *hTTPTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _hTTPTrigger and creates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||||
|
func (c *hTTPTriggers) Create(_hTTPTrigger *v1.HTTPTrigger) (result *v1.HTTPTrigger, err error) {
|
||||||
|
result = &v1.HTTPTrigger{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
Body(_hTTPTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _hTTPTrigger and updates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||||
|
func (c *hTTPTriggers) Update(_hTTPTrigger *v1.HTTPTrigger) (result *v1.HTTPTrigger, err error) {
|
||||||
|
result = &v1.HTTPTrigger{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
Name(_hTTPTrigger.Name).
|
||||||
|
Body(_hTTPTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *hTTPTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *hTTPTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||||
|
func (c *hTTPTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HTTPTrigger, err error) {
|
||||||
|
result = &v1.HTTPTrigger{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("httptriggers").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// KubernetesWatchTriggersGetter has a method to return a KubernetesWatchTriggerInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type KubernetesWatchTriggersGetter interface {
|
||||||
|
KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// KubernetesWatchTriggerInterface has methods to work with KubernetesWatchTrigger resources.
|
||||||
|
type KubernetesWatchTriggerInterface interface {
|
||||||
|
Create(*v1.KubernetesWatchTrigger) (*v1.KubernetesWatchTrigger, error)
|
||||||
|
Update(*v1.KubernetesWatchTrigger) (*v1.KubernetesWatchTrigger, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.KubernetesWatchTrigger, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.KubernetesWatchTriggerList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.KubernetesWatchTrigger, err error)
|
||||||
|
KubernetesWatchTriggerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// kubernetesWatchTriggers implements KubernetesWatchTriggerInterface
|
||||||
|
type kubernetesWatchTriggers struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newKubernetesWatchTriggers returns a KubernetesWatchTriggers
|
||||||
|
func newKubernetesWatchTriggers(c *CoreV1Client, namespace string) *kubernetesWatchTriggers {
|
||||||
|
return &kubernetesWatchTriggers{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||||
|
func (c *kubernetesWatchTriggers) Get(name string, options metav1.GetOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||||
|
result = &v1.KubernetesWatchTrigger{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||||
|
func (c *kubernetesWatchTriggers) List(opts metav1.ListOptions) (result *v1.KubernetesWatchTriggerList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.KubernetesWatchTriggerList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested kubernetesWatchTriggers.
|
||||||
|
func (c *kubernetesWatchTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _kubernetesWatchTrigger and creates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||||
|
func (c *kubernetesWatchTriggers) Create(_kubernetesWatchTrigger *v1.KubernetesWatchTrigger) (result *v1.KubernetesWatchTrigger, err error) {
|
||||||
|
result = &v1.KubernetesWatchTrigger{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
Body(_kubernetesWatchTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _kubernetesWatchTrigger and updates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||||
|
func (c *kubernetesWatchTriggers) Update(_kubernetesWatchTrigger *v1.KubernetesWatchTrigger) (result *v1.KubernetesWatchTrigger, err error) {
|
||||||
|
result = &v1.KubernetesWatchTrigger{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
Name(_kubernetesWatchTrigger.Name).
|
||||||
|
Body(_kubernetesWatchTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *kubernetesWatchTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *kubernetesWatchTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||||
|
func (c *kubernetesWatchTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.KubernetesWatchTrigger, err error) {
|
||||||
|
result = &v1.KubernetesWatchTrigger{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("kuberneteswatchtriggers").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MessageQueueTriggersGetter has a method to return a MessageQueueTriggerInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type MessageQueueTriggersGetter interface {
|
||||||
|
MessageQueueTriggers(namespace string) MessageQueueTriggerInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageQueueTriggerInterface has methods to work with MessageQueueTrigger resources.
|
||||||
|
type MessageQueueTriggerInterface interface {
|
||||||
|
Create(*v1.MessageQueueTrigger) (*v1.MessageQueueTrigger, error)
|
||||||
|
Update(*v1.MessageQueueTrigger) (*v1.MessageQueueTrigger, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.MessageQueueTrigger, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.MessageQueueTriggerList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MessageQueueTrigger, err error)
|
||||||
|
MessageQueueTriggerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// messageQueueTriggers implements MessageQueueTriggerInterface
|
||||||
|
type messageQueueTriggers struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newMessageQueueTriggers returns a MessageQueueTriggers
|
||||||
|
func newMessageQueueTriggers(c *CoreV1Client, namespace string) *messageQueueTriggers {
|
||||||
|
return &messageQueueTriggers{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||||
|
func (c *messageQueueTriggers) Get(name string, options metav1.GetOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||||
|
result = &v1.MessageQueueTrigger{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||||
|
func (c *messageQueueTriggers) List(opts metav1.ListOptions) (result *v1.MessageQueueTriggerList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.MessageQueueTriggerList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested messageQueueTriggers.
|
||||||
|
func (c *messageQueueTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _messageQueueTrigger and creates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||||
|
func (c *messageQueueTriggers) Create(_messageQueueTrigger *v1.MessageQueueTrigger) (result *v1.MessageQueueTrigger, err error) {
|
||||||
|
result = &v1.MessageQueueTrigger{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
Body(_messageQueueTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _messageQueueTrigger and updates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||||
|
func (c *messageQueueTriggers) Update(_messageQueueTrigger *v1.MessageQueueTrigger) (result *v1.MessageQueueTrigger, err error) {
|
||||||
|
result = &v1.MessageQueueTrigger{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
Name(_messageQueueTrigger.Name).
|
||||||
|
Body(_messageQueueTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *messageQueueTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *messageQueueTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||||
|
func (c *messageQueueTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MessageQueueTrigger, err error) {
|
||||||
|
result = &v1.MessageQueueTrigger{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("messagequeuetriggers").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PackagesGetter has a method to return a PackageInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type PackagesGetter interface {
|
||||||
|
Packages(namespace string) PackageInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// PackageInterface has methods to work with Package resources.
|
||||||
|
type PackageInterface interface {
|
||||||
|
Create(*v1.Package) (*v1.Package, error)
|
||||||
|
Update(*v1.Package) (*v1.Package, error)
|
||||||
|
UpdateStatus(*v1.Package) (*v1.Package, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.Package, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.PackageList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Package, err error)
|
||||||
|
PackageExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// packages implements PackageInterface
|
||||||
|
type packages struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newPackages returns a Packages
|
||||||
|
func newPackages(c *CoreV1Client, namespace string) *packages {
|
||||||
|
return &packages{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||||
|
func (c *packages) Get(name string, options metav1.GetOptions) (result *v1.Package, err error) {
|
||||||
|
result = &v1.Package{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||||
|
func (c *packages) List(opts metav1.ListOptions) (result *v1.PackageList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.PackageList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested packages.
|
||||||
|
func (c *packages) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _package and creates it. Returns the server's representation of the package, and an error, if there is any.
|
||||||
|
func (c *packages) Create(_package *v1.Package) (result *v1.Package, err error) {
|
||||||
|
result = &v1.Package{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
Body(_package).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _package and updates it. Returns the server's representation of the package, and an error, if there is any.
|
||||||
|
func (c *packages) Update(_package *v1.Package) (result *v1.Package, err error) {
|
||||||
|
result = &v1.Package{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
Name(_package.Name).
|
||||||
|
Body(_package).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
|
func (c *packages) UpdateStatus(_package *v1.Package) (result *v1.Package, err error) {
|
||||||
|
result = &v1.Package{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
Name(_package.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(_package).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *packages) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *packages) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched package.
|
||||||
|
func (c *packages) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Package, err error) {
|
||||||
|
result = &v1.Package{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("packages").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
scheme "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/scheme"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TimeTriggersGetter has a method to return a TimeTriggerInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type TimeTriggersGetter interface {
|
||||||
|
TimeTriggers(namespace string) TimeTriggerInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// TimeTriggerInterface has methods to work with TimeTrigger resources.
|
||||||
|
type TimeTriggerInterface interface {
|
||||||
|
Create(*v1.TimeTrigger) (*v1.TimeTrigger, error)
|
||||||
|
Update(*v1.TimeTrigger) (*v1.TimeTrigger, error)
|
||||||
|
Delete(name string, options *metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||||
|
Get(name string, options metav1.GetOptions) (*v1.TimeTrigger, error)
|
||||||
|
List(opts metav1.ListOptions) (*v1.TimeTriggerList, error)
|
||||||
|
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TimeTrigger, err error)
|
||||||
|
TimeTriggerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// timeTriggers implements TimeTriggerInterface
|
||||||
|
type timeTriggers struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newTimeTriggers returns a TimeTriggers
|
||||||
|
func newTimeTriggers(c *CoreV1Client, namespace string) *timeTriggers {
|
||||||
|
return &timeTriggers{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||||
|
func (c *timeTriggers) Get(name string, options metav1.GetOptions) (result *v1.TimeTrigger, err error) {
|
||||||
|
result = &v1.TimeTrigger{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||||
|
func (c *timeTriggers) List(opts metav1.ListOptions) (result *v1.TimeTriggerList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.TimeTriggerList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested timeTriggers.
|
||||||
|
func (c *timeTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a _timeTrigger and creates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||||
|
func (c *timeTriggers) Create(_timeTrigger *v1.TimeTrigger) (result *v1.TimeTrigger, err error) {
|
||||||
|
result = &v1.TimeTrigger{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
Body(_timeTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a _timeTrigger and updates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||||
|
func (c *timeTriggers) Update(_timeTrigger *v1.TimeTrigger) (result *v1.TimeTrigger, err error) {
|
||||||
|
result = &v1.TimeTrigger{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
Name(_timeTrigger.Name).
|
||||||
|
Body(_timeTrigger).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *timeTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *timeTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched timeTrigger.
|
||||||
|
func (c *timeTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TimeTrigger, err error) {
|
||||||
|
result = &v1.TimeTrigger{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("timetriggers").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package core
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/genclient/informers/externalversions/core/v1"
|
||||||
|
internalinterfaces "github.com/fission/fission/pkg/apis/genclient/informers/externalversions/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1 provides access to shared informers for resources in V1.
|
||||||
|
V1() v1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
namespace string
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||||
|
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1 returns a new v1.Interface.
|
||||||
|
func (g *group) V1() v1.Interface {
|
||||||
|
return v1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
versioned "github.com/fission/fission/pkg/apis/genclient/clientset/versioned"
|
||||||
|
internalinterfaces "github.com/fission/fission/pkg/apis/genclient/informers/externalversions/internalinterfaces"
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/genclient/listers/core/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CanaryConfigInformer provides access to a shared informer and lister for
|
||||||
|
// CanaryConfigs.
|
||||||
|
type CanaryConfigInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.CanaryConfigLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type _canaryConfigInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
namespace string
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCanaryConfigInformer constructs a new informer for CanaryConfig type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewCanaryConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredCanaryConfigInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFilteredCanaryConfigInformer constructs a new informer for CanaryConfig type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewFilteredCanaryConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.CoreV1().CanaryConfigs(namespace).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.CoreV1().CanaryConfigs(namespace).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&corev1.CanaryConfig{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_canaryConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredCanaryConfigInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_canaryConfigInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&corev1.CanaryConfig{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_canaryConfigInformer) Lister() v1.CanaryConfigLister {
|
||||||
|
return v1.NewCanaryConfigLister(f.Informer().GetIndexer())
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
versioned "github.com/fission/fission/pkg/apis/genclient/clientset/versioned"
|
||||||
|
internalinterfaces "github.com/fission/fission/pkg/apis/genclient/informers/externalversions/internalinterfaces"
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/genclient/listers/core/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EnvironmentInformer provides access to a shared informer and lister for
|
||||||
|
// Environments.
|
||||||
|
type EnvironmentInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.EnvironmentLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type _environmentInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
namespace string
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewEnvironmentInformer constructs a new informer for Environment type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewEnvironmentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredEnvironmentInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFilteredEnvironmentInformer constructs a new informer for Environment type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewFilteredEnvironmentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.CoreV1().Environments(namespace).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.CoreV1().Environments(namespace).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&corev1.Environment{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_environmentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredEnvironmentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_environmentInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&corev1.Environment{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_environmentInformer) Lister() v1.EnvironmentLister {
|
||||||
|
return v1.NewEnvironmentLister(f.Informer().GetIndexer())
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Fission Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||||
|
versioned "github.com/fission/fission/pkg/apis/genclient/clientset/versioned"
|
||||||
|
internalinterfaces "github.com/fission/fission/pkg/apis/genclient/informers/externalversions/internalinterfaces"
|
||||||
|
v1 "github.com/fission/fission/pkg/apis/genclient/listers/core/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FunctionInformer provides access to a shared informer and lister for
|
||||||
|
// Functions.
|
||||||
|
type FunctionInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1.FunctionLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type _functionInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
namespace string
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFunctionInformer constructs a new informer for Function type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewFunctionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredFunctionInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFilteredFunctionInformer constructs a new informer for Function type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewFilteredFunctionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.CoreV1().Functions(namespace).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.CoreV1().Functions(namespace).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&corev1.Function{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_functionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredFunctionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_functionInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&corev1.Function{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *_functionInformer) Lister() v1.FunctionLister {
|
||||||
|
return v1.NewFunctionLister(f.Informer().GetIndexer())
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user