-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: deployment webhook automation Co-authored-by: Luca Terracciano <[email protected]>
- Loading branch information
1 parent
0a99a3a
commit 7e2eac9
Showing
15 changed files
with
89 additions
and
15 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
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
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
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
File renamed without changes.
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
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: openfaas.com/v1 | ||
kind: Function | ||
metadata: | ||
creationTimestamp: "2021-07-19T21:22:34Z" | ||
generation: 1 | ||
name: figlet | ||
namespace: openfaas-fn | ||
resourceVersion: "1689214" | ||
selfLink: /apis/openfaas.com/v1/namespaces/openfaas-fn/functions/figlet | ||
uid: 21b5f4f5-3315-40d6-a900-25b11bca95bb | ||
spec: | ||
image: ghcr.io/openfaas/figlet:latest | ||
labels: | ||
com.openfaas.scale.factor: "20" | ||
com.openfaas.scale.max: "100" | ||
com.openfaas.scale.min: "1" | ||
com.openfaas.scale.zero: "false" | ||
edgeautoscaler.polimi.it/scheduler: edge-autoscaler | ||
name: figlet | ||
readOnlyRootFilesystem: false | ||
requests: | ||
memory: 1M |
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
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
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
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
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,33 @@ | ||
BASEDIR=$(dirname "$0") | ||
|
||
# create cluster | ||
# kind create cluster --config ./config/cluster-conf/kind.conf --image systemautoscaler/kindest-node:latest | ||
|
||
# openfaas | ||
# kubectl create ns openfaas | ||
# kubectl create ns openfaas-fn | ||
# helm install openfaas-kind openfaas/openfaas --namespace openfaas --set basic_auth=false --set functionNamespace=openfaas-fn --set operator.create=true | ||
|
||
# otherwise install with arkade | ||
# arkade install openfaas --operator | ||
|
||
# crd | ||
# make manifests | ||
# kubectl apply -f ./config/crd/bases | ||
|
||
# generate admission webhook certificates and secret in tmpdir | ||
chmod +x $BASEDIR/gen-certificates.sh | ||
$BASEDIR/gen-certificates.sh --namespace kube-system --service function-deployment-custom-scheduler --secret function-deployment-custom-scheduler | ||
|
||
# patch new mutitating webhook | ||
chmod +x $BASEDIR/patch-manifests.sh | ||
$BASEDIR/patch-manifests.sh | ||
|
||
# build docker image again | ||
cd $BASEDIR/.. | ||
make dev | ||
|
||
# apply manifests | ||
kubectl apply -f $BASEDIR/deployment.yaml | ||
kubectl apply -f $BASEDIR/service.yaml | ||
kubectl apply -f $BASEDIR/admission-registration-subst.yaml |
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
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
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