-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8b4335
commit 924d171
Showing
9 changed files
with
222 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: fission.io/v1 | ||
kind: Environment | ||
metadata: | ||
creationTimestamp: null | ||
name: python | ||
spec: | ||
builder: | ||
command: build | ||
container: | ||
name: "" | ||
resources: {} | ||
image: fission/python-builder:latest | ||
imagepullsecret: "" | ||
keeparchive: false | ||
poolsize: 3 | ||
resources: {} | ||
runtime: | ||
container: | ||
name: "" | ||
resources: {} | ||
image: fission/python-env | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: urlshortener | ||
uid: 27944da0-1243-4963-8d07-8095a60b600c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: fission.io/v1 | ||
kind: Function | ||
metadata: | ||
creationTimestamp: null | ||
name: backend | ||
spec: | ||
InvokeStrategy: | ||
ExecutionStrategy: | ||
ExecutorType: poolmgr | ||
MaxScale: 0 | ||
MinScale: 0 | ||
SpecializationTimeout: 120 | ||
TargetCPUPercent: 0 | ||
StrategyType: execution | ||
concurrency: 500 | ||
environment: | ||
name: python | ||
namespace: "" | ||
functionTimeout: 60 | ||
idletimeout: 120 | ||
package: | ||
functionName: shortenurl.main | ||
packageref: | ||
name: backend-pkg | ||
namespace: "" | ||
requestsPerPod: 1 | ||
resources: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: fission.io/v1 | ||
kind: Function | ||
metadata: | ||
creationTimestamp: null | ||
name: frontend | ||
spec: | ||
InvokeStrategy: | ||
ExecutionStrategy: | ||
ExecutorType: poolmgr | ||
MaxScale: 0 | ||
MinScale: 0 | ||
SpecializationTimeout: 120 | ||
TargetCPUPercent: 0 | ||
StrategyType: execution | ||
concurrency: 500 | ||
environment: | ||
name: python | ||
namespace: "" | ||
functionTimeout: 60 | ||
idletimeout: 120 | ||
package: | ||
functionName: app.main | ||
packageref: | ||
name: frontend-pkg | ||
namespace: "" | ||
requestsPerPod: 1 | ||
resources: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
include: | ||
- backend.zip | ||
kind: ArchiveUploadSpec | ||
name: backend-zip-DdUr | ||
|
||
--- | ||
apiVersion: fission.io/v1 | ||
kind: Package | ||
metadata: | ||
creationTimestamp: null | ||
name: backend-pkg | ||
spec: | ||
buildcmd: ./build.sh | ||
deployment: | ||
checksum: {} | ||
environment: | ||
name: python | ||
namespace: "" | ||
source: | ||
checksum: {} | ||
type: url | ||
url: archive://backend-zip-DdUr | ||
status: | ||
buildstatus: pending | ||
lastUpdateTimestamp: "2023-02-14T06:07:01Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
include: | ||
- frontend.zip | ||
kind: ArchiveUploadSpec | ||
name: frontend-zip-Iyzw | ||
|
||
--- | ||
apiVersion: fission.io/v1 | ||
kind: Package | ||
metadata: | ||
creationTimestamp: null | ||
name: frontend-pkg | ||
spec: | ||
buildcmd: ./build.sh | ||
deployment: | ||
checksum: {} | ||
environment: | ||
name: python | ||
namespace: "" | ||
source: | ||
checksum: {} | ||
type: url | ||
url: archive://frontend-zip-Iyzw | ||
status: | ||
buildstatus: pending | ||
lastUpdateTimestamp: "2023-02-14T06:06:47Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: fission.io/v1 | ||
kind: HTTPTrigger | ||
metadata: | ||
creationTimestamp: null | ||
name: backend | ||
namespace: fission | ||
spec: | ||
createingress: false | ||
functionref: | ||
functionweights: null | ||
name: backend | ||
type: name | ||
host: "" | ||
ingressconfig: | ||
annotations: null | ||
host: '*' | ||
path: /shorturl | ||
tls: "" | ||
method: "" | ||
methods: | ||
- POST | ||
prefix: "" | ||
relativeurl: /shorturl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: fission.io/v1 | ||
kind: HTTPTrigger | ||
metadata: | ||
creationTimestamp: null | ||
name: frontend | ||
namespace: fission | ||
spec: | ||
createingress: false | ||
functionref: | ||
functionweights: null | ||
name: frontend | ||
type: name | ||
host: "" | ||
ingressconfig: | ||
annotations: null | ||
host: '*' | ||
path: /main | ||
tls: "" | ||
method: "" | ||
methods: | ||
- POST | ||
- GET | ||
prefix: "" | ||
relativeurl: /main |