From 96b6842413c9768e5930b7d80070a008d623ba13 Mon Sep 17 00:00:00 2001 From: kmarton Date: Thu, 21 May 2020 11:15:35 +0200 Subject: [PATCH] [YUNIKORN-159] Remove helm charts from the k8shim repo --- helm-charts/yunikorn/.helmignore | 21 ---- helm-charts/yunikorn/Chart.yaml | 22 ---- helm-charts/yunikorn/templates/_helpers.tpl | 32 ----- helm-charts/yunikorn/templates/cleanup.yaml | 54 -------- helm-charts/yunikorn/templates/configmap.yaml | 31 ----- .../yunikorn/templates/deployment.yaml | 91 -------------- helm-charts/yunikorn/templates/rbac.yaml | 41 ------- helm-charts/yunikorn/templates/service.yaml | 40 ------ helm-charts/yunikorn/values.yaml | 115 ------------------ 9 files changed, 447 deletions(-) delete mode 100644 helm-charts/yunikorn/.helmignore delete mode 100644 helm-charts/yunikorn/Chart.yaml delete mode 100644 helm-charts/yunikorn/templates/_helpers.tpl delete mode 100644 helm-charts/yunikorn/templates/cleanup.yaml delete mode 100644 helm-charts/yunikorn/templates/configmap.yaml delete mode 100644 helm-charts/yunikorn/templates/deployment.yaml delete mode 100644 helm-charts/yunikorn/templates/rbac.yaml delete mode 100644 helm-charts/yunikorn/templates/service.yaml delete mode 100644 helm-charts/yunikorn/values.yaml diff --git a/helm-charts/yunikorn/.helmignore b/helm-charts/yunikorn/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/helm-charts/yunikorn/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/helm-charts/yunikorn/Chart.yaml b/helm-charts/yunikorn/Chart.yaml deleted file mode 100644 index f934308eb..000000000 --- a/helm-charts/yunikorn/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -appVersion: "0.1.0" -description: YuniKorn scheduler for Kubernetes -name: yunikorn -version: 0.1.0 diff --git a/helm-charts/yunikorn/templates/_helpers.tpl b/helm-charts/yunikorn/templates/_helpers.tpl deleted file mode 100644 index a61caabc8..000000000 --- a/helm-charts/yunikorn/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "yunikorn.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "yunikorn.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "yunikorn.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/helm-charts/yunikorn/templates/cleanup.yaml b/helm-charts/yunikorn/templates/cleanup.yaml deleted file mode 100644 index 539820499..000000000 --- a/helm-charts/yunikorn/templates/cleanup.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: batch/v1 -kind: Job -metadata: - name: yunikorn-cleanup - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": post-delete - "helm.sh/hook-delete-policy": hook-succeeded - labels: - app: yunikorn - release: {{ .Release.Name }} -spec: - template: - metadata: - name: yunikorn-cleanup - labels: - app: yunikorn - release: {{ .Release.Name }} - spec: - serviceAccountName: {{ .Values.serviceAccount }} - containers: - - name: curl - image: "{{ .Values.curl_image.repository }}:{{ .Values.curl_image.tag }}" - imagePullPolicy: {{ .Values.curl_image.pullPolicy }} - command: - - /bin/sh - - -c - - > - APISERVER=https://kubernetes.default.svc; - SERVICEACCOUNT=/var/run/secrets/kubernetes.io/serviceaccount; - NAMESPACE=$(cat ${SERVICEACCOUNT}/namespace); - TOKEN=$(cat ${SERVICEACCOUNT}/token); - CACERT=${SERVICEACCOUNT}/ca.crt; - curl --cacert ${CACERT} --header "Authorization: Bearer ${TOKEN}" -X DELETE ${APISERVER}/api/v1/namespaces/${NAMESPACE}/configmaps/yunikorn-configs; - curl --cacert ${CACERT} --header "Authorization: Bearer ${TOKEN}" -X DELETE ${APISERVER}/api/v1/namespaces/${NAMESPACE}/serviceaccounts/yunikorn-admin; - curl --cacert ${CACERT} --header "Authorization: Bearer ${TOKEN}" -X DELETE ${APISERVER}/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/yunikorn-rbac; - restartPolicy: Never diff --git a/helm-charts/yunikorn/templates/configmap.yaml b/helm-charts/yunikorn/templates/configmap.yaml deleted file mode 100644 index 7cb6129b0..000000000 --- a/helm-charts/yunikorn/templates/configmap.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: yunikorn-configs - labels: - app: yunikorn - chart: {{ include "yunikorn.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - "helm.sh/hook": "pre-install" - "helm.sh/hook-weight": "2" -data: - queues.yaml: {{quote .Values.configuration}} \ No newline at end of file diff --git a/helm-charts/yunikorn/templates/deployment.yaml b/helm-charts/yunikorn/templates/deployment.yaml deleted file mode 100644 index 00ff93cb3..000000000 --- a/helm-charts/yunikorn/templates/deployment.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: yunikorn-scheduler - labels: - app: yunikorn - chart: {{ include "yunikorn.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: yunikorn - release: {{ .Release.Name }} - template: - metadata: - name: yunikorn-scheduler - labels: - app: yunikorn - component: yunikorn-scheduler - release: {{ .Release.Name }} - spec: - serviceAccountName: {{ .Values.serviceAccount }} - containers: - - name: yunikorn-scheduler-k8s - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http1 - containerPort: {{ .Values.service.port }} - protocol: TCP - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: {{ .Values.resources.requests.cpu }} - memory: {{ .Values.resources.requests.memory }} - limits: - cpu: {{ .Values.resources.limits.cpu }} - memory: {{ .Values.resources.limits.memory }} - volumeMounts: - - name: config-volume - mountPath: /etc/yunikorn/ - {{ if .Values.embedAdmissionController }} - lifecycle: - postStart: - exec: - command: ["/bin/sh", "/admission_util.sh", "create"] - preStop: - exec: - command: ["/bin/sh", "/admission_util.sh", "delete"] - {{ end }} - - name: yunikorn-scheduler-web - image: "{{ .Values.web_image.repository }}:{{ .Values.web_image.tag }}" - imagePullPolicy: {{ .Values.web_image.pullPolicy }} - ports: - - name: http2 - containerPort: {{ .Values.service.port_web }} - protocol: TCP - resources: - requests: - memory: "32Mi" - cpu: "100m" - limits: - memory: "64Mi" - cpu: "200m" - volumes: - - name: config-volume - configMap: - name: yunikorn-configs \ No newline at end of file diff --git a/helm-charts/yunikorn/templates/rbac.yaml b/helm-charts/yunikorn/templates/rbac.yaml deleted file mode 100644 index 18c42a136..000000000 --- a/helm-charts/yunikorn/templates/rbac.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: yunikorn-admin - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install - "helm.sh/hook-weight": "0" ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: yunikorn-rbac - annotations: - "helm.sh/hook": pre-install - "helm.sh/hook-weight": "1" -subjects: - - kind: ServiceAccount - name: yunikorn-admin - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: cluster-admin - apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/helm-charts/yunikorn/templates/service.yaml b/helm-charts/yunikorn/templates/service.yaml deleted file mode 100644 index e2c43bcaa..000000000 --- a/helm-charts/yunikorn/templates/service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: Service -metadata: - name: yunikorn-service - labels: - app: yunikorn - chart: {{ include "yunikorn.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http1 - protocol: TCP - name: yunikorn-core - - port: {{ .Values.service.port_web }} - targetPort: http2 - protocol: TCP - name: yunikorn-service - selector: - app: yunikorn - release: {{ .Release.Name }} diff --git a/helm-charts/yunikorn/values.yaml b/helm-charts/yunikorn/values.yaml deleted file mode 100644 index 257cf1c00..000000000 --- a/helm-charts/yunikorn/values.yaml +++ /dev/null @@ -1,115 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -serviceAccount: yunikorn-admin - -image: - repository: yunikorn/yunikorn-scheduler-k8s - tag: latest - pullPolicy: Always - -web_image: - repository: yunikorn/yunikorn-web - tag: latest - pullPolicy: Always - -curl_image: - repository: curlimages/curl - tag: latest - pullPolicy: IfNotPresent - -service: - type: LoadBalancer - port: 9080 - port_web: 9889 - -resources: - requests: - cpu: 200m - memory: 1Gi - limits: - cpu: 4 - memory: 2Gi - -# When this flag is true, the admission controller will be installed along with the scheduler. -# When this flag is false, the admission controller will not be installed. -# Once the admission controller is installed, all traffic will be routing to yunikorn. -embedAdmissionController: false - -# -# ------------------------------------------------------------------------ -# Please choose one configuration from following two for yunikorn -# Use "CMD + /" to comment-out or uncomment a block before the deployment -# ------------------------------------------------------------------------ -# - -# Use this configuration to automatically map K8s namespaces to yunikorn queues -configuration: | - partitions: - - - name: default - placementrules: - - name: tag - value: namespace - create: true - queues: - - name: root - submitacl: '*' - -# Use this configuration to configure absolute capacities for yunikorn queues -#configuration: | -# partitions: -# - -# name: default -# queues: -# - -# name: root -# submitacl: '*' -# queues: -# - -# name: advertisement -# resources: -# guaranteed: -# memory: 500000 -# vcore: 50000 -# max: -# memory: 800000 -# vcore: 80000 -# - -# name: search -# resources: -# guaranteed: -# memory: 400000 -# vcore: 40000 -# max: -# memory: 600000 -# vcore: 60000 -# - -# name: sandbox -# resources: -# guaranteed: -# memory: 100000 -# vcore: 10000 -# max: -# memory: 100000 -# vcore: 10000 -