Skip to content

Commit

Permalink
Using release.name in yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLike committed Mar 19, 2019
1 parent ecc346e commit 0c3ac14
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions installer/chart/volcano/templates/admission-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ webhooks:
caBundle: ""
service:
name: {{ .Release.Name }}-admission-service
namespace: {{ .Release.Namespace }}
path: /jobs
failurePolicy: Ignore
name: validatejob.volcano.sh
Expand All @@ -35,6 +36,7 @@ webhooks:
caBundle: ""
service:
name: {{ .Release.Name }}-admission-service
namespace: {{ .Release.Namespace }}
path: /mutating-jobs
failurePolicy: Ignore
name: mutatejob.volcano.sh
Expand Down
7 changes: 6 additions & 1 deletion installer/chart/volcano/templates/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}-admission

namespace: {{ .Release.Namespace }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-admission
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""]
resources: ["configmaps"]
Expand All @@ -24,9 +25,11 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-admission-role
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}-admission
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Release.Name }}-admission
Expand All @@ -40,6 +43,7 @@ metadata:
app: admission
admission: "true"
name: {{ .Release.Name }}-admission
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -84,6 +88,7 @@ metadata:
labels:
test: admission
name: {{ .Release.Name }}-admission-service
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 443
Expand Down
5 changes: 5 additions & 0 deletions installer/chart/volcano/templates/controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}-controllers
namespace: {{ .Release.Namespace }}

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-controllers
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
Expand Down Expand Up @@ -45,9 +47,11 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-controllers-role
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}-controllers
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Release.Name }}-controllers
Expand All @@ -58,6 +62,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}-controllers
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down
6 changes: 5 additions & 1 deletion installer/chart/volcano/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}-scheduler

namespace: {{ .Release.Namespace }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-scheduler
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
Expand Down Expand Up @@ -54,9 +55,11 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-scheduler-role
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}-scheduler
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Release.Name }}-scheduler
Expand All @@ -67,6 +70,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}-scheduler
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down

0 comments on commit 0c3ac14

Please sign in to comment.