-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from TommyLike/feature/add_charts_back
Adding helm chart templates back
- Loading branch information
Showing
18 changed files
with
858 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule helm
deleted from
4de7e2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
description: A Helm chart for Volcano | ||
name: volcano | ||
version: 0.1 | ||
appVersion: 0.1 | ||
icon: https://raw.githubusercontent.com/volcano-sh/charts/master/docs/images/volcano-logo.png | ||
home: https://volcano.sh | ||
sources: | ||
- https://github.com/volcano-sh/volcano | ||
maintainers: | ||
- name: k82cn | ||
email: klaus1982.cn@gmail.com | ||
- name: kevin-wangzefeng | ||
email: kevinwzf0126@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
actions: "enqueue, reclaim, allocate, backfill, preempt" | ||
tiers: | ||
- plugins: | ||
- name: priority | ||
- name: gang | ||
- name: conformance | ||
- plugins: | ||
- name: drf | ||
- name: predicates | ||
- name: proportion | ||
- name: nodeorder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
actions: "enqueue, allocate, backfill" | ||
tiers: | ||
- plugins: | ||
- name: priority | ||
- name: gang | ||
- name: conformance | ||
- plugins: | ||
- name: drf | ||
- name: predicates | ||
- name: proportion | ||
- name: nodeorder |
52 changes: 52 additions & 0 deletions
52
installer/helm/chart/volcano/templates/admission-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
name: {{ .Release.Name }}-validate-job | ||
annotations: | ||
"helm.sh/hook": pre-install | ||
"helm.sh/hook-delete-policy": before-hook-creation | ||
webhooks: | ||
- clientConfig: | ||
service: | ||
name: {{ .Release.Name }}-admission-service | ||
namespace: {{ .Release.Namespace }} | ||
path: /jobs | ||
failurePolicy: Ignore | ||
name: validatejob.volcano.sh | ||
namespaceSelector: {} | ||
rules: | ||
- apiGroups: | ||
- "batch.volcano.sh" | ||
apiVersions: | ||
- "v1alpha1" | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- jobs | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: {{ .Release.Name }}-mutate-job | ||
annotations: | ||
"helm.sh/hook": pre-install | ||
"helm.sh/hook-delete-policy": before-hook-creation | ||
webhooks: | ||
- clientConfig: | ||
service: | ||
name: {{ .Release.Name }}-admission-service | ||
namespace: {{ .Release.Namespace }} | ||
path: /mutating-jobs | ||
failurePolicy: Ignore | ||
name: mutatejob.volcano.sh | ||
namespaceSelector: {} | ||
rules: | ||
- apiGroups: | ||
- "batch.volcano.sh" | ||
apiVersions: | ||
- "v1alpha1" | ||
operations: | ||
- CREATE | ||
resources: | ||
- jobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
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"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["admissionregistration.k8s.io"] | ||
resources: ["mutatingwebhookconfigurations"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
- apiGroups: ["admissionregistration.k8s.io"] | ||
resources: ["validatingwebhookconfigurations"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
# Rules below is used generate admission service secret | ||
- apiGroups: ["certificates.k8s.io"] | ||
resources: ["certificatesigningrequests"] | ||
verbs: ["get", "list", "create", "delete"] | ||
- apiGroups: ["certificates.k8s.io"] | ||
resources: ["certificatesigningrequests/approval"] | ||
verbs: ["create", "update"] | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["create", "get", "patch"] | ||
- apiGroups: ["scheduling.incubator.k8s.io"] | ||
resources: ["queues"] | ||
verbs: ["get", "list"] | ||
|
||
--- | ||
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 | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: volcano-admission | ||
name: {{ .Release.Name }}-admission | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: volcano-admission | ||
template: | ||
metadata: | ||
labels: | ||
app: volcano-admission | ||
spec: | ||
serviceAccount: {{ .Release.Name }}-admission | ||
{{ if .Values.basic.image_pull_secret }} | ||
imagePullSecrets: | ||
- name: {{ .Values.basic.image_pull_secret }} | ||
{{ end }} | ||
containers: | ||
- args: | ||
- --tls-cert-file=/admission.local.config/certificates/tls.crt | ||
- --tls-private-key-file=/admission.local.config/certificates/tls.key | ||
- --ca-cert-file=/admission.local.config/certificates/ca.crt | ||
- --mutate-webhook-config-name={{ .Release.Name }}-mutate-job | ||
- --validate-webhook-config-name={{ .Release.Name }}-validate-job | ||
- --alsologtostderr | ||
- --port=443 | ||
- -v=4 | ||
- 2>&1 | ||
image: {{.Values.basic.admission_image_name}}:{{.Values.basic.image_tag_version}} | ||
imagePullPolicy: IfNotPresent | ||
name: admission | ||
volumeMounts: | ||
- mountPath: /admission.local.config/certificates | ||
name: admission-certs | ||
readOnly: true | ||
volumes: | ||
- name: admission-certs | ||
secret: | ||
defaultMode: 420 | ||
secretName: {{.Values.basic.admission_secret_name}} | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: volcano-admission | ||
name: {{ .Release.Name }}-admission-service | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ports: | ||
- port: 443 | ||
protocol: TCP | ||
targetPort: 443 | ||
selector: | ||
app: volcano-admission | ||
sessionAffinity: None | ||
|
||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ .Release.Name }}-admission-init | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: volcano-admission-init | ||
spec: | ||
backoffLimit: 3 | ||
template: | ||
spec: | ||
serviceAccountName: {{ .Release.Name }}-admission | ||
restartPolicy: Never | ||
containers: | ||
- name: main | ||
image: {{.Values.basic.admission_image_name}}:{{.Values.basic.image_tag_version}} | ||
imagePullPolicy: IfNotPresent | ||
command: ["./gen-admission-secret.sh", "--service", "{{ .Release.Name }}-admission-service", "--namespace", | ||
"{{ .Release.Namespace }}", "--secret", "{{.Values.basic.admission_secret_name}}"] |
Oops, something went wrong.