mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-19 20:46:40 +00:00
Compare commits
5 Commits
0.16.0-rc1
...
0.16.0
Author | SHA1 | Date | |
---|---|---|---|
e668beef13 | |||
a574a0c06f | |||
4061b52b2a | |||
bc88d6170c | |||
fe057fbcf8 |
29
.github/ISSUE_TEMPLATE.md
vendored
29
.github/ISSUE_TEMPLATE.md
vendored
@ -1,29 +1,40 @@
|
|||||||
## Due diligence
|
## Due diligence
|
||||||
|
|
||||||
Before you for help or support, make sure that you've [consulted the faasd manual "Serverless For Everyone Else"](https://openfaas.gumroad.com/l/serverless-for-everyone-else).
|
<!-- Due dilligence -->
|
||||||
|
## My actions before raising this issue
|
||||||
|
Before you ask for help or support, make sure that you've [consulted the manual for faasd](https://openfaas.gumroad.com/l/serverless-for-everyone-else). We can't answer questions that are already covered by the manual.
|
||||||
|
|
||||||
|
|
||||||
|
<!-- How is this affecting you? What task are you trying to accomplish? -->
|
||||||
|
## Why do you need this?
|
||||||
|
|
||||||
|
|
||||||
<!--- Provide a general summary of the issue in the Title above -->
|
<!--- Provide a general summary of the issue in the Title above -->
|
||||||
|
|
||||||
## Expected Behaviour
|
## Expected Behaviour
|
||||||
<!--- If you're describing a bug, tell us what should happen -->
|
<!--- If you're describing a bug, tell us what should happen -->
|
||||||
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
||||||
|
|
||||||
|
|
||||||
## Current Behaviour
|
## Current Behaviour
|
||||||
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
||||||
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
||||||
|
|
||||||
|
|
||||||
## Are you a GitHub Sponsor (Yes/No?)
|
## Are you a GitHub Sponsor (Yes/No?)
|
||||||
|
<!--- Given this request for help, how are you supporting the project? -->
|
||||||
|
|
||||||
Check at: https://github.com/sponsors/openfaas
|
Check at: https://github.com/sponsors/openfaas
|
||||||
- [ ] Yes
|
- [ ] Yes
|
||||||
- [ ] No
|
- [ ] No
|
||||||
|
|
||||||
## List all Possible Solutions
|
## List All Possible Solutions and Workarounds
|
||||||
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
<!--- Suggest a fix/reason for the bug, or ideas how to implement -->
|
||||||
<!--- or ideas how to implement the addition or change -->
|
<!--- the addition or change -->
|
||||||
|
<!--- Is there a workaround which could avoid making changes? -->
|
||||||
|
|
||||||
|
## Which Solution Do You Recommend?
|
||||||
|
<!--- Pick your preferred solution, if you were to implement and maintain this change -->
|
||||||
|
|
||||||
## List the one solution that you would recommend
|
|
||||||
<!--- If you were to be on the hook for this change. -->
|
|
||||||
|
|
||||||
## Steps to Reproduce (for bugs)
|
## Steps to Reproduce (for bugs)
|
||||||
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
||||||
@ -33,10 +44,6 @@ Check at: https://github.com/sponsors/openfaas
|
|||||||
3.
|
3.
|
||||||
4.
|
4.
|
||||||
|
|
||||||
## Context
|
|
||||||
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
|
||||||
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
|
||||||
|
|
||||||
## Your Environment
|
## Your Environment
|
||||||
|
|
||||||
* OS and architecture:
|
* OS and architecture:
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
# Copyright OpenFaaS Author(s) 2022
|
# Copyright OpenFaaS Author(s) 2022
|
||||||
|
|
||||||
# Consider adding?
|
set -e -x -o pipefail
|
||||||
# set -e -x -o pipefail
|
|
||||||
|
|
||||||
export OWNER="openfaas"
|
export OWNER="openfaas"
|
||||||
export REPO="faasd"
|
export REPO="faasd"
|
||||||
@ -88,8 +86,8 @@ install_cni_plugins() {
|
|||||||
|
|
||||||
install_containerd() {
|
install_containerd() {
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
case $arch in
|
|
||||||
CONTAINERD_VER=1.6.2
|
CONTAINERD_VER=1.6.2
|
||||||
|
case $arch in
|
||||||
x86_64 | amd64)
|
x86_64 | amd64)
|
||||||
curl -sLSf https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VER}/containerd-${CONTAINERD_VER}-linux-amd64.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/
|
curl -sLSf https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VER}/containerd-${CONTAINERD_VER}-linux-amd64.tar.gz | $SUDO tar -xvz --strip-components=1 -C /usr/local/bin/
|
||||||
;;
|
;;
|
||||||
|
@ -175,7 +175,7 @@ func deploy(ctx context.Context, req types.FunctionDeployment, client *container
|
|||||||
return fmt.Errorf("unable to create container: %s, error: %w", name, err)
|
return fmt.Errorf("unable to create container: %s, error: %w", name, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return createTask(ctx, client, container, cni)
|
return createTask(ctx, container, cni)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ func buildLabels(request *types.FunctionDeployment) (map[string]string, error) {
|
|||||||
return labels, nil
|
return labels, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func createTask(ctx context.Context, client *containerd.Client, container containerd.Container, cni gocni.CNI) error {
|
func createTask(ctx context.Context, container containerd.Container, cni gocni.CNI) error {
|
||||||
|
|
||||||
name := container.ID()
|
name := container.ID()
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ func MakeReplicaUpdateHandler(client *containerd.Client, cni gocni.CNI) func(w h
|
|||||||
}
|
}
|
||||||
|
|
||||||
if createNewTask {
|
if createNewTask {
|
||||||
deployErr := createTask(ctx, client, ctr, cni)
|
deployErr := createTask(ctx, ctr, cni)
|
||||||
if deployErr != nil {
|
if deployErr != nil {
|
||||||
log.Printf("[Scale] error deploying %s, error: %s\n", name, deployErr)
|
log.Printf("[Scale] error deploying %s, error: %s\n", name, deployErr)
|
||||||
http.Error(w, deployErr.Error(), http.StatusBadRequest)
|
http.Error(w, deployErr.Error(), http.StatusBadRequest)
|
||||||
|
@ -19,6 +19,7 @@ import (
|
|||||||
"github.com/containerd/containerd/containers"
|
"github.com/containerd/containerd/containers"
|
||||||
"github.com/containerd/containerd/oci"
|
"github.com/containerd/containerd/oci"
|
||||||
gocni "github.com/containerd/go-cni"
|
gocni "github.com/containerd/go-cni"
|
||||||
|
"github.com/docker/distribution/reference"
|
||||||
"github.com/openfaas/faasd/pkg/cninetwork"
|
"github.com/openfaas/faasd/pkg/cninetwork"
|
||||||
"github.com/openfaas/faasd/pkg/service"
|
"github.com/openfaas/faasd/pkg/service"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -107,7 +108,14 @@ func (s *Supervisor) Start(svcs []Service) error {
|
|||||||
for _, svc := range svcs {
|
for _, svc := range svcs {
|
||||||
fmt.Printf("Preparing %s with image: %s\n", svc.Name, svc.Image)
|
fmt.Printf("Preparing %s with image: %s\n", svc.Name, svc.Image)
|
||||||
|
|
||||||
img, err := service.PrepareImage(ctx, s.client, svc.Image, defaultSnapshotter, faasServicesPullAlways)
|
r, err := reference.ParseNormalizedNamed(svc.Image)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
imgRef := reference.TagNameOnly(r).String()
|
||||||
|
|
||||||
|
img, err := service.PrepareImage(ctx, s.client, imgRef, defaultSnapshotter, faasServicesPullAlways)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user