Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deb3523b59 | ||
|
|
0635a6a644 | ||
|
|
a9d55423ae | ||
|
|
496e4e3162 | ||
|
|
6667d7e383 | ||
|
|
922cb34243 | ||
|
|
fcf4fd2e63 | ||
|
|
69470a68d0 | ||
|
|
8df4fd0e7c | ||
|
|
275cfb55a6 | ||
|
|
3e25f474b0 | ||
|
|
d52c60216e | ||
|
|
16cbb87eab | ||
|
|
5fae765323 | ||
|
|
31f4f8c57e | ||
|
|
3ae1742953 | ||
|
|
d16de59e9f | ||
|
|
61d98152f1 | ||
|
|
300739c031 | ||
|
|
94eead8697 | ||
|
|
612206b033 | ||
|
|
985d94b5b8 | ||
|
|
4dde3c9520 | ||
|
|
9ccd2a4128 | ||
|
|
e9fd13b60c | ||
|
|
ee623d31b2 | ||
|
|
9612baecc0 | ||
|
|
691feaa84f | ||
|
|
6bf0c4124a | ||
|
|
9eb7acf061 | ||
|
|
e015d6d61f | ||
|
|
918214c0a9 | ||
|
|
526b5f0beb | ||
|
|
0aec9e139e | ||
|
|
8a3d8a4762 | ||
|
|
38d380924d | ||
|
|
1e0641d5f9 | ||
|
|
f11902e81b | ||
|
|
8db3d0065a | ||
|
|
92453908c6 | ||
|
|
28daccb3aa | ||
|
|
31639774b0 | ||
|
|
82d066b73a | ||
|
|
9c4fc4a306 | ||
|
|
68286fe44e | ||
|
|
d559628f29 | ||
|
|
4cbe6a7061 | ||
|
|
6d117ad43a | ||
|
|
70a0afd624 | ||
|
|
d2f201b721 | ||
|
|
3b2a86a8c9 | ||
|
|
9a07d7d96b | ||
|
|
31dfc3e4d3 | ||
|
|
66897cb9d0 | ||
|
|
57d3a80fc6 | ||
|
|
fa037166e1 | ||
|
|
32bd874ab6 | ||
|
|
b71a36dc1c | ||
|
|
261bf24974 | ||
|
|
6af53807aa | ||
|
|
f37e9e6f89 | ||
|
|
b9fa6ca20a | ||
|
|
c33842c94c | ||
|
|
9ff9a6e075 | ||
|
|
a64fcc3faf | ||
|
|
47cbbef06f | ||
|
|
dbd2153181 | ||
|
|
2bd005c387 | ||
|
|
3a9e5ab65d | ||
|
|
ee790b3e1e | ||
|
|
7eeb3ead66 | ||
|
|
827baea974 | ||
|
|
facd14de90 | ||
|
|
8d65b062f1 | ||
|
|
d933f0ba6c | ||
|
|
f2b790921b | ||
|
|
8fe62b755c | ||
|
|
b9513868ed | ||
|
|
0739aca920 | ||
|
|
18225db2bd | ||
|
|
8008a5420a | ||
|
|
3fa0f4bde3 | ||
|
|
a8a81ef5be | ||
|
|
1102999b4d | ||
|
|
da50c3759d | ||
|
|
e87c84ee2c | ||
|
|
d03395949b | ||
|
|
b19d18c8bc |
@@ -22,7 +22,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
name: Greetings
|
|
||||||
|
|
||||||
on: [pull_request, issues]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
greeting:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/first-interaction@v1
|
|
||||||
if: env.month != 'Oct'
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issue-message: 'Thank you for your first issue! ✨😊'
|
|
||||||
pr-message: 'Thank you for contributing to this project! ✨😊'
|
|
||||||
- uses: actions/first-interaction@v1
|
|
||||||
if: env.month == 'Oct'
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issue-message: 'Thank you for your first issue! Happy Hacktoberfest!!! ✨🎃👕✨'
|
|
||||||
pr-message: 'Thank you for contributing to this project. Happy Hacktoberfest!!! ✨🎃👕'
|
|
||||||
@@ -16,7 +16,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
lint-dashboards:
|
lint-dashboards:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GOLANGCI_LINT_VERSION: v1.49.0
|
GOLANGCI_LINT_VERSION: v1.50.1
|
||||||
GOLANGCI_LINT_TIMEOUT: 5m
|
GOLANGCI_LINT_TIMEOUT: 5m
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
+182
-11
@@ -22,17 +22,18 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HELM_VERSION: v3.9.0
|
HELM_VERSION: v3.10.1
|
||||||
KIND_VERSION: v0.14.0
|
KIND_VERSION: v0.17.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Job to run change detection
|
# Job to run change detection
|
||||||
integration-test:
|
integration-test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
kindversion: ["v1.19.16", "v1.20.15", "v1.21.12"]
|
kindversion: ["v1.19.16", "v1.20.15", "v1.21.14"]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
@@ -55,7 +56,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ env.HELM_VERSION }}
|
version: ${{ env.HELM_VERSION }}
|
||||||
|
|
||||||
- name: Kind Clutser
|
- name: Kind Cluster
|
||||||
uses: engineerd/setup-kind@v0.5.0
|
uses: engineerd/setup-kind@v0.5.0
|
||||||
with:
|
with:
|
||||||
image: kindest/node:${{ matrix.kindversion }}
|
image: kindest/node:${{ matrix.kindversion }}
|
||||||
@@ -67,6 +68,8 @@ jobs:
|
|||||||
kubectl cluster-info --context kind-kind
|
kubectl cluster-info --context kind-kind
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
sudo apt-get install -y apache2-utils
|
sudo apt-get install -y apache2-utils
|
||||||
|
kubectl config use-context kind-kind
|
||||||
|
kubectl config view
|
||||||
|
|
||||||
- name: Helm chart lint
|
- name: Helm chart lint
|
||||||
run: |
|
run: |
|
||||||
@@ -74,12 +77,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Skaffold
|
- name: Install Skaffold
|
||||||
run: |
|
run: |
|
||||||
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
|
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-linux-amd64
|
||||||
sudo install skaffold /usr/local/bin/
|
sudo install skaffold /usr/local/bin/
|
||||||
skaffold version
|
skaffold version
|
||||||
|
|
||||||
- name: Install GoReleaser
|
- name: Install GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v3
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
|
|
||||||
@@ -88,7 +91,8 @@ jobs:
|
|||||||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||||
helm repo update
|
helm repo update
|
||||||
kubectl create ns monitoring
|
kubectl create ns monitoring
|
||||||
helm install monitoring prometheus-community/prometheus -n monitoring
|
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring \
|
||||||
|
--set grafana.enabled=false --set alertmanager.enabled=false
|
||||||
|
|
||||||
- name: Build and Install Fission CLI
|
- name: Build and Install Fission CLI
|
||||||
run: |
|
run: |
|
||||||
@@ -98,6 +102,7 @@ jobs:
|
|||||||
sudo chmod +x /usr/local/bin/fission
|
sudo chmod +x /usr/local/bin/fission
|
||||||
|
|
||||||
- name: Build and Install Fission
|
- name: Build and Install Fission
|
||||||
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
kubectl create ns fission
|
kubectl create ns fission
|
||||||
make create-crds
|
make create-crds
|
||||||
@@ -109,34 +114,200 @@ jobs:
|
|||||||
kubectl port-forward svc/controller 8889:80 -nfission &
|
kubectl port-forward svc/controller 8889:80 -nfission &
|
||||||
|
|
||||||
- name: Get fission version
|
- name: Get fission version
|
||||||
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
fission version
|
fission version
|
||||||
|
|
||||||
- name: Integration tests
|
- name: Integration tests
|
||||||
|
timeout-minutes: 90
|
||||||
run: ./test/kind_CI.sh
|
run: ./test/kind_CI.sh
|
||||||
|
|
||||||
- name: Collect Fission Dump
|
- name: Collect Fission Dump
|
||||||
|
timeout-minutes: 5
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
command -v fission && fission support dump
|
command -v fission && fission support dump
|
||||||
|
|
||||||
- name: Kind export logs
|
- name: Kind export logs
|
||||||
|
timeout-minutes: 10
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
kind export logs --name kind kind-logs
|
kind export logs --name kind kind-logs
|
||||||
|
|
||||||
|
- name: Backup prometheus data
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
TRACE=1 ./hack/backup-prometheus.sh
|
||||||
|
|
||||||
- name: Archive fission dump
|
- name: Archive fission dump
|
||||||
if: ${{ failure() }}
|
timeout-minutes: 10
|
||||||
uses: actions/upload-artifact@v2
|
if: ${{ failure() || cancelled() }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: fission-dump-${{ github.run_id }}-${{ matrix.kindversion }}
|
name: fission-dump-${{ github.run_id }}-${{ matrix.kindversion }}
|
||||||
path: fission-dump/*.zip
|
path: fission-dump/*.zip
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Archive kind logs
|
- name: Archive prometheus dump
|
||||||
|
timeout-minutes: 10
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: prom-dump-${{ github.run_id }}-${{ matrix.kindversion }}
|
||||||
|
path: /tmp/prometheus/*
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Archive kind logs
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
|
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
|
||||||
path: kind-logs/*
|
path: kind-logs/*
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
|
# Job to ensure backward compatibility if function and builder pods are created
|
||||||
|
# inside functionNamespace and builderNamespace
|
||||||
|
integration-test-old:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-old-ci') }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
kindversion: ["v1.19.16"]
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: setup go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version-file: "go.mod"
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: fission/examples
|
||||||
|
path: examples
|
||||||
|
|
||||||
|
- name: Helm installation
|
||||||
|
uses: Azure/setup-helm@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.HELM_VERSION }}
|
||||||
|
|
||||||
|
- name: Kind Cluster
|
||||||
|
uses: engineerd/setup-kind@v0.5.0
|
||||||
|
with:
|
||||||
|
image: kindest/node:${{ matrix.kindversion }}
|
||||||
|
version: ${{ env.KIND_VERSION }}
|
||||||
|
config: kind.yaml
|
||||||
|
|
||||||
|
- name: Configuring and testing the Installation
|
||||||
|
run: |
|
||||||
|
kubectl cluster-info --context kind-kind
|
||||||
|
kubectl get nodes
|
||||||
|
sudo apt-get install -y apache2-utils
|
||||||
|
kubectl config use-context kind-kind
|
||||||
|
kubectl config view
|
||||||
|
|
||||||
|
- name: Helm chart lint
|
||||||
|
run: |
|
||||||
|
helm lint charts/fission-all/
|
||||||
|
|
||||||
|
- name: Install Skaffold
|
||||||
|
run: |
|
||||||
|
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.3/skaffold-linux-amd64
|
||||||
|
sudo install skaffold /usr/local/bin/
|
||||||
|
skaffold version
|
||||||
|
|
||||||
|
- name: Install GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v3
|
||||||
|
with:
|
||||||
|
install-only: true
|
||||||
|
|
||||||
|
- name: Setup Prometheus Stack
|
||||||
|
run: |
|
||||||
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||||
|
helm repo update
|
||||||
|
kubectl create ns monitoring
|
||||||
|
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring \
|
||||||
|
--set grafana.enabled=false --set alertmanager.enabled=false
|
||||||
|
|
||||||
|
- name: Build and Install Fission CLI
|
||||||
|
run: |
|
||||||
|
make debug-vars
|
||||||
|
make build-fission-cli
|
||||||
|
sudo make install-fission-cli
|
||||||
|
sudo chmod +x /usr/local/bin/fission
|
||||||
|
|
||||||
|
- name: Build and Install Fission
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: |
|
||||||
|
kubectl create ns fission
|
||||||
|
make create-crds
|
||||||
|
SKAFFOLD_PROFILE=kind-ci-old make skaffold-deploy
|
||||||
|
|
||||||
|
- name: Port-forward fission components
|
||||||
|
run: |
|
||||||
|
kubectl port-forward svc/router 8888:80 -nfission &
|
||||||
|
kubectl port-forward svc/controller 8889:80 -nfission &
|
||||||
|
|
||||||
|
- name: Get fission version
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: |
|
||||||
|
fission version
|
||||||
|
|
||||||
|
- name: Integration tests
|
||||||
|
timeout-minutes: 90
|
||||||
|
run: |
|
||||||
|
export FUNCTION_NAMESPACE=fission-function
|
||||||
|
export BUILDER_NAMESPACE=fission-builder
|
||||||
|
./test/kind_CI.sh
|
||||||
|
|
||||||
|
- name: Collect Fission Dump
|
||||||
|
timeout-minutes: 5
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
command -v fission && fission support dump
|
||||||
|
|
||||||
|
- name: Kind export logs
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
kind export logs --name kind kind-logs
|
||||||
|
|
||||||
|
- name: Backup prometheus data
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
TRACE=1 ./hack/backup-prometheus.sh
|
||||||
|
|
||||||
|
- name: Archive fission dump
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ failure() || cancelled() }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: fission-dump-${{ github.run_id }}-${{ github.job_id }}-${{ matrix.kindversion }}
|
||||||
|
path: fission-dump/*.zip
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Archive prometheus dump
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: prom-dump-${{ github.run_id }}-${{ github.job_id }}-${{ matrix.kindversion }}
|
||||||
|
path: /tmp/prometheus/*
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Archive kind logs
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kind-logs-${{ github.run_id }}-${{ github.job_id }}-${{ matrix.kindversion }}
|
||||||
|
path: kind-logs/*
|
||||||
|
retention-days: 5
|
||||||
@@ -6,7 +6,7 @@ on:
|
|||||||
- v2.**
|
- v2.**
|
||||||
|
|
||||||
env:
|
env:
|
||||||
KIND_VERSION: v0.14.0
|
KIND_VERSION: v0.17.0
|
||||||
KIND_NODE_IMAGE_TAG: v1.19.16
|
KIND_NODE_IMAGE_TAG: v1.19.16
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -22,12 +22,13 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HELM_VERSION: v3.9.0
|
HELM_VERSION: v3.10.1
|
||||||
KIND_VERSION: v0.14.0
|
KIND_VERSION: v0.17.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upgrade-test:
|
upgrade-test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -55,7 +56,7 @@ jobs:
|
|||||||
version: ${{ env.KIND_VERSION }}
|
version: ${{ env.KIND_VERSION }}
|
||||||
|
|
||||||
- name: Install GoReleaser
|
- name: Install GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v3
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
|
|
||||||
@@ -64,6 +65,9 @@ jobs:
|
|||||||
kubectl cluster-info --context kind-kind
|
kubectl cluster-info --context kind-kind
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
kubectl get storageclasses.storage.k8s.io
|
kubectl get storageclasses.storage.k8s.io
|
||||||
|
kubectl config use-context kind-kind
|
||||||
|
kubectl config set-context --current --namespace=default
|
||||||
|
kubectl config view
|
||||||
|
|
||||||
- name: Dump system info
|
- name: Dump system info
|
||||||
run: |
|
run: |
|
||||||
@@ -83,6 +87,7 @@ jobs:
|
|||||||
&& install_fission_cli
|
&& install_fission_cli
|
||||||
|
|
||||||
- name: Test previously created fission objects with new release
|
- name: Test previously created fission objects with new release
|
||||||
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
source ./test/upgrade_test/fission_objects.sh test_fission_objects
|
source ./test/upgrade_test/fission_objects.sh test_fission_objects
|
||||||
|
|
||||||
@@ -91,10 +96,23 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
command -v fission && fission support dump
|
command -v fission && fission support dump
|
||||||
|
|
||||||
|
- name: Kind export logs
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
kind export logs --name kind kind-logs
|
||||||
|
|
||||||
- name: Archive fission dump
|
- name: Archive fission dump
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() || cancelled() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: fission-dump
|
name: fission-dump-${{ github.run_id }}-${{ matrix.kindversion }}
|
||||||
path: fission-dump/*.zip
|
path: fission-dump/*.zip
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Archive kind logs
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
|
||||||
|
path: kind-logs/*
|
||||||
|
retention-days: 5
|
||||||
|
|||||||
@@ -37,3 +37,6 @@ manifest/
|
|||||||
coverage.txt
|
coverage.txt
|
||||||
|
|
||||||
cosign.key
|
cosign.key
|
||||||
|
|
||||||
|
# Dumps
|
||||||
|
.dumps/
|
||||||
|
|||||||
+2
-1
@@ -14,6 +14,7 @@ linters:
|
|||||||
- misspell
|
- misspell
|
||||||
- nakedret
|
- nakedret
|
||||||
- unconvert
|
- unconvert
|
||||||
|
- promlinter
|
||||||
# Enable in future
|
# Enable in future
|
||||||
# - bodyclose
|
# - bodyclose
|
||||||
# - dogsled
|
# - dogsled
|
||||||
@@ -31,4 +32,4 @@ linters-settings:
|
|||||||
goimports:
|
goimports:
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
# put imports beginning with prefix after 3rd-party packages;
|
||||||
# it's a comma-separated list of prefixes
|
# it's a comma-separated list of prefixes
|
||||||
local-prefixes: github.com/fission/fission
|
local: github.com/fission/fission
|
||||||
|
|||||||
+15
-15
@@ -84,7 +84,7 @@ dockers:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- "fission/builder:latest-amd64"
|
- "fission/builder:latest-amd64"
|
||||||
- "fission/builder:{{ .Tag }}-amd64"
|
- "fission/builder:{{ .Tag }}-amd64"
|
||||||
dockerfile: cmd/builder/Dockerfile.fission-builder
|
dockerfile: cmd/builder/Dockerfile
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/amd64"
|
- "--platform=linux/amd64"
|
||||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
@@ -96,28 +96,28 @@ dockers:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- "fission/fetcher:latest-amd64"
|
- "fission/fetcher:latest-amd64"
|
||||||
- "fission/fetcher:{{ .Tag }}-amd64"
|
- "fission/fetcher:{{ .Tag }}-amd64"
|
||||||
dockerfile: cmd/fetcher/Dockerfile.fission-fetcher
|
dockerfile: cmd/fetcher/Dockerfile
|
||||||
- <<: *docker-amd64
|
- <<: *docker-amd64
|
||||||
ids:
|
ids:
|
||||||
- fission-bundle
|
- fission-bundle
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/fission-bundle:latest-amd64"
|
- "fission/fission-bundle:latest-amd64"
|
||||||
- "fission/fission-bundle:{{ .Tag }}-amd64"
|
- "fission/fission-bundle:{{ .Tag }}-amd64"
|
||||||
dockerfile: cmd/fission-bundle/Dockerfile.fission-bundle
|
dockerfile: cmd/fission-bundle/Dockerfile
|
||||||
- <<: *docker-amd64
|
- <<: *docker-amd64
|
||||||
ids:
|
ids:
|
||||||
- pre-upgrade-checks
|
- pre-upgrade-checks
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/pre-upgrade-checks:latest-amd64"
|
- "fission/pre-upgrade-checks:latest-amd64"
|
||||||
- "fission/pre-upgrade-checks:{{ .Tag }}-amd64"
|
- "fission/pre-upgrade-checks:{{ .Tag }}-amd64"
|
||||||
dockerfile: cmd/preupgradechecks/Dockerfile.fission-preupgradechecks
|
dockerfile: cmd/preupgradechecks/Dockerfile
|
||||||
- <<: *docker-amd64
|
- <<: *docker-amd64
|
||||||
ids:
|
ids:
|
||||||
- reporter
|
- reporter
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/reporter:latest-amd64"
|
- "fission/reporter:latest-amd64"
|
||||||
- "fission/reporter:{{ .Tag }}-amd64"
|
- "fission/reporter:{{ .Tag }}-amd64"
|
||||||
dockerfile: cmd/reporter/Dockerfile.reporter
|
dockerfile: cmd/reporter/Dockerfile
|
||||||
- &docker-arm64
|
- &docker-arm64
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
@@ -127,7 +127,7 @@ dockers:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- "fission/builder:latest-arm64"
|
- "fission/builder:latest-arm64"
|
||||||
- "fission/builder:{{ .Tag }}-arm64"
|
- "fission/builder:{{ .Tag }}-arm64"
|
||||||
dockerfile: cmd/builder/Dockerfile.fission-builder
|
dockerfile: cmd/builder/Dockerfile
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/arm64"
|
- "--platform=linux/arm64"
|
||||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
@@ -139,28 +139,28 @@ dockers:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- "fission/fetcher:latest-arm64"
|
- "fission/fetcher:latest-arm64"
|
||||||
- "fission/fetcher:{{ .Tag }}-arm64"
|
- "fission/fetcher:{{ .Tag }}-arm64"
|
||||||
dockerfile: cmd/fetcher/Dockerfile.fission-fetcher
|
dockerfile: cmd/fetcher/Dockerfile
|
||||||
- <<: *docker-arm64
|
- <<: *docker-arm64
|
||||||
ids:
|
ids:
|
||||||
- fission-bundle
|
- fission-bundle
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/fission-bundle:latest-arm64"
|
- "fission/fission-bundle:latest-arm64"
|
||||||
- "fission/fission-bundle:{{ .Tag }}-arm64"
|
- "fission/fission-bundle:{{ .Tag }}-arm64"
|
||||||
dockerfile: cmd/fission-bundle/Dockerfile.fission-bundle
|
dockerfile: cmd/fission-bundle/Dockerfile
|
||||||
- <<: *docker-arm64
|
- <<: *docker-arm64
|
||||||
ids:
|
ids:
|
||||||
- pre-upgrade-checks
|
- pre-upgrade-checks
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/pre-upgrade-checks:latest-arm64"
|
- "fission/pre-upgrade-checks:latest-arm64"
|
||||||
- "fission/pre-upgrade-checks:{{ .Tag }}-arm64"
|
- "fission/pre-upgrade-checks:{{ .Tag }}-arm64"
|
||||||
dockerfile: cmd/preupgradechecks/Dockerfile.fission-preupgradechecks
|
dockerfile: cmd/preupgradechecks/Dockerfile
|
||||||
- <<: *docker-arm64
|
- <<: *docker-arm64
|
||||||
ids:
|
ids:
|
||||||
- reporter
|
- reporter
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/reporter:latest-arm64"
|
- "fission/reporter:latest-arm64"
|
||||||
- "fission/reporter:{{ .Tag }}-arm64"
|
- "fission/reporter:{{ .Tag }}-arm64"
|
||||||
dockerfile: cmd/reporter/Dockerfile.reporter
|
dockerfile: cmd/reporter/Dockerfile
|
||||||
- &docker-armv7
|
- &docker-armv7
|
||||||
use: buildx
|
use: buildx
|
||||||
goos: linux
|
goos: linux
|
||||||
@@ -171,7 +171,7 @@ dockers:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- "fission/builder:latest-armv7"
|
- "fission/builder:latest-armv7"
|
||||||
- "fission/builder:{{ .Tag }}-armv7"
|
- "fission/builder:{{ .Tag }}-armv7"
|
||||||
dockerfile: cmd/builder/Dockerfile.fission-builder
|
dockerfile: cmd/builder/Dockerfile
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/arm/v7"
|
- "--platform=linux/arm/v7"
|
||||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
@@ -183,28 +183,28 @@ dockers:
|
|||||||
image_templates:
|
image_templates:
|
||||||
- "fission/fetcher:latest-armv7"
|
- "fission/fetcher:latest-armv7"
|
||||||
- "fission/fetcher:{{ .Tag }}-armv7"
|
- "fission/fetcher:{{ .Tag }}-armv7"
|
||||||
dockerfile: cmd/fetcher/Dockerfile.fission-fetcher
|
dockerfile: cmd/fetcher/Dockerfile
|
||||||
- <<: *docker-armv7
|
- <<: *docker-armv7
|
||||||
ids:
|
ids:
|
||||||
- fission-bundle
|
- fission-bundle
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/fission-bundle:latest-armv7"
|
- "fission/fission-bundle:latest-armv7"
|
||||||
- "fission/fission-bundle:{{ .Tag }}-armv7"
|
- "fission/fission-bundle:{{ .Tag }}-armv7"
|
||||||
dockerfile: cmd/fission-bundle/Dockerfile.fission-bundle
|
dockerfile: cmd/fission-bundle/Dockerfile
|
||||||
- <<: *docker-armv7
|
- <<: *docker-armv7
|
||||||
ids:
|
ids:
|
||||||
- pre-upgrade-checks
|
- pre-upgrade-checks
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/pre-upgrade-checks:latest-armv7"
|
- "fission/pre-upgrade-checks:latest-armv7"
|
||||||
- "fission/pre-upgrade-checks:{{ .Tag }}-armv7"
|
- "fission/pre-upgrade-checks:{{ .Tag }}-armv7"
|
||||||
dockerfile: cmd/preupgradechecks/Dockerfile.fission-preupgradechecks
|
dockerfile: cmd/preupgradechecks/Dockerfile
|
||||||
- <<: *docker-armv7
|
- <<: *docker-armv7
|
||||||
ids:
|
ids:
|
||||||
- reporter
|
- reporter
|
||||||
image_templates:
|
image_templates:
|
||||||
- "fission/reporter:latest-armv7"
|
- "fission/reporter:latest-armv7"
|
||||||
- "fission/reporter:{{ .Tag }}-armv7"
|
- "fission/reporter:{{ .Tag }}-armv7"
|
||||||
dockerfile: cmd/reporter/Dockerfile.reporter
|
dockerfile: cmd/reporter/Dockerfile
|
||||||
docker_manifests:
|
docker_manifests:
|
||||||
- name_template: fission/builder:{{ .Tag }}
|
- name_template: fission/builder:{{ .Tag }}
|
||||||
image_templates:
|
image_templates:
|
||||||
|
|||||||
@@ -58,18 +58,26 @@ install-fission-cli:
|
|||||||
mv dist/fission-cli_$(GOOS)_$(GOARCH)_v1/fission$(FISSION-CLI-SUFFIX) /usr/local/bin/fission
|
mv dist/fission-cli_$(GOOS)_$(GOARCH)_v1/fission$(FISSION-CLI-SUFFIX) /usr/local/bin/fission
|
||||||
|
|
||||||
### Codegen
|
### Codegen
|
||||||
codegen:
|
codegen: controller-gen-install
|
||||||
|
@controller-gen object:headerFile="hack/boilerplate.txt" paths="./..."
|
||||||
@./hack/update-codegen.sh
|
@./hack/update-codegen.sh
|
||||||
|
|
||||||
### CRDs
|
### CRDs
|
||||||
controller-gen-install:
|
controller-gen-install:
|
||||||
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
|
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0
|
||||||
|
|
||||||
generate-crds: controller-gen-install
|
generate-crds: controller-gen-install
|
||||||
controller-gen crd \
|
controller-gen crd \
|
||||||
paths=./pkg/apis/core/v1 \
|
paths=./pkg/apis/core/v1 \
|
||||||
output:crd:artifacts:config=crds/v1
|
output:crd:artifacts:config=crds/v1
|
||||||
|
|
||||||
|
### Webhook generation: it generates webhook configs with help of kubebuilder:webhook tag
|
||||||
|
generate-webhooks: controller-gen-install
|
||||||
|
controller-gen webhook \
|
||||||
|
paths=./pkg/apis/core/v1 \
|
||||||
|
output:dir=charts/fission-all/templates/webhook-server
|
||||||
|
|
||||||
|
|
||||||
create-crds:
|
create-crds:
|
||||||
@kubectl create -k crds/v1
|
@kubectl create -k crds/v1
|
||||||
|
|
||||||
@@ -91,7 +99,7 @@ generate-cli-docs:
|
|||||||
go run tools/cmd-docs/main.go -o "../fission.io/content/en/docs/reference/fission-cli"
|
go run tools/cmd-docs/main.go -o "../fission.io/content/en/docs/reference/fission-cli"
|
||||||
|
|
||||||
install-crd-ref-docs:
|
install-crd-ref-docs:
|
||||||
go install github.com/elastic/crd-ref-docs@master
|
go install github.com/elastic/crd-ref-docs@v0.0.8
|
||||||
|
|
||||||
generate-crd-ref-docs: install-crd-ref-docs
|
generate-crd-ref-docs: install-crd-ref-docs
|
||||||
# crd-ref-docs: https://github.com/elastic/crd-ref-docs
|
# crd-ref-docs: https://github.com/elastic/crd-ref-docs
|
||||||
@@ -100,15 +108,15 @@ generate-crd-ref-docs: install-crd-ref-docs
|
|||||||
cat out.md >> crd_docs.md && rm out.md
|
cat out.md >> crd_docs.md && rm out.md
|
||||||
mv crd_docs.md ../fission.io/content/en/docs/reference/crd-reference.md
|
mv crd_docs.md ../fission.io/content/en/docs/reference/crd-reference.md
|
||||||
|
|
||||||
all-generators: codegen generate-crds generate-swagger-doc
|
all-generators: codegen generate-crds generate-swagger-doc generate-cli-docs generate-crd-ref-docs
|
||||||
|
|
||||||
skaffold-prebuild:
|
skaffold-prebuild:
|
||||||
@GOOS=linux GOARCH=amd64 GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist --single-target
|
@GOOS=linux GOARCH=amd64 GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist --single-target
|
||||||
@cp -v cmd/builder/Dockerfile.fission-builder dist/builder_linux_amd64_v1/Dockerfile
|
@cp -v cmd/builder/Dockerfile dist/builder_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/fetcher/Dockerfile.fission-fetcher dist/fetcher_linux_amd64_v1/Dockerfile
|
@cp -v cmd/fetcher/Dockerfile dist/fetcher_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/fission-bundle/Dockerfile.fission-bundle dist/fission-bundle_linux_amd64_v1/Dockerfile
|
@cp -v cmd/fission-bundle/Dockerfile dist/fission-bundle_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/reporter/Dockerfile.reporter dist/reporter_linux_amd64_v1/Dockerfile
|
@cp -v cmd/reporter/Dockerfile dist/reporter_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/preupgradechecks/Dockerfile.fission-preupgradechecks dist/pre-upgrade-checks_linux_amd64_v1/Dockerfile
|
@cp -v cmd/preupgradechecks/Dockerfile dist/pre-upgrade-checks_linux_amd64_v1/Dockerfile
|
||||||
|
|
||||||
skaffold-deploy: skaffold-prebuild
|
skaffold-deploy: skaffold-prebuild
|
||||||
skaffold run -p $(SKAFFOLD_PROFILE)
|
skaffold run -p $(SKAFFOLD_PROFILE)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: fission-all
|
name: fission-all
|
||||||
version: v1.17.0
|
version: v1.18.0
|
||||||
appVersion: v1.17.0
|
appVersion: v1.18.0
|
||||||
description: Fission is a fast serverless framework for Kubernetes.
|
description: Fission is a fast serverless framework for Kubernetes.
|
||||||
home: https://fission.io/
|
home: https://fission.io/
|
||||||
icon: https://fission.io/images/fission-logo-white.svg
|
icon: https://fission.io/images/fission-logo-white.svg
|
||||||
|
|||||||
@@ -8,6 +8,4 @@ exclusions:
|
|||||||
target-instance-rule:
|
target-instance-rule:
|
||||||
reason: "Most panels dont need to be filtered by instance"
|
reason: "Most panels dont need to be filtered by instance"
|
||||||
panel-units-rule:
|
panel-units-rule:
|
||||||
reason: "Some panels are using the 'number' unit which throws a linting error."
|
reason: "Some panels are using the 'number' unit which throws a linting error."
|
||||||
target-counter-agg-rule:
|
|
||||||
reason: "disabled for fission_archives_total. This metric should be not have total due to naming conventions as its a gauge, not a counter"
|
|
||||||
@@ -879,7 +879,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "fission_archives_total",
|
"expr": "fission_archives",
|
||||||
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@@ -970,7 +970,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "rate(fission_archives_total[$__rate_interval])",
|
"expr": "rate(fission_archives[$__rate_interval])",
|
||||||
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
"legendFormat": "Namespace: {{namespace}} Pod: {{pod}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
|
||||||
|
{{- define "fision.selfSignedCABundleCertPEM" -}}
|
||||||
|
{{- $caKeypair := .selfSignedCAKeypair | default (genCA "fission-ca" 1825) -}}
|
||||||
|
{{- $_ := set . "selfSignedCAKeypair" $caKeypair -}}
|
||||||
|
{{- $caKeypair.Cert -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "webhook.caBundleCertPEM" -}}
|
||||||
|
{{- if .Values.webhook.caBundlePEM -}}
|
||||||
|
{{- trim .Values.webhook.caBundlePEM -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $caKeypair := .selfSignedCAKeypair | default (genCA "fission-ca" 1825) -}}
|
||||||
|
{{- $_ := set . "selfSignedCAKeypair" $caKeypair -}}
|
||||||
|
{{- $caKeypair.Cert -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "webhook.certPEM" -}}
|
||||||
|
{{- if .Values.webhook.crtPEM -}}
|
||||||
|
{{- trim .Values.webhook.crtPEM -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $webhookName := printf "%s.%s.svc" (include "fission-webhook.svc" .) .Release.Namespace }}
|
||||||
|
{{- $fullWebhookName := printf "%s.%s.svc.cluster.local" (include "fission-webhook.svc" .) .Release.Namespace -}}
|
||||||
|
{{- $webhookCA := required "self-signed CA keypair is requried" .selfSignedCAKeypair -}}
|
||||||
|
{{- $webhookServerTLSKeypair := .webhookTLSKeypair | default (genSignedCert $webhookName nil (list $webhookName $fullWebhookName) 1825 $webhookCA) }}
|
||||||
|
{{- $_ := set . "webhookTLSKeypair" $webhookServerTLSKeypair -}}
|
||||||
|
{{- $webhookServerTLSKeypair.Cert -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "webhook.keyPEM" -}}
|
||||||
|
{{- if .Values.webhook.keyPEM -}}
|
||||||
|
{{ trim .Values.webhook.keyPEM }}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $webhookName := printf "%s.%s.svc" (include "fission-webhook.svc" .) .Release.Namespace -}}
|
||||||
|
{{- $fullWebhookName := printf "%s.%s.svc.cluster.local" (include "fission-webhook.svc" .) .Release.Namespace -}}
|
||||||
|
{{- $webhookCA := required "self-signed CA keypair is requried" .selfSignedCAKeypair -}}
|
||||||
|
{{- $webhookServerTLSKeypair := .webhookTLSKeypair | default (genSignedCert $webhookName nil (list $webhookName $fullWebhookName) 1825 $webhookCA) -}}
|
||||||
|
{{- $_ := set . "webhookTLSKeypair" $webhookServerTLSKeypair -}}
|
||||||
|
{{- $webhookServerTLSKeypair.Key -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,185 @@
|
|||||||
|
{{- define "buildermgr-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "controller-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- canaryconfigs
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- httptriggers
|
||||||
|
- kuberneteswatchtriggers
|
||||||
|
- messagequeuetriggers
|
||||||
|
- packages
|
||||||
|
- timetriggers
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "executor-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "kubewatcher-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- kuberneteswatchtriggers
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "kafka-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- messagequeuetriggers
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "keda-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- messagequeuetriggers
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "preupgrade-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- canaryconfigs
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- httptriggers
|
||||||
|
- kuberneteswatchtriggers
|
||||||
|
- messagequeuetriggers
|
||||||
|
- packages
|
||||||
|
- timetriggers
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
{{- end }}
|
||||||
|
{{- define "router-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- httptriggers
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "storagesvc-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
{{- end }}
|
||||||
|
{{- define "timer-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
- functions
|
||||||
|
- packages
|
||||||
|
- timetriggers
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
{{- define "canaryconfig-rules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- canaryconfigs
|
||||||
|
- httptriggers
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,393 @@
|
|||||||
|
{{- define "buildermgr-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "canaryconfig-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "controller-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- namespaces
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "executor-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- services
|
||||||
|
- replicationcontrollers
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- if .Values.executor.serviceAccountCheck.enabled }}
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- serviceaccounts
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- localsubjectaccessreviews
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- rbac.authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- rolebindings
|
||||||
|
- roles
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
{{- end }}
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
- deployments/scale
|
||||||
|
- replicasets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- autoscaling
|
||||||
|
resources:
|
||||||
|
- horizontalpodautoscalers
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- metrics.k8s.io
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
{{- end }}
|
||||||
|
{{- define "fluentbit-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "kubewatcher-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- pods
|
||||||
|
- secrets
|
||||||
|
- services
|
||||||
|
- replicationcontrollers
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
resources:
|
||||||
|
- jobs
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "kafka-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- pods
|
||||||
|
- secrets
|
||||||
|
- services
|
||||||
|
- replicationcontrollers
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
- deployments/scale
|
||||||
|
- replicasets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "keda-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- services
|
||||||
|
- replicationcontrollers
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
- deployments/scale
|
||||||
|
- replicasets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- keda.sh
|
||||||
|
resources:
|
||||||
|
- scaledjobs
|
||||||
|
- scaledobjects
|
||||||
|
- scaledjobs/finalizers
|
||||||
|
- scaledjobs/status
|
||||||
|
- triggerauthentications
|
||||||
|
- triggerauthentications/status
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- if .Values.mqt_keda.enabled }}
|
||||||
|
- apiGroups:
|
||||||
|
- keda.k8s.io
|
||||||
|
resources:
|
||||||
|
- scaledjobs
|
||||||
|
- scaledobjects
|
||||||
|
- scaledjobs/finalizers
|
||||||
|
- scaledjobs/status
|
||||||
|
- triggerauthentications
|
||||||
|
- triggerauthentications/status
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end }}
|
||||||
|
- apiGroups:
|
||||||
|
- metrics.k8s.io
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
{{- end }}
|
||||||
|
{{- define "preupgrade-kuberules" }}
|
||||||
|
# TODO: Kept for future in case preupgrade needs any permissions in the future
|
||||||
|
rules: []
|
||||||
|
{{- end }}
|
||||||
|
{{- define "router-kuberules" }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- networking.k8s.io
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
{{- end }}
|
||||||
|
{{- define "timer-kuberules" }}
|
||||||
|
rules: []
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
{{- define "kubernetes-role-generator" }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
{{- if eq "preupgrade" .component }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
|
helm.sh/hook-weight: "-2"
|
||||||
|
{{- end }}
|
||||||
|
name: "{{ .Release.Name }}-{{ .component }}"
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
{{- if eq "buildermgr" .component }}
|
||||||
|
{{- include "buildermgr-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "canaryconfig" .component }}
|
||||||
|
{{- include "canaryconfig-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "controller" .component }}
|
||||||
|
{{- include "controller-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "fluentbit" .component }}
|
||||||
|
{{- include "fluentbit-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "executor" .component }}
|
||||||
|
{{- include "executor-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "kubewatcher" .component }}
|
||||||
|
{{- include "kubewatcher-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "kafka" .component }}
|
||||||
|
{{- include "kafka-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "keda" .component }}
|
||||||
|
{{- include "keda-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "preupgrade" .component }}
|
||||||
|
{{- include "preupgrade-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "router" .component }}
|
||||||
|
{{- include "router-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "timer" .component }}
|
||||||
|
{{- include "timer-kuberules" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
{{- if eq "preupgrade" .component }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
|
{{- end }}
|
||||||
|
name: "{{ .Release.Name }}-{{ .component }}"
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "fission-{{ .component }}"
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: "{{ .Release.Name }}-{{ .component }}"
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
{{- define "fission-role-generator" }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
{{- if eq "preupgrade" .component }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
|
helm.sh/hook-weight: "-2"
|
||||||
|
{{- end }}
|
||||||
|
name: "{{ .Release.Name }}-{{ .component }}-fission-cr"
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
{{- if eq "buildermgr" .component }}
|
||||||
|
{{- include "buildermgr-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "controller" .component }}
|
||||||
|
{{- include "controller-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "executor" .component }}
|
||||||
|
{{- include "executor-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "kubewatcher" .component }}
|
||||||
|
{{- include "kubewatcher-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "kafka" .component }}
|
||||||
|
{{- include "kafka-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "keda" .component }}
|
||||||
|
{{- include "keda-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "preupgrade" .component }}
|
||||||
|
{{- include "preupgrade-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "router" .component }}
|
||||||
|
{{- include "router-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "storagesvc" .component }}
|
||||||
|
{{- include "storagesvc-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "timer" .component }}
|
||||||
|
{{- include "timer-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq "canaryconfig" .component }}
|
||||||
|
{{- include "canaryconfig-rules" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
{{- if eq "preupgrade" .component }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
|
{{- end }}
|
||||||
|
name: "{{ .Release.Name }}-{{ .component }}-fission-cr"
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "fission-{{ .component }}"
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: "{{ .Release.Name }}-{{ .component }}-fission-cr"
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
{{- define "fissionFunction.roles" }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-fission-fetcher
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-fission-builder
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
resources:
|
||||||
|
- packages
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
name: {{ .Release.Name }}-fission-fetcher-websocket
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- "events"
|
||||||
|
verbs:
|
||||||
|
- "get"
|
||||||
|
- "list"
|
||||||
|
- "watch"
|
||||||
|
- "create"
|
||||||
|
- "update"
|
||||||
|
- "patch"
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fissionFunction.rolebindings" }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-fission-fetcher
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ .Release.Name }}-fission-fetcher
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: fission-fetcher
|
||||||
|
{{- if and (.Values.functionNamespace) (eq .namespace "default") }}
|
||||||
|
namespace: {{ .Values.functionNamespace }}
|
||||||
|
{{- else }}
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
{{- end }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-fission-builder
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ .Release.Name }}-fission-builder
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: fission-builder
|
||||||
|
{{- if and (.Values.builderNamespace) (eq .namespace "default") }}
|
||||||
|
namespace: {{ .Values.builderNamespace }}
|
||||||
|
{{- else }}
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
{{- end }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-fission-fetcher-websocket
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ .Release.Name }}-fission-fetcher-websocket
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: fission-fetcher
|
||||||
|
{{- if and (.Values.functionNamespace) (eq .namespace "default") }}
|
||||||
|
namespace: {{ .Values.functionNamespace }}
|
||||||
|
{{- else }}
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -71,3 +71,35 @@ This template generates the image name for the deployment depending on the value
|
|||||||
- name: OTEL_PROPAGATORS
|
- name: OTEL_PROPAGATORS
|
||||||
value: "{{ .Values.openTelemetry.propagators }}"
|
value: "{{ .Values.openTelemetry.propagators }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "fission-resource-namespace.envs" }}
|
||||||
|
- name: FISSION_RESOURCE_NAMESPACES
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
value: "{{ .Values.defaultNamespace }},{{ join "," .Values.additionalFissionNamespaces }}"
|
||||||
|
{{- else }}
|
||||||
|
value: {{ .Values.defaultNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Define the svc's name
|
||||||
|
*/}}
|
||||||
|
{{- define "fission-webhook.svc" -}}
|
||||||
|
{{- printf "webhook-service" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fission-function-ns" -}}
|
||||||
|
{{- if .Values.functionNamespace -}}
|
||||||
|
{{- printf "%s" .Values.functionNamespace -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" .Values.defaultNamespace -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fission-builder-ns" -}}
|
||||||
|
{{- if .Values.builderNamespace -}}
|
||||||
|
{{- printf "%s" .Values.builderNamespace -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" .Values.defaultNamespace -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|||||||
@@ -37,5 +37,8 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: GA_TRACKING_ID
|
- name: GA_TRACKING_ID
|
||||||
value: "{{ .Values.gaTrackingID }}"
|
value: "{{ .Values.gaTrackingID }}"
|
||||||
serviceAccountName: fission-svc
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -47,5 +47,8 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -47,5 +47,8 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: builder-podspec-patch
|
name: builder-podspec-patch
|
||||||
data:
|
data:
|
||||||
spec: |
|
builder-podspec-patch.yaml: |
|
||||||
{{- toYaml .Values.builderPodSpec.podSpec | nindent 4 }}
|
{{- toYaml .Values.builderPodSpec.podSpec | nindent 4 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -27,7 +27,7 @@ spec:
|
|||||||
image: {{ include "fission-bundleImage" . | quote }}
|
image: {{ include "fission-bundleImage" . | quote }}
|
||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: ["/fission-bundle"]
|
command: ["/fission-bundle"]
|
||||||
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.{{ .Release.Namespace }}"]
|
||||||
env:
|
env:
|
||||||
- name: FETCHER_IMAGE
|
- name: FETCHER_IMAGE
|
||||||
{{- if eq .Values.fetcher.imageTag "" }}
|
{{- if eq .Values.fetcher.imageTag "" }}
|
||||||
@@ -39,6 +39,12 @@ spec:
|
|||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: BUILDER_IMAGE_PULL_POLICY
|
- name: BUILDER_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
|
- name: FISSION_BUILDER_NAMESPACE
|
||||||
|
value: "{{ .Values.builderNamespace }}"
|
||||||
|
- name: FISSION_FUNCTION_NAMESPACE
|
||||||
|
value: "{{ .Values.functionNamespace }}"
|
||||||
|
- name: FISSION_DEFAULT_NAMESPACE
|
||||||
|
value: "{{ .Values.defaultNamespace }}"
|
||||||
- name: ENABLE_ISTIO
|
- name: ENABLE_ISTIO
|
||||||
value: "{{ .Values.enableIstio }}"
|
value: "{{ .Values.enableIstio }}"
|
||||||
- name: FETCHER_MINCPU
|
- name: FETCHER_MINCPU
|
||||||
@@ -55,7 +61,15 @@ spec:
|
|||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
- name: HELM_RELEASE_NAME
|
- name: HELM_RELEASE_NAME
|
||||||
value: {{ .Release.Name | quote }}
|
value: {{ .Release.Name | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
|
{{- if .Values.builderPodSpec.enabled }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: builder-podspec-patch-volume
|
||||||
|
mountPath: /etc/fission/builder-podspec-patch.yaml
|
||||||
|
subPath: builder-podspec-patch.yaml
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: metrics
|
name: metrics
|
||||||
@@ -67,12 +81,18 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-buildermgr
|
||||||
|
{{- if .Values.builderPodSpec.enabled }}
|
||||||
|
volumes:
|
||||||
|
- name: builder-podspec-patch-volume
|
||||||
|
configMap:
|
||||||
|
name: builder-podspec-patch
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.priorityClassName }}
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraCoreComponentPodConfig }}
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "buildermgr") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "buildermgr") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "buildermgr") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "buildermgr") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.builderNamespace -}}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" .Values.builderNamespace "component" "buildermgr") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.functionNamespace -}}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" .Values.functionNamespace "component" "buildermgr") $) }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-buildermgr
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
{{- if .Values.canaryDeployment.enabled }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: canaryconfig
|
||||||
|
labels:
|
||||||
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||||
|
svc: canaryconfig
|
||||||
|
application: fission-canaryconfig
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
svc: canaryconfig
|
||||||
|
application: fission-canaryconfig
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
svc: canaryconfig
|
||||||
|
application: fission-canaryconfig
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/path: "/metrics"
|
||||||
|
prometheus.io/port: "8080"
|
||||||
|
spec:
|
||||||
|
{{- if .Values.canaryDeployment.securityContext.enabled }}
|
||||||
|
securityContext: {{- omit .Values.canaryDeployment.securityContext "enabled" | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: canaryconfig
|
||||||
|
image: {{ include "fission-bundleImage" . | quote }}
|
||||||
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
|
command: ["/fission-bundle"]
|
||||||
|
args: ["--canaryConfig"]
|
||||||
|
env:
|
||||||
|
- name: DEBUG_ENV
|
||||||
|
value: {{ .Values.debugEnv | quote }}
|
||||||
|
- name: PPROF_ENABLED
|
||||||
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
|
- name: POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.canaryDeployment.resources | nindent 10 }}
|
||||||
|
{{- if .Values.terminationMessagePath }}
|
||||||
|
terminationMessagePath: {{ .Values.terminationMessagePath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/config/config.yaml
|
||||||
|
subPath: config.yaml
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: metrics
|
||||||
|
{{- if .Values.pprof.enabled }}
|
||||||
|
- containerPort: 6060
|
||||||
|
name: pprof
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
serviceAccountName: fission-canaryconfig
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: feature-config
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{{- if .Values.canaryDeployment.enabled }}
|
||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "canaryconfig") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "canaryconfig") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{{- if .Values.canaryDeployment.enabled }}
|
||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "canaryconfig") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "canaryconfig") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- if .Values.canaryDeployment.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-canaryconfig
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{{- if .Values.canaryDeployment.enabled }}
|
||||||
|
{{- if .Values.serviceMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: canaryconfig-monitor
|
||||||
|
{{- if .Values.serviceMonitor.namespace }}
|
||||||
|
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.serviceMonitor.additionalServiceMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
svc: canaryconfig
|
||||||
|
endpoints:
|
||||||
|
- targetPort: 8080
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: {{ .Release.Name }}-fission-cr-admin
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- configmaps
|
|
||||||
- pods
|
|
||||||
- secrets
|
|
||||||
- services
|
|
||||||
- serviceaccounts
|
|
||||||
- replicationcontrollers
|
|
||||||
- namespaces
|
|
||||||
- events
|
|
||||||
verbs:
|
|
||||||
- create
|
|
||||||
- delete
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- patch
|
|
||||||
- apiGroups:
|
|
||||||
- apps
|
|
||||||
resources:
|
|
||||||
- deployments
|
|
||||||
- deployments/scale
|
|
||||||
- replicasets
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
- apiGroups:
|
|
||||||
- batch
|
|
||||||
resources:
|
|
||||||
- jobs
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- apiGroups:
|
|
||||||
- networking.k8s.io
|
|
||||||
resources:
|
|
||||||
- ingresses
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
- apiGroups:
|
|
||||||
- apiextensions.k8s.io
|
|
||||||
resources:
|
|
||||||
- customresourcedefinitions
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- apiGroups:
|
|
||||||
- fission.io
|
|
||||||
resources:
|
|
||||||
- canaryconfigs
|
|
||||||
- environments
|
|
||||||
- functions
|
|
||||||
- httptriggers
|
|
||||||
- kuberneteswatchtriggers
|
|
||||||
- messagequeuetriggers
|
|
||||||
- packages
|
|
||||||
- timetriggers
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
- apiGroups:
|
|
||||||
- autoscaling
|
|
||||||
resources:
|
|
||||||
- horizontalpodautoscalers
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
- apiGroups:
|
|
||||||
- rbac.authorization.k8s.io
|
|
||||||
resources:
|
|
||||||
- rolebindings
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
- apiGroups:
|
|
||||||
- rbac.authorization.k8s.io
|
|
||||||
resources:
|
|
||||||
- clusterroles
|
|
||||||
verbs:
|
|
||||||
- bind
|
|
||||||
- apiGroups:
|
|
||||||
- keda.sh
|
|
||||||
resources:
|
|
||||||
- scaledjobs
|
|
||||||
- scaledobjects
|
|
||||||
- scaledjobs/finalizers
|
|
||||||
- scaledjobs/status
|
|
||||||
- triggerauthentications
|
|
||||||
- triggerauthentications/status
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
{{- if .Values.mqt_keda.enabled }}
|
|
||||||
- apiGroups:
|
|
||||||
- keda.k8s.io
|
|
||||||
resources:
|
|
||||||
- scaledjobs
|
|
||||||
- scaledobjects
|
|
||||||
- scaledjobs/finalizers
|
|
||||||
- scaledjobs/status
|
|
||||||
- triggerauthentications
|
|
||||||
- triggerauthentications/status
|
|
||||||
verbs:
|
|
||||||
- '*'
|
|
||||||
{{- end }}
|
|
||||||
- apiGroups:
|
|
||||||
- metrics.k8s.io
|
|
||||||
resources:
|
|
||||||
- pods
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- if .Values.controller.enabled }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -32,12 +33,17 @@ spec:
|
|||||||
command: ["/fission-bundle"]
|
command: ["/fission-bundle"]
|
||||||
args: ["--controllerPort", "8888"]
|
args: ["--controllerPort", "8888"]
|
||||||
env:
|
env:
|
||||||
|
- name: FISSION_DEFAULT_NAMESPACE
|
||||||
|
value: "{{ .Values.defaultNamespace }}"
|
||||||
|
- name: FISSION_BUILDER_NAMESPACE
|
||||||
|
value: "{{ .Values.builderNamespace }}"
|
||||||
- name: FISSION_FUNCTION_NAMESPACE
|
- name: FISSION_FUNCTION_NAMESPACE
|
||||||
value: "{{ .Values.functionNamespace }}"
|
value: "{{ .Values.functionNamespace }}"
|
||||||
- name: DEBUG_ENV
|
- name: DEBUG_ENV
|
||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
- name: PPROF_ENABLED
|
- name: PPROF_ENABLED
|
||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
- name: POD_NAMESPACE
|
- name: POD_NAMESPACE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
@@ -78,7 +84,7 @@ spec:
|
|||||||
name: pprof
|
name: pprof
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-controller
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
@@ -92,4 +98,5 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraCoreComponentPodConfig }}
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{{- if .Values.controller.enabled }}
|
||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "controller") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "controller") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "controller") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "controller") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.builderNamespace -}}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" .Values.builderNamespace "component" "controller") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.functionNamespace -}}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" .Values.functionNamespace "component" "controller") $) }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- if .Values.controller.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-controller
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
{{- end -}}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- if .Values.controller.enabled }}
|
||||||
{{- if .Values.serviceMonitor.enabled }}
|
{{- if .Values.serviceMonitor.enabled }}
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: ServiceMonitor
|
kind: ServiceMonitor
|
||||||
@@ -19,4 +20,5 @@ spec:
|
|||||||
svc: controller
|
svc: controller
|
||||||
endpoints:
|
endpoints:
|
||||||
- targetPort: 8080
|
- targetPort: 8080
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{{- if .Values.controller.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@@ -15,4 +16,5 @@ spec:
|
|||||||
nodePort: {{ .Values.controllerPort }}
|
nodePort: {{ .Values.controllerPort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
svc: controller
|
svc: controller
|
||||||
|
{{- end -}}
|
||||||
@@ -4,6 +4,6 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: runtime-podspec-patch
|
name: runtime-podspec-patch
|
||||||
data:
|
data:
|
||||||
spec: |
|
runtime-podspec-patch.yaml: |
|
||||||
{{- toYaml .Values.runtimePodSpec.podSpec | nindent 4 }}
|
{{- toYaml .Values.runtimePodSpec.podSpec | nindent 4 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -27,7 +27,7 @@ spec:
|
|||||||
image: {{ include "fission-bundleImage" . | quote }}
|
image: {{ include "fission-bundleImage" . | quote }}
|
||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: ["/fission-bundle"]
|
command: ["/fission-bundle"]
|
||||||
args: ["--executorPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"]
|
args: ["--executorPort", "8888"]
|
||||||
env:
|
env:
|
||||||
- name: FETCHER_IMAGE
|
- name: FETCHER_IMAGE
|
||||||
{{- if eq .Values.fetcher.imageTag "" }}
|
{{- if eq .Values.fetcher.imageTag "" }}
|
||||||
@@ -37,6 +37,12 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
- name: FETCHER_IMAGE_PULL_POLICY
|
- name: FETCHER_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
|
- name: FISSION_BUILDER_NAMESPACE
|
||||||
|
value: "{{ .Values.builderNamespace }}"
|
||||||
|
- name: FISSION_FUNCTION_NAMESPACE
|
||||||
|
value: "{{ .Values.functionNamespace }}"
|
||||||
|
- name: FISSION_DEFAULT_NAMESPACE
|
||||||
|
value: "{{ .Values.defaultNamespace }}"
|
||||||
- name: RUNTIME_IMAGE_PULL_POLICY
|
- name: RUNTIME_IMAGE_PULL_POLICY
|
||||||
value: "{{ .Values.pullPolicy }}"
|
value: "{{ .Values.pullPolicy }}"
|
||||||
- name: ADOPT_EXISTING_RESOURCES
|
- name: ADOPT_EXISTING_RESOURCES
|
||||||
@@ -57,6 +63,27 @@ spec:
|
|||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
- name: PPROF_ENABLED
|
- name: PPROF_ENABLED
|
||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
|
- name: OBJECT_REAPER_INTERVAL
|
||||||
|
value: {{ .Values.executor.objectReaperInterval | quote }}
|
||||||
|
{{- if .Values.executor.poolmgr.objectReaperInterval }}
|
||||||
|
- name: POOLMGR_OBJECT_REAPER_INTERVAL
|
||||||
|
value: {{ .Values.executor.poolmgr.objectReaperInterval | quote }}
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Values.executor.newdeploy.objectReaperInterval }}
|
||||||
|
- name: NEWDEPLOY_OBJECT_REAPER_INTERVAL
|
||||||
|
value: {{ .Values.executor.newdeploy.objectReaperInterval | quote }}
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Values.executor.container.objectReaperInterval }}
|
||||||
|
- name: CONTAINER_OBJECT_REAPER_INTERVAL
|
||||||
|
value: {{ .Values.executor.container.objectReaperInterval | quote }}
|
||||||
|
{{- end}}
|
||||||
|
{{- if .Values.executor.serviceAccountCheck.enabled }}
|
||||||
|
- name: SERVICEACCOUNT_CHECK_ENABLED
|
||||||
|
value: {{ .Values.executor.serviceAccountCheck.enabled | quote }}
|
||||||
|
- name: SERVICEACCOUNT_CHECK_INTERVAL
|
||||||
|
value: {{ .Values.executor.serviceAccountCheck.interval | quote }}
|
||||||
|
{{- end}}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
- name: HELM_RELEASE_NAME
|
- name: HELM_RELEASE_NAME
|
||||||
value: {{ .Release.Name | quote }}
|
value: {{ .Release.Name | quote }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
@@ -75,6 +102,13 @@ spec:
|
|||||||
port: 8888
|
port: 8888
|
||||||
initialDelaySeconds: 35
|
initialDelaySeconds: 35
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
|
{{- if .Values.runtimePodSpec.enabled }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: runtime-podspec-patch-volume
|
||||||
|
mountPath: /etc/fission/runtime-podspec-patch.yaml
|
||||||
|
subPath: runtime-podspec-patch.yaml
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: metrics
|
name: metrics
|
||||||
@@ -94,14 +128,20 @@ spec:
|
|||||||
{{- else if .Values.terminationMessagePolicy }}
|
{{- else if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-executor
|
||||||
|
{{- if .Values.runtimePodSpec.enabled }}
|
||||||
|
volumes:
|
||||||
|
- name: runtime-podspec-patch-volume
|
||||||
|
configMap:
|
||||||
|
name: runtime-podspec-patch
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.executor.priorityClassName }}
|
{{- if .Values.executor.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.executor.priorityClassName }}
|
priorityClassName: {{ .Values.executor.priorityClassName }}
|
||||||
{{- else if .Values.priorityClassName }}
|
{{- else if .Values.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.priorityClassName }}
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraCoreComponentPodConfig }}
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "executor") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "executor") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "executor") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "executor") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.builderNamespace -}}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" .Values.builderNamespace "component" "executor") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.functionNamespace -}}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" .Values.functionNamespace "component" "executor") $) }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-executor
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -173,7 +173,7 @@ spec:
|
|||||||
- name: fluentbit-config
|
- name: fluentbit-config
|
||||||
mountPath: /fluent-bit/etc/
|
mountPath: /fluent-bit/etc/
|
||||||
readOnly: true
|
readOnly: true
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-fluentbit
|
||||||
volumes:
|
volumes:
|
||||||
- name: container-log
|
- name: container-log
|
||||||
hostPath:
|
hostPath:
|
||||||
@@ -185,6 +185,10 @@ spec:
|
|||||||
- name: fluentbit-config
|
- name: fluentbit-config
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Release.Name }}-fission-fluentbit
|
name: {{ .Release.Name }}-fission-fluentbit
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "fluentbit") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "fluentbit") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-fluentbit
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -49,6 +49,10 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: influxdb
|
name: influxdb
|
||||||
key: password
|
key: password
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraCoreComponentPodConfig }}
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ spec:
|
|||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
- name: PPROF_ENABLED
|
- name: PPROF_ENABLED
|
||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.kubewatcher.resources | nindent 10 }}
|
{{- toYaml .Values.kubewatcher.resources | nindent 10 }}
|
||||||
@@ -38,7 +39,7 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-kubewatcher
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.priorityClassName }}
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "kubewatcher") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "kubewatcher") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "kubewatcher") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "kubewatcher") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-kubewatcher
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: {{ .Release.Name }}-secret-configmap-getter
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- "*"
|
|
||||||
resources:
|
|
||||||
- secrets
|
|
||||||
- configmaps
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- watch
|
|
||||||
- list
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: {{ .Release.Name }}-package-getter
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- "*"
|
|
||||||
resources:
|
|
||||||
- packages
|
|
||||||
verbs:
|
|
||||||
- "*"
|
|
||||||
- apiGroups:
|
|
||||||
- rbac.authorization.k8s.io
|
|
||||||
resources:
|
|
||||||
- rolebindings
|
|
||||||
verbs:
|
|
||||||
- "*"
|
|
||||||
@@ -1,24 +1,29 @@
|
|||||||
{{- if .Values.createNamespace }}
|
{{- if .Values.createNamespace }}
|
||||||
|
{{- if and (ne .Values.functionNamespace "default") (ne .Values.functionNamespace "") }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Values.functionNamespace }}
|
name: {{ template "fission-function-ns" . }}
|
||||||
labels:
|
labels:
|
||||||
name: fission-function
|
name: fission-function
|
||||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
{{- if .Values.enableIstio }}
|
{{- if .Values.enableIstio }}
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{{- if and (ne .Values.builderNamespace "default") (ne .Values.builderNamespace "") }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Values.builderNamespace }}
|
name: {{ template "fission-builder-ns" . }}
|
||||||
labels:
|
labels:
|
||||||
name: fission-builder
|
name: fission-builder
|
||||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
{{- if .Values.enableIstio }}
|
{{- if .Values.enableIstio }}
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -1,70 +1,12 @@
|
|||||||
apiVersion: rbac.authorization.k8s.io/v1
|
{{/*
|
||||||
kind: Role
|
Passing namespace as an argument to the "fissionFunction.roles" template.
|
||||||
metadata:
|
Need to use merge function to pass in the current scope so that ".Release" values
|
||||||
name: {{ .Release.Name }}-fission-fetcher
|
can be used
|
||||||
namespace: {{ .Values.defaultNamespace }}
|
*/}}
|
||||||
rules:
|
{{ include "fissionFunction.roles" (merge (dict "namespace" .Values.defaultNamespace) .) }}
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- configmaps
|
|
||||||
- secrets
|
|
||||||
- pods
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- events
|
|
||||||
verbs:
|
|
||||||
- "*"
|
|
||||||
- apiGroups:
|
|
||||||
- fission.io
|
|
||||||
resources:
|
|
||||||
- canaryconfigs
|
|
||||||
- environments
|
|
||||||
- functions
|
|
||||||
- httptriggers
|
|
||||||
- kuberneteswatchtriggers
|
|
||||||
- messagequeuetriggers
|
|
||||||
- packages
|
|
||||||
- timetriggers
|
|
||||||
verbs:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
---
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
kind: Role
|
{{ include "fissionFunction.roles" (merge (dict "namespace" $namespace) $) }}
|
||||||
metadata:
|
{{- end }}
|
||||||
name: {{ .Release.Name }}-fission-builder
|
{{- end }}
|
||||||
namespace: {{ .Values.defaultNamespace }}
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- fission.io
|
|
||||||
resources:
|
|
||||||
- canaryconfigs
|
|
||||||
- environments
|
|
||||||
- functions
|
|
||||||
- httptriggers
|
|
||||||
- kuberneteswatchtriggers
|
|
||||||
- messagequeuetriggers
|
|
||||||
- packages
|
|
||||||
- timetriggers
|
|
||||||
verbs:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
namespace: {{ .Values.functionNamespace }}
|
|
||||||
name: {{ .Release.Name }}-event-fetcher
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""] # "" indicates the core API group
|
|
||||||
resources: ["pods"]
|
|
||||||
verbs: ["get", "watch", "list"]
|
|
||||||
- apiGroups: [""] # "" indicates the core API group
|
|
||||||
resources: ["events"]
|
|
||||||
verbs: ["*"]
|
|
||||||
|
|||||||
@@ -1,43 +1,12 @@
|
|||||||
apiVersion: rbac.authorization.k8s.io/v1
|
{{/*
|
||||||
kind: RoleBinding
|
Passing namespace as an argument to the "fissionFunction.rolebindings" template.
|
||||||
metadata:
|
Need to use merge function to pass in the current scope so that ".Release" values
|
||||||
name: {{ .Release.Name }}-fission-fetcher
|
can be used
|
||||||
namespace: {{ .Values.defaultNamespace }}
|
*/}}
|
||||||
roleRef:
|
{{ include "fissionFunction.rolebindings" (merge (dict "namespace" .Values.defaultNamespace) .) }}
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: {{ .Release.Name }}-fission-fetcher
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: fission-fetcher
|
|
||||||
namespace: {{ .Values.functionNamespace }}
|
|
||||||
|
|
||||||
---
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
kind: RoleBinding
|
{{ include "fissionFunction.rolebindings" (merge (dict "namespace" $namespace) $) }}
|
||||||
metadata:
|
{{- end }}
|
||||||
name: {{ .Release.Name }}-fission-builder
|
{{- end }}
|
||||||
namespace: {{ .Values.defaultNamespace }}
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: {{ .Release.Name }}-fission-builder
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: fission-builder
|
|
||||||
namespace: {{ .Values.builderNamespace }}
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: {{ .Release.Name }}-fission-fetcher-pod-reader
|
|
||||||
namespace: {{ .Values.functionNamespace }}
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: {{ .Release.Name }}-event-fetcher
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: fission-fetcher
|
|
||||||
namespace: {{ .Values.functionNamespace }}
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ apiVersion: v1
|
|||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: fission-fetcher
|
name: fission-fetcher
|
||||||
namespace: {{ .Values.functionNamespace }}
|
namespace: {{ template "fission-function-ns" . }}
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: fission-builder
|
name: fission-builder
|
||||||
namespace: {{ .Values.builderNamespace }}
|
namespace: {{ template "fission-builder-ns" . }}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ spec:
|
|||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
- name: PPROF_ENABLED
|
- name: PPROF_ENABLED
|
||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
# TLS authentication is TLS with authentication (2 way)
|
# TLS authentication is TLS with authentication (2 way)
|
||||||
# More info: https://docs.confluent.io/current/kafka/authentication_ssl.html#ssl-overview
|
# More info: https://docs.confluent.io/current/kafka/authentication_ssl.html#ssl-overview
|
||||||
@@ -67,7 +68,7 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-kafka
|
||||||
{{- if .Values.kafka.authentication.tls.enabled }}
|
{{- if .Values.kafka.authentication.tls.enabled }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: kafka-secrets
|
- name: kafka-secrets
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "kafka") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "kafka") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "kafka") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "kafka") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-kafka
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -46,6 +46,7 @@ spec:
|
|||||||
value: "{{ .Values.mqt_keda.connector_images.gcp_pubsub.image }}:{{ .Values.mqt_keda.connector_images.gcp_pubsub.tag }}"
|
value: "{{ .Values.mqt_keda.connector_images.gcp_pubsub.image }}:{{ .Values.mqt_keda.connector_images.gcp_pubsub.tag }}"
|
||||||
- name: REDIS_IMAGE
|
- name: REDIS_IMAGE
|
||||||
value: "{{ .Values.mqt_keda.connector_images.redis.image }}:{{ .Values.mqt_keda.connector_images.redis.tag }}"
|
value: "{{ .Values.mqt_keda.connector_images.redis.image }}:{{ .Values.mqt_keda.connector_images.redis.tag }}"
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.mqt_keda.resources | nindent 10 }}
|
{{- toYaml .Values.mqt_keda.resources | nindent 10 }}
|
||||||
@@ -55,7 +56,7 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-keda
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.priorityClassName }}
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "keda") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "keda") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "keda") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "keda") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: fission-svc
|
name: fission-keda
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-preupgrade
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
|
helm.sh/hook-weight: "-2"
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
+6
-3
@@ -1,12 +1,15 @@
|
|||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Release.Name }}-fission-cr-admin
|
name: {{ .Release.Name }}-preupgrade
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: fission-svc
|
name: fission-preupgrade
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: {{ .Release.Name }}-fission-cr-admin
|
name: {{ .Release.Name }}-preupgrade
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
@@ -15,6 +15,7 @@ metadata:
|
|||||||
# job is considered part of the release.
|
# job is considered part of the release.
|
||||||
"helm.sh/hook": pre-upgrade
|
"helm.sh/hook": pre-upgrade
|
||||||
"helm.sh/hook-delete-policy": hook-succeeded
|
"helm.sh/hook-delete-policy": hook-succeeded
|
||||||
|
"helm.sh/hook-weight": "1"
|
||||||
spec:
|
spec:
|
||||||
backoffLimit: 0
|
backoffLimit: 0
|
||||||
template:
|
template:
|
||||||
@@ -34,12 +35,17 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: [ "/pre-upgrade-checks" ]
|
command: [ "/pre-upgrade-checks" ]
|
||||||
args: ["--fn-pod-namespace", "{{ .Values.functionNamespace }}", "--envbuilder-namespace", "{{ .Values.builderNamespace }}"]
|
env:
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- if .Values.terminationMessagePath }}
|
{{- if .Values.terminationMessagePath }}
|
||||||
terminationMessagePath: {{ .Values.terminationMessagePath }}
|
terminationMessagePath: {{ .Values.terminationMessagePath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-preupgrade
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "preupgrade") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "preupgrade") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-preupgrade
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/hook: pre-upgrade
|
||||||
|
helm.sh/hook-delete-policy: before-hook-creation
|
||||||
|
helm.sh/hook-weight: "-1"
|
||||||
@@ -83,6 +83,7 @@ spec:
|
|||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
- name: DISPLAY_ACCESS_LOG
|
- name: DISPLAY_ACCESS_LOG
|
||||||
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
value: {{ .Values.router.displayAccessLog | default false | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.router.resources | nindent 10 }}
|
{{- toYaml .Values.router.resources | nindent 10 }}
|
||||||
@@ -122,7 +123,7 @@ spec:
|
|||||||
{{- else if .Values.terminationMessagePolicy }}
|
{{- else if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-router
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "router") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "router") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "router") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "router") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-router
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -60,6 +60,7 @@ spec:
|
|||||||
- name: STORAGE_S3_REGION
|
- name: STORAGE_S3_REGION
|
||||||
value: {{ .Values.persistence.s3.region }}
|
value: {{ .Values.persistence.s3.region }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.storagesvc.resources | nindent 10 }}
|
{{- toYaml .Values.storagesvc.resources | nindent 10 }}
|
||||||
@@ -96,7 +97,7 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-storagesvc
|
||||||
{{- if and (.Values.persistence.enabled) (ne (.Values.persistence.storageType | default "local") "s3") }}
|
{{- if and (.Values.persistence.enabled) (ne (.Values.persistence.storageType | default "local") "s3") }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: fission-storage
|
- name: fission-storage
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "storagesvc") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "storagesvc") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-storagesvc
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -29,6 +29,7 @@ spec:
|
|||||||
value: {{ .Values.debugEnv | quote }}
|
value: {{ .Values.debugEnv | quote }}
|
||||||
- name: PPROF_ENABLED
|
- name: PPROF_ENABLED
|
||||||
value: {{ .Values.pprof.enabled | quote }}
|
value: {{ .Values.pprof.enabled | quote }}
|
||||||
|
{{- include "fission-resource-namespace.envs" . | indent 8 }}
|
||||||
{{- include "opentelemtry.envs" . | indent 8 }}
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.timer.resources | nindent 10 }}
|
{{- toYaml .Values.timer.resources | nindent 10 }}
|
||||||
@@ -38,7 +39,7 @@ spec:
|
|||||||
{{- if .Values.terminationMessagePolicy }}
|
{{- if .Values.terminationMessagePolicy }}
|
||||||
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: fission-svc
|
serviceAccountName: fission-timer
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.priorityClassName }}
|
||||||
priorityClassName: {{ .Values.priorityClassName }}
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "timer") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "timer") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{- include "kubernetes-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "timer") .) }}
|
||||||
|
|
||||||
|
{{- if gt (len .Values.additionalFissionNamespaces) 0 }}
|
||||||
|
{{- range $namespace := $.Values.additionalFissionNamespaces }}
|
||||||
|
{{ include "kubernetes-role-generator" (merge (dict "namespace" $namespace "component" "timer") $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-timer
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{{- $certManagerEnabled := .Values.webhook.certManager.enabled }}
|
||||||
|
|
||||||
|
{{- if not $certManagerEnabled }}
|
||||||
|
kind: Secret
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: fission-webhook-certs
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: webhook-secret
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
ca.crt: {{ b64enc (include "webhook.caBundleCertPEM" .) }}
|
||||||
|
tls.crt: {{ b64enc (include "webhook.certPEM" .) }}
|
||||||
|
tls.key: {{ b64enc (include "webhook.keyPEM" .) }}
|
||||||
|
|
||||||
|
{{- else }}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Issuer
|
||||||
|
metadata:
|
||||||
|
name: fission-selfsigned-issuer
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
selfSigned: {}
|
||||||
|
---
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: fission-webhook-cert
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
secretName: fission-webhook-certs
|
||||||
|
dnsNames:
|
||||||
|
- "webhook-service.{{ .Release.Namespace }}.svc"
|
||||||
|
- "webhook-service.{{ .Release.Namespace }}.svc.cluster.local "
|
||||||
|
issuerRef:
|
||||||
|
name: fission-selfsigned-issuer
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: webhook
|
||||||
|
labels:
|
||||||
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||||
|
svc: webhook-service
|
||||||
|
application: fission-webhook
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
svc: webhook-service
|
||||||
|
application: fission-webhook
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
svc: webhook-service
|
||||||
|
application: fission-webhook
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/path: "/metrics"
|
||||||
|
prometheus.io/port: "8080"
|
||||||
|
spec:
|
||||||
|
{{- if .Values.webhook.securityContext.enabled }}
|
||||||
|
securityContext: {{- omit .Values.webhook.securityContext "enabled" | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: webhook
|
||||||
|
image: {{ include "fission-bundleImage" . | quote }}
|
||||||
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
|
command: ["/fission-bundle"]
|
||||||
|
args: ["--webhookPort", "9443"]
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tmp/k8s-webhook-server/serving-certs
|
||||||
|
name: serving-certs
|
||||||
|
readOnly: true
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: metrics
|
||||||
|
volumes:
|
||||||
|
- name: serving-certs
|
||||||
|
secret:
|
||||||
|
secretName: fission-webhook-certs
|
||||||
|
serviceAccountName: fission-webhook
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.extraCoreComponentPodConfig }}
|
||||||
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: fission-webhook
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{{- if .Values.serviceMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: webhook-monitor
|
||||||
|
{{- if .Values.serviceMonitor.namespace }}
|
||||||
|
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.serviceMonitor.additionalServiceMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
svc: webhook-service
|
||||||
|
endpoints:
|
||||||
|
- targetPort: 8080
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: webhook-service
|
||||||
|
labels:
|
||||||
|
svc: webhook-service
|
||||||
|
application: fission-webhook
|
||||||
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.serviceType }}
|
||||||
|
ports:
|
||||||
|
- port: 443
|
||||||
|
targetPort: 9443
|
||||||
|
selector:
|
||||||
|
svc: webhook-service
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
---
|
||||||
|
{{- $caCert := include "webhook.caBundleCertPEM" . -}}
|
||||||
|
{{- $crtPEM := include "webhook.certPEM" . -}}
|
||||||
|
{{- $keyPEM := include "webhook.keyPEM" . -}}
|
||||||
|
|
||||||
|
{{- $certManagerEnabled := $.Values.webhook.certManager.enabled }}
|
||||||
|
{{- $caBundleValue := "" -}}
|
||||||
|
{{- if $certManagerEnabled }}
|
||||||
|
{{- $caBundleValue = "Cg==" -}}
|
||||||
|
{{- else }}
|
||||||
|
{{- $caBundleValue = ternary (b64enc $caCert) (b64enc (trim $crtPEM)) (empty $crtPEM) -}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: mutating-webhook-configuration
|
||||||
|
{{- if $certManagerEnabled }}
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/inject-ca-from: "{{ .Release.Namespace }}/fission-webhook-cert"
|
||||||
|
{{- end }}
|
||||||
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /mutate-fission-io-v1-package
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: mpackage.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- packages
|
||||||
|
sideEffects: None
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: validating-webhook-configuration
|
||||||
|
{{- if $certManagerEnabled }}
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/inject-ca-from: "{{ .Release.Namespace }}/fission-webhook-cert"
|
||||||
|
{{- end }}
|
||||||
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-environment
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: venvironment.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
resources:
|
||||||
|
- environments
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-function
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vfunction.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- functions
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-httptrigger
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vhttptrigger.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- httptriggers
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-kuberneteswatchtrigger
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vkuberneteswatchtrigger.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- kuberneteswatchtriggers
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-messagequeuetrigger
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vmessagequeuetrigger.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- messagequeuetriggers
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-package
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vpackage.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- packages
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
caBundle: {{ $caBundleValue }}
|
||||||
|
service:
|
||||||
|
name: webhook-service
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-fission-io-v1-timetrigger
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vtimetrigger.fission.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- fission.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- timetriggers
|
||||||
|
sideEffects: None
|
||||||
+129
-27
@@ -25,7 +25,7 @@ image: fission/fission-bundle
|
|||||||
## It is also used by the chart to identify version of the few more images apart from fission-bundle.
|
## It is also used by the chart to identify version of the few more images apart from fission-bundle.
|
||||||
## Keep it empty for using latest tag.
|
## Keep it empty for using latest tag.
|
||||||
##
|
##
|
||||||
imageTag: v1.17.0
|
imageTag: v1.18.0
|
||||||
|
|
||||||
## pullPolicy represents the pull policy to use for images in the chart.
|
## pullPolicy represents the pull policy to use for images in the chart.
|
||||||
##
|
##
|
||||||
@@ -61,20 +61,32 @@ controllerPort: 31313
|
|||||||
##
|
##
|
||||||
routerPort: 31314
|
routerPort: 31314
|
||||||
|
|
||||||
## functionNamespace represents the namespace in which Fission Function resources will be created.
|
## defaultNamespace represents the namespace in which Fission custom resources will be created by the Fission user.
|
||||||
## This is different from the release namespace.
|
## This is different from the release namespace.
|
||||||
##
|
## Please consider setting `singleDefaultNamespace` and `additionalFissionNamespaces` if you want
|
||||||
functionNamespace: fission-function
|
## more than one namespace to be used for Fission custom resources.
|
||||||
|
|
||||||
## builderNamespace represents the namespace in which Fission Builder resources will be created.
|
|
||||||
## This is different from the release namespace.
|
|
||||||
##
|
|
||||||
builderNamespace: fission-builder
|
|
||||||
|
|
||||||
## defaultNamespace represents the default namespace in Kubernetes.
|
|
||||||
##
|
##
|
||||||
defaultNamespace: default
|
defaultNamespace: default
|
||||||
|
|
||||||
|
## builderNamespace represents the namespace in which Fission Builder resources will be created.
|
||||||
|
## if builderNamespace is set to empty then builder resources will be created in the same namespace as the Fission resources.
|
||||||
|
## This is different from the release namespace.
|
||||||
|
##
|
||||||
|
builderNamespace: ""
|
||||||
|
|
||||||
|
## functionNamespace represents the namespace in which Fission Function resources will be created.
|
||||||
|
## if functionNamespace is set to empty then function resources will be created in the same namespace as the Fission resources.
|
||||||
|
## This is different from the release namespace.
|
||||||
|
##
|
||||||
|
functionNamespace: ""
|
||||||
|
|
||||||
|
## Fission will watch the following namespaces along with the `defaultNamespace` for fission custom resources.
|
||||||
|
## additionalFissionNamespaces:
|
||||||
|
## - namespace1
|
||||||
|
## - namespace2
|
||||||
|
## - namespace3
|
||||||
|
additionalFissionNamespaces: []
|
||||||
|
|
||||||
## createNamespace decides to create namespaces by the chart.
|
## createNamespace decides to create namespaces by the chart.
|
||||||
## If set to true, functionNamespace and builderNamespace namespaces mentioned above will be created by the chart.
|
## If set to true, functionNamespace and builderNamespace namespaces mentioned above will be created by the chart.
|
||||||
## Set to false if you want to create the namespaces manually.
|
## Set to false if you want to create the namespaces manually.
|
||||||
@@ -92,7 +104,7 @@ fetcher:
|
|||||||
## image represents the image of the fetcher component.
|
## image represents the image of the fetcher component.
|
||||||
image: fission/fetcher
|
image: fission/fetcher
|
||||||
## imageTag represents the tag of the image of the fetcher component.
|
## imageTag represents the tag of the image of the fetcher component.
|
||||||
imageTag: v1.17.0
|
imageTag: v1.18.0
|
||||||
|
|
||||||
## Fetcher is only for to downloading or uploading archive.
|
## Fetcher is only for to downloading or uploading archive.
|
||||||
## Normally, you don't need to change the value here, unless necessary.
|
## Normally, you don't need to change the value here, unless necessary.
|
||||||
@@ -148,13 +160,41 @@ executor:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
enabled: false
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
runAsUser: 10001
|
runAsUser: 10001
|
||||||
runAsGroup: 10001
|
runAsGroup: 10001
|
||||||
|
|
||||||
|
## Object Reaper
|
||||||
|
## objectReaperInterval (seconds) represents GLOBAL interval to run process that reaps objects after certain idle time.
|
||||||
|
## Also you can set different objectReaperInterval for specific executor type. See poolmgs/newdeploy/container section
|
||||||
|
## Default: 5 (in seconds)
|
||||||
|
##
|
||||||
|
objectReaperInterval: 5
|
||||||
|
|
||||||
|
poolmgr: {}
|
||||||
|
## objectReaperInterval specific to poolmgr executor type
|
||||||
|
##
|
||||||
|
## objectReaperInterval: 5
|
||||||
|
newdeploy: {}
|
||||||
|
## objectReaperInterval specific to newdeploy executor type
|
||||||
|
##
|
||||||
|
## objectReaperInterval: 5
|
||||||
|
container: {}
|
||||||
|
## objectReaperInterval specific to container executor type
|
||||||
|
##
|
||||||
|
## objectReaperInterval: 5
|
||||||
|
|
||||||
|
serviceAccountCheck:
|
||||||
|
## enables fission to create service account, roles and rolebinding for missing permission for builder and fetcher.
|
||||||
|
enabled: true
|
||||||
|
## indicates the time interval in minutes, after that fission will create service account, roles and rolebinding for builder and fetcher.
|
||||||
|
## interval will be applicable only if enable value is set to true.
|
||||||
|
## default timing will be 0 minutes. That means check will run only once.
|
||||||
|
## if you want to run check every 30 minutes then set interval to 30.
|
||||||
|
interval: 0
|
||||||
## router is responsible for routing function calls to the appropriate function.
|
## router is responsible for routing function calls to the appropriate function.
|
||||||
##
|
##
|
||||||
router:
|
router:
|
||||||
@@ -231,7 +271,7 @@ router:
|
|||||||
maxRetries: 10
|
maxRetries: 10
|
||||||
|
|
||||||
## Extend the container specs for the core fission pods.
|
## Extend the container specs for the core fission pods.
|
||||||
## Can be used to add things like affinty/tolerations/nodeSelectors/etc.
|
## Can be used to add things like affinity/tolerations/nodeSelectors/etc.
|
||||||
## For example:
|
## For example:
|
||||||
## extraCoreComponentPodConfig:
|
## extraCoreComponentPodConfig:
|
||||||
## affinity:
|
## affinity:
|
||||||
@@ -265,7 +305,7 @@ router:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
enabled: false
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
@@ -291,7 +331,7 @@ buildermgr:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
enabled: false
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
@@ -302,6 +342,7 @@ buildermgr:
|
|||||||
## It contains CRUD APIs for functions, triggers, environments, Kubernetes event watches, etc. and proxy APIs to internal 3rd-party services.
|
## It contains CRUD APIs for functions, triggers, environments, Kubernetes event watches, etc. and proxy APIs to internal 3rd-party services.
|
||||||
##
|
##
|
||||||
controller:
|
controller:
|
||||||
|
enabled: false
|
||||||
## Pod resources as:
|
## Pod resources as:
|
||||||
## resources:
|
## resources:
|
||||||
## limits:
|
## limits:
|
||||||
@@ -318,13 +359,51 @@ controller:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
|
enabled: true
|
||||||
|
## Mark it false, if you want to stop the non root user validation
|
||||||
|
runAsNonRoot: true
|
||||||
|
fsGroup: 10001
|
||||||
|
runAsUser: 10001
|
||||||
|
runAsGroup: 10001
|
||||||
|
|
||||||
|
## webhook is the component that validates API calls.
|
||||||
|
## It contains validation and mutation for functions, triggers, environments, Kubernetes event watches, etc.
|
||||||
|
##
|
||||||
|
webhook:
|
||||||
|
## Pod resources as:
|
||||||
|
## resources:
|
||||||
|
## limits:
|
||||||
|
## cpu: <tbd>
|
||||||
|
## memory: <tbd>
|
||||||
|
## requests:
|
||||||
|
## cpu: <tbd>
|
||||||
|
## memory: <tbd>
|
||||||
|
##
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
certManager:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
caBundlePEM: |
|
||||||
|
|
||||||
|
crtPEM: |
|
||||||
|
|
||||||
|
keyPEM: |
|
||||||
|
|
||||||
|
|
||||||
|
## Security Context
|
||||||
|
## It holds pod-level and container level security configuration.
|
||||||
|
## This is an experimental section, please verify before enabling in production.
|
||||||
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
|
securityContext:
|
||||||
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
runAsUser: 10001
|
runAsUser: 10001
|
||||||
runAsGroup: 10001
|
runAsGroup: 10001
|
||||||
|
|
||||||
|
|
||||||
## kubewatcher watches the Kubernetes API and invokes functions associated with watches, sending the watch event to the function.
|
## kubewatcher watches the Kubernetes API and invokes functions associated with watches, sending the watch event to the function.
|
||||||
##
|
##
|
||||||
kubewatcher:
|
kubewatcher:
|
||||||
@@ -344,7 +423,7 @@ kubewatcher:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
enabled: false
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
@@ -376,7 +455,7 @@ storagesvc:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
enabled: false
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
@@ -403,7 +482,7 @@ timer:
|
|||||||
## This is an experimental section, please verify before enabling in production.
|
## This is an experimental section, please verify before enabling in production.
|
||||||
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
securityContext:
|
securityContext:
|
||||||
enabled: false
|
enabled: true
|
||||||
## Mark it false, if you want to stop the non root user validation
|
## Mark it false, if you want to stop the non root user validation
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 10001
|
fsGroup: 10001
|
||||||
@@ -459,8 +538,8 @@ serviceMonitor:
|
|||||||
##namespace in which you want to deploy servicemonitor
|
##namespace in which you want to deploy servicemonitor
|
||||||
##
|
##
|
||||||
namespace: ""
|
namespace: ""
|
||||||
## Map of additional lables to add to the ServiceMonitor resources
|
## Map of additional labels to add to the ServiceMonitor resources
|
||||||
# to allow selecting sepcific ServiceMonitors
|
# to allow selecting specific ServiceMonitors
|
||||||
# in case of multiple prometheus deployments
|
# in case of multiple prometheus deployments
|
||||||
additionalServiceMonitorLabels: {}
|
additionalServiceMonitorLabels: {}
|
||||||
# release: "monitoring"
|
# release: "monitoring"
|
||||||
@@ -473,8 +552,8 @@ podMonitor:
|
|||||||
##namespace in which you want to deploy podmonitor
|
##namespace in which you want to deploy podmonitor
|
||||||
##
|
##
|
||||||
namespace: ""
|
namespace: ""
|
||||||
## Map of additional lables to add to the PodMonitor resources
|
## Map of additional labels to add to the PodMonitor resources
|
||||||
# to allow selecting sepcific PodMonitor
|
# to allow selecting specific PodMonitor
|
||||||
# in case of multiple prometheus deployments
|
# in case of multiple prometheus deployments
|
||||||
additionalPodMonitorLabels: {}
|
additionalPodMonitorLabels: {}
|
||||||
# release: "monitoring"
|
# release: "monitoring"
|
||||||
@@ -522,7 +601,7 @@ persistence:
|
|||||||
size: 8Gi
|
size: 8Gi
|
||||||
|
|
||||||
## Extend the container specs for the core fission pods.
|
## Extend the container specs for the core fission pods.
|
||||||
## Can be used to add things like affinty/tolerations/nodeSelectors/etc.
|
## Can be used to add things like affinity/tolerations/nodeSelectors/etc.
|
||||||
## For example:
|
## For example:
|
||||||
## extraCoreComponentPodConfig:
|
## extraCoreComponentPodConfig:
|
||||||
## affinity:
|
## affinity:
|
||||||
@@ -607,7 +686,7 @@ preUpgradeChecks:
|
|||||||
image: fission/pre-upgrade-checks
|
image: fission/pre-upgrade-checks
|
||||||
## pre-install/pre-upgrade checks image version
|
## pre-install/pre-upgrade checks image version
|
||||||
##
|
##
|
||||||
imageTag: v1.17.0
|
imageTag: v1.18.0
|
||||||
|
|
||||||
## Fission post-install/post-upgrade reporting live in this image
|
## Fission post-install/post-upgrade reporting live in this image
|
||||||
##
|
##
|
||||||
@@ -627,11 +706,34 @@ prometheus:
|
|||||||
##
|
##
|
||||||
serviceEndpoint: ""
|
serviceEndpoint: ""
|
||||||
|
|
||||||
## set this flag to true if you need canary deployment feature
|
|
||||||
##
|
|
||||||
canaryDeployment:
|
canaryDeployment:
|
||||||
|
## set this flag to true if you need canary deployment feature
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
## Pod resources as:
|
||||||
|
## resources:
|
||||||
|
## limits:
|
||||||
|
## cpu: <tbd>
|
||||||
|
## memory: <tbd>
|
||||||
|
## requests:
|
||||||
|
## cpu: <tbd>
|
||||||
|
## memory: <tbd>
|
||||||
|
##
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
## Security Context
|
||||||
|
## It holds pod-level and container level security configuration.
|
||||||
|
## This is an experimental section, please verify before enabling in production.
|
||||||
|
## Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1
|
||||||
|
securityContext:
|
||||||
|
enabled: true
|
||||||
|
## Mark it false, if you want to stop the non root user validation
|
||||||
|
runAsNonRoot: true
|
||||||
|
fsGroup: 10001
|
||||||
|
runAsUser: 10001
|
||||||
|
runAsGroup: 10001
|
||||||
|
|
||||||
## Enable authentication for fission function invocation via Fission router
|
## Enable authentication for fission function invocation via Fission router
|
||||||
##
|
##
|
||||||
authentication:
|
authentication:
|
||||||
|
|||||||
+2
-2
@@ -20,18 +20,18 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
|
||||||
|
|
||||||
"github.com/fission/fission/cmd/builder/app"
|
"github.com/fission/fission/cmd/builder/app"
|
||||||
"github.com/fission/fission/pkg/utils/loggerfactory"
|
"github.com/fission/fission/pkg/utils/loggerfactory"
|
||||||
"github.com/fission/fission/pkg/utils/profile"
|
"github.com/fission/fission/pkg/utils/profile"
|
||||||
"github.com/fission/fission/pkg/utils/signals"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Usage: builder <shared volume path>
|
// Usage: builder <shared volume path>
|
||||||
func main() {
|
func main() {
|
||||||
logger := loggerfactory.GetLogger()
|
logger := loggerfactory.GetLogger()
|
||||||
defer logger.Sync()
|
defer logger.Sync()
|
||||||
ctx := signals.SetupSignalHandlerWithContext(logger)
|
ctx := signals.SetupSignalHandler()
|
||||||
profile.ProfileIfEnabled(ctx, logger)
|
profile.ProfileIfEnabled(ctx, logger)
|
||||||
shareVolume := os.Args[1]
|
shareVolume := os.Args[1]
|
||||||
if _, err := os.Stat(shareVolume); err != nil {
|
if _, err := os.Stat(shareVolume); err != nil {
|
||||||
|
|||||||
+3
-2
@@ -17,10 +17,11 @@ limitations under the License.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
|
||||||
|
|
||||||
"github.com/fission/fission/cmd/fetcher/app"
|
"github.com/fission/fission/cmd/fetcher/app"
|
||||||
"github.com/fission/fission/pkg/utils/loggerfactory"
|
"github.com/fission/fission/pkg/utils/loggerfactory"
|
||||||
"github.com/fission/fission/pkg/utils/profile"
|
"github.com/fission/fission/pkg/utils/profile"
|
||||||
"github.com/fission/fission/pkg/utils/signals"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Usage: fetcher <shared volume path>
|
// Usage: fetcher <shared volume path>
|
||||||
@@ -28,7 +29,7 @@ func main() {
|
|||||||
logger := loggerfactory.GetLogger()
|
logger := loggerfactory.GetLogger()
|
||||||
defer logger.Sync()
|
defer logger.Sync()
|
||||||
|
|
||||||
ctx := signals.SetupSignalHandlerWithContext(logger)
|
ctx := signals.SetupSignalHandler()
|
||||||
profile.ProfileIfEnabled(ctx, logger)
|
profile.ProfileIfEnabled(ctx, logger)
|
||||||
app.Run(ctx, logger)
|
app.Run(ctx, logger)
|
||||||
}
|
}
|
||||||
|
|||||||
+39
-13
@@ -24,11 +24,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
docopt "github.com/docopt/docopt-go"
|
docopt "github.com/docopt/docopt-go"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
|
||||||
|
|
||||||
"github.com/fission/fission/cmd/fission-bundle/mqtrigger"
|
"github.com/fission/fission/cmd/fission-bundle/mqtrigger"
|
||||||
"github.com/fission/fission/pkg/buildermgr"
|
"github.com/fission/fission/pkg/buildermgr"
|
||||||
|
"github.com/fission/fission/pkg/canaryconfigmgr"
|
||||||
"github.com/fission/fission/pkg/controller"
|
"github.com/fission/fission/pkg/controller"
|
||||||
"github.com/fission/fission/pkg/executor"
|
"github.com/fission/fission/pkg/executor"
|
||||||
"github.com/fission/fission/pkg/info"
|
"github.com/fission/fission/pkg/info"
|
||||||
@@ -41,19 +42,28 @@ import (
|
|||||||
"github.com/fission/fission/pkg/utils/loggerfactory"
|
"github.com/fission/fission/pkg/utils/loggerfactory"
|
||||||
"github.com/fission/fission/pkg/utils/otel"
|
"github.com/fission/fission/pkg/utils/otel"
|
||||||
"github.com/fission/fission/pkg/utils/profile"
|
"github.com/fission/fission/pkg/utils/profile"
|
||||||
"github.com/fission/fission/pkg/utils/signals"
|
"github.com/fission/fission/pkg/webhook"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// runWebhook starts admission webhook server
|
||||||
|
func runWebhook(ctx context.Context, logger *zap.Logger, port int) error {
|
||||||
|
return webhook.Start(ctx, logger, port)
|
||||||
|
}
|
||||||
|
|
||||||
func runController(ctx context.Context, logger *zap.Logger, port int) {
|
func runController(ctx context.Context, logger *zap.Logger, port int) {
|
||||||
controller.Start(ctx, logger, port, false)
|
controller.Start(ctx, logger, port, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func runCanaryConfigServer(ctx context.Context, logger *zap.Logger) error {
|
||||||
|
return canaryconfigmgr.StartCanaryServer(ctx, logger, false)
|
||||||
|
}
|
||||||
|
|
||||||
func runRouter(ctx context.Context, logger *zap.Logger, port int, executorUrl string) {
|
func runRouter(ctx context.Context, logger *zap.Logger, port int, executorUrl string) {
|
||||||
router.Start(ctx, logger, port, executorUrl)
|
router.Start(ctx, logger, port, executorUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runExecutor(ctx context.Context, logger *zap.Logger, port int, functionNamespace, envBuilderNamespace string) error {
|
func runExecutor(ctx context.Context, logger *zap.Logger, port int) error {
|
||||||
return executor.StartExecutor(ctx, logger, functionNamespace, envBuilderNamespace, port)
|
return executor.StartExecutor(ctx, logger, port)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runKubeWatcher(ctx context.Context, logger *zap.Logger, routerUrl string) error {
|
func runKubeWatcher(ctx context.Context, logger *zap.Logger, routerUrl string) error {
|
||||||
@@ -77,8 +87,8 @@ func runStorageSvc(ctx context.Context, logger *zap.Logger, port int, storage st
|
|||||||
return storagesvc.Start(ctx, logger, storage, port)
|
return storagesvc.Start(ctx, logger, storage, port)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runBuilderMgr(ctx context.Context, logger *zap.Logger, storageSvcUrl string, envBuilderNamespace string) error {
|
func runBuilderMgr(ctx context.Context, logger *zap.Logger, storageSvcUrl string) error {
|
||||||
return buildermgr.Start(ctx, logger, storageSvcUrl, envBuilderNamespace)
|
return buildermgr.Start(ctx, logger, storageSvcUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
func runLogger(ctx context.Context, logger *zap.Logger) {
|
func runLogger(ctx context.Context, logger *zap.Logger) {
|
||||||
@@ -168,6 +178,7 @@ Use it to start one or more of the fission servers:
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
fission-bundle --controllerPort=<port>
|
fission-bundle --controllerPort=<port>
|
||||||
|
fission-bundle --canaryConfig
|
||||||
fission-bundle --routerPort=<port> [--executorUrl=<url>]
|
fission-bundle --routerPort=<port> [--executorUrl=<url>]
|
||||||
fission-bundle --executorPort=<port> [--namespace=<namespace>] [--fission-namespace=<namespace>]
|
fission-bundle --executorPort=<port> [--namespace=<namespace>] [--fission-namespace=<namespace>]
|
||||||
fission-bundle --kubewatcher [--routerUrl=<url>]
|
fission-bundle --kubewatcher [--routerUrl=<url>]
|
||||||
@@ -176,10 +187,13 @@ Usage:
|
|||||||
fission-bundle --timer [--routerUrl=<url>]
|
fission-bundle --timer [--routerUrl=<url>]
|
||||||
fission-bundle --mqt [--routerUrl=<url>]
|
fission-bundle --mqt [--routerUrl=<url>]
|
||||||
fission-bundle --mqt_keda [--routerUrl=<url>]
|
fission-bundle --mqt_keda [--routerUrl=<url>]
|
||||||
|
fission-bundle --webhookPort=<port>
|
||||||
fission-bundle --logger
|
fission-bundle --logger
|
||||||
fission-bundle --version
|
fission-bundle --version
|
||||||
Options:
|
Options:
|
||||||
--controllerPort=<port> Port that the controller should listen on.
|
--controllerPort=<port> Port that the controller should listen on.
|
||||||
|
--canaryConfig Start canary config server.
|
||||||
|
--webhookPort=<port> Port that the webhook should listen on.
|
||||||
--routerPort=<port> Port that the router should listen on.
|
--routerPort=<port> Port that the router should listen on.
|
||||||
--executorPort=<port> Port that the executor should listen on.
|
--executorPort=<port> Port that the executor should listen on.
|
||||||
--storageServicePort=<port> Port that the storage service should listen on.
|
--storageServicePort=<port> Port that the storage service should listen on.
|
||||||
@@ -199,10 +213,10 @@ Options:
|
|||||||
logger := loggerfactory.GetLogger()
|
logger := loggerfactory.GetLogger()
|
||||||
defer exitWithSync(logger)
|
defer exitWithSync(logger)
|
||||||
|
|
||||||
ctx := signals.SetupSignalHandlerWithContext(logger)
|
ctx := signals.SetupSignalHandler()
|
||||||
profile.ProfileIfEnabled(ctx, logger)
|
profile.ProfileIfEnabled(ctx, logger)
|
||||||
|
|
||||||
version := fmt.Sprintf("Fission Bundle Version: %v", info.BuildInfo().String())
|
version := fmt.Sprintf("Fission Bundle Version: %s", info.BuildInfo().String())
|
||||||
arguments, err := docopt.ParseArgs(usage, nil, version)
|
arguments, err := docopt.ParseArgs(usage, nil, version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("failed to parse arguments", zap.Error(err))
|
logger.Error("failed to parse arguments", zap.Error(err))
|
||||||
@@ -218,13 +232,17 @@ Options:
|
|||||||
defer shutdown(ctx)
|
defer shutdown(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
functionNs := getStringArgWithDefault(arguments["--namespace"], "fission-function")
|
|
||||||
envBuilderNs := getStringArgWithDefault(arguments["--envbuilder-namespace"], "fission-builder")
|
|
||||||
|
|
||||||
executorUrl := getStringArgWithDefault(arguments["--executorUrl"], "http://executor.fission")
|
executorUrl := getStringArgWithDefault(arguments["--executorUrl"], "http://executor.fission")
|
||||||
routerUrl := getStringArgWithDefault(arguments["--routerUrl"], "http://router.fission")
|
routerUrl := getStringArgWithDefault(arguments["--routerUrl"], "http://router.fission")
|
||||||
storageSvcUrl := getStringArgWithDefault(arguments["--storageSvcUrl"], "http://storagesvc.fission")
|
storageSvcUrl := getStringArgWithDefault(arguments["--storageSvcUrl"], "http://storagesvc.fission")
|
||||||
|
|
||||||
|
if arguments["--webhookPort"] != nil {
|
||||||
|
port := getPort(logger, arguments["--webhookPort"])
|
||||||
|
err = runWebhook(ctx, logger, port)
|
||||||
|
logger.Error("webhook server exited:", zap.Error(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if arguments["--controllerPort"] != nil {
|
if arguments["--controllerPort"] != nil {
|
||||||
port := getPort(logger, arguments["--controllerPort"])
|
port := getPort(logger, arguments["--controllerPort"])
|
||||||
runController(ctx, logger, port)
|
runController(ctx, logger, port)
|
||||||
@@ -232,6 +250,14 @@ Options:
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if arguments["--canaryConfig"] == true {
|
||||||
|
err := runCanaryConfigServer(ctx, logger)
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("canary config server exited with error: ", zap.Error(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if arguments["--routerPort"] != nil {
|
if arguments["--routerPort"] != nil {
|
||||||
port := getPort(logger, arguments["--routerPort"])
|
port := getPort(logger, arguments["--routerPort"])
|
||||||
runRouter(ctx, logger, port, executorUrl)
|
runRouter(ctx, logger, port, executorUrl)
|
||||||
@@ -241,7 +267,7 @@ Options:
|
|||||||
|
|
||||||
if arguments["--executorPort"] != nil {
|
if arguments["--executorPort"] != nil {
|
||||||
port := getPort(logger, arguments["--executorPort"])
|
port := getPort(logger, arguments["--executorPort"])
|
||||||
err = runExecutor(ctx, logger, port, functionNs, envBuilderNs)
|
err = runExecutor(ctx, logger, port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("executor exited", zap.Error(err))
|
logger.Error("executor exited", zap.Error(err))
|
||||||
return
|
return
|
||||||
@@ -281,7 +307,7 @@ Options:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if arguments["--builderMgr"] == true {
|
if arguments["--builderMgr"] == true {
|
||||||
err = runBuilderMgr(ctx, logger, storageSvcUrl, envBuilderNs)
|
err = runBuilderMgr(ctx, logger, storageSvcUrl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("builder manager exited", zap.Error(err))
|
logger.Error("builder manager exited", zap.Error(err))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -35,13 +35,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Start(ctx context.Context, logger *zap.Logger, routerUrl string) error {
|
func Start(ctx context.Context, logger *zap.Logger, routerUrl string) error {
|
||||||
fissionClient, _, _, _, err := crd.MakeFissionClient()
|
clientGen := crd.NewClientGenerator()
|
||||||
|
fissionClient, err := clientGen.GetFissionClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to get fission or kubernetes client")
|
return errors.Wrap(err, "failed to get fission client")
|
||||||
}
|
}
|
||||||
|
|
||||||
err = crd.WaitForCRDs(fissionClient)
|
err = crd.WaitForCRDs(ctx, logger, fissionClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "error waiting for CRDs")
|
return errors.Wrap(err, "error waiting for CRDs")
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-17
@@ -14,10 +14,9 @@ limitations under the License.
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/pkg/errors"
|
||||||
"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"
|
||||||
@@ -39,7 +38,6 @@ 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"
|
|
||||||
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/kafka"
|
_ "github.com/fission/fission/pkg/mqtrigger/messageQueue/kafka"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -61,19 +59,17 @@ 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)
|
||||||
|
clientOptions := cmd.ClientOptions{
|
||||||
if input.IsSet(flagkey.ClientOnly) || input.IsSet(flagkey.PreCheckOnly) {
|
KubeContext: input.String(flagkey.KubeContext),
|
||||||
// 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))
|
|
||||||
}
|
}
|
||||||
|
// TODO: use fake rest client for offline spec generation
|
||||||
|
// if input.IsSet(flagkey.ClientOnly) || input.IsSet(flagkey.PreCheckOnly) {
|
||||||
|
// }
|
||||||
|
client, err := cmd.NewClient(clientOptions)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "failed to get fission client")
|
||||||
|
}
|
||||||
|
cmd.SetClientset(*client)
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -87,7 +83,7 @@ func App() *cobra.Command {
|
|||||||
})
|
})
|
||||||
|
|
||||||
wrapper.SetFlags(rootCmd, flag.FlagSet{
|
wrapper.SetFlags(rootCmd, flag.FlagSet{
|
||||||
Global: []flag.Flag{flag.GlobalServer, flag.GlobalVerbosity, flag.KubeContext},
|
Global: []flag.Flag{flag.GlobalServer, flag.GlobalVerbosity, flag.KubeContext, flag.Namespace},
|
||||||
})
|
})
|
||||||
|
|
||||||
groups := helptemplate.CommandGroups{}
|
groups := helptemplate.CommandGroups{}
|
||||||
@@ -101,7 +97,7 @@ func App() *cobra.Command {
|
|||||||
|
|
||||||
flagExposer := helptemplate.ActsAsRootCommand(rootCmd, nil, groups...)
|
flagExposer := helptemplate.ActsAsRootCommand(rootCmd, nil, groups...)
|
||||||
// show global options in usage
|
// show global options in usage
|
||||||
flagExposer.ExposeFlags(rootCmd, flagkey.Server, flagkey.Verbosity, flagkey.KubeContext)
|
flagExposer.ExposeFlags(rootCmd, flagkey.Server, flagkey.Verbosity, flagkey.KubeContext, flagkey.Namespace)
|
||||||
|
|
||||||
return rootCmd
|
return rootCmd
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user