Skip to content

Commit

Permalink
Added option to disable cluster resources
Browse files Browse the repository at this point in the history
  • Loading branch information
funkypenguin committed May 8, 2020
1 parent e6db69f commit 3643c2e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/fission-core/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: fission-core
version: 1.8.1-pre1
version: 1.8.1-pre2
description: Fission is a fast serverless framework for Kubernetes.
keywords:
- fission
Expand Down
31 changes: 17 additions & 14 deletions charts/fission-core/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ metadata:
{{- end }}
{{- end }}

{{- if .Values.createClusterResources }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -54,6 +55,22 @@ rules:
- watch
- list

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: fission-crd
subjects:
- kind: ServiceAccount
name: fission-svc
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io

{{- end }}

---
apiVersion: v1
kind: ServiceAccount
Expand All @@ -76,20 +93,6 @@ roleRef:
name: admin
apiGroup: rbac.authorization.k8s.io

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: fission-crd
subjects:
- kind: ServiceAccount
name: fission-svc
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io

---
apiVersion: v1
kind: ServiceAccount
Expand Down
10 changes: 10 additions & 0 deletions charts/fission-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ builderNamespace: fission-builder
## Enable istio integration
enableIstio: false

# In clusters with multiple fission instances, helm will complain about pre-existing resources
# Set the following to false to avoid (re)creating any cluster-scoped resources.
# It's then up to you to ensure that the necessary clusterresources are created'
createClusterResources: true

# Whether or not to create namespaces for builder/fetcher as part of the helm install
# In some configurations, a service account may have privilegdes to deploy into a namespace, but not
# to create additional namespaces (so the namespaces must be pre-prepared)
createNamespace: true

fetcher:
## Fetcher repository
image: fission/fetcher
Expand Down

0 comments on commit 3643c2e

Please sign in to comment.