From f44f624ba035d913a9c483d521fc581f752bcf7f Mon Sep 17 00:00:00 2001 From: JiaChi Wang Date: Sat, 16 Sep 2023 17:05:33 +0800 Subject: [PATCH] delete deplicate files --- deployments/scheduler/README.md | 64 ---------- .../scheduler/admission-controller-rbac.yaml | 83 ------------ .../admission-controller-secrets.yaml | 22 ---- .../scheduler/admission-controller.yaml | 92 -------------- deployments/scheduler/plugin.yaml | 119 ------------------ deployments/scheduler/prometheus.yml | 38 ------ deployments/scheduler/scheduler-load.yaml | 83 ------------ deployments/scheduler/scheduler.yaml | 67 ---------- deployments/scheduler/yunikorn-configs.yaml | 32 ----- deployments/scheduler/yunikorn-rbac.yaml | 114 ----------------- 10 files changed, 714 deletions(-) delete mode 100644 deployments/scheduler/README.md delete mode 100644 deployments/scheduler/admission-controller-rbac.yaml delete mode 100644 deployments/scheduler/admission-controller-secrets.yaml delete mode 100644 deployments/scheduler/admission-controller.yaml delete mode 100644 deployments/scheduler/plugin.yaml delete mode 100644 deployments/scheduler/prometheus.yml delete mode 100644 deployments/scheduler/scheduler-load.yaml delete mode 100644 deployments/scheduler/scheduler.yaml delete mode 100644 deployments/scheduler/yunikorn-configs.yaml delete mode 100644 deployments/scheduler/yunikorn-rbac.yaml diff --git a/deployments/scheduler/README.md b/deployments/scheduler/README.md deleted file mode 100644 index 1ca18fb9f..000000000 --- a/deployments/scheduler/README.md +++ /dev/null @@ -1,64 +0,0 @@ - - -# Deployment examples - -## Scheduler - -Deploys scheduler-core + scheduler-web - -* Scheduler pod runs 2 containers, 1 for scheduler-core, 1 for scheduler-web -* UI port is `9889` - -Deployment: [scheduler.yaml](scheduler.yaml) - -## Scheduler configuration - -This deployment contains a minimal queue configuration for YuniKorn. - -Deployment: [yunikorn-configs.yaml](yunikorn-configs.yaml) - -## RBAC (Scheduler) - -A new deployment file was added with this version. The deployment documentation was updated to create RBAC for the scheduler. -The RBAC requirement is not linked to a specific version of YuniKorn but depends on the kubernetes version used. - -Deployment: [yunikorn-rbac.yaml](yunikorn-rbac.yaml) - -## Load Balancer - -Deploys scheduler-core + scheduler-web - -* Scheduler pod runs 2 containers, 1 for scheduler-core, 1 for scheduler-web -* UI port is `9889` -* A load balancer that helps to expose web UI link directly on K8s - -Deployment: [scheduler-load.yaml](scheduler-load.yaml) - -## Admission Controller - -Deploys an admission controller which will modify newly created pods to force them to be scheduled by YuniKorn. This -allows YuniKorn to take over the scheduling duties of the cluster without replacing the default scheduler explicitly. - -* Deployment: [admission-controller-rbac.yaml](admission-controller-rbac.yaml) - * Configures required roles and permissions to allow the admission controller to run. -* Deployment: [admission-controller-secrets.yaml](admission-controller-secrets.yaml) - * Deploys an empty secret which is used to store TLS certificates and keys. -* Deployment: [admission-controller.yaml](admission-controller.yaml) - * Deploys the admission controller as a service. - diff --git a/deployments/scheduler/admission-controller-rbac.yaml b/deployments/scheduler/admission-controller-rbac.yaml deleted file mode 100644 index c8a4ad5a8..000000000 --- a/deployments/scheduler/admission-controller-rbac.yaml +++ /dev/null @@ -1,83 +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: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: yunikorn-admission-controller-cluster-role -rules: - - apiGroups: ["admissionregistration.k8s.io"] - resources: ["validatingwebhookconfigurations"] - verbs: ["get", "watch", "list", "create", "patch", "update", "delete"] - - apiGroups: ["admissionregistration.k8s.io"] - resources: ["mutatingwebhookconfigurations"] - verbs: ["get", "watch", "list", "create", "patch", "update", "delete"] - - apiGroups: [""] - resources: ["pods"] - verbs: ["get"] - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "watch", "list"] - - apiGroups: ["scheduling.k8s.io"] - resources: ["priorityclasses"] - verbs: ["get", "watch", "list"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: yunikorn-admission-controller-role -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "watch", "list", "update"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "watch", "list"] - ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: yunikorn-admission-controller - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: yunikorn-admission-controller-cluster-rbac -subjects: - - kind: ServiceAccount - name: yunikorn-admission-controller - namespace: yunikorn -roleRef: - kind: ClusterRole - name: yunikorn-admission-controller-cluster-role - apiGroup: rbac.authorization.k8s.io - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: yunikorn-admission-controller-rbac -subjects: - - kind: ServiceAccount - name: yunikorn-admission-controller -roleRef: - kind: Role - name: yunikorn-admission-controller-role - apiGroup: rbac.authorization.k8s.io diff --git a/deployments/scheduler/admission-controller-secrets.yaml b/deployments/scheduler/admission-controller-secrets.yaml deleted file mode 100644 index 315ccc344..000000000 --- a/deployments/scheduler/admission-controller-secrets.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 -kind: Secret -metadata: - name: admission-controller-secrets -type: Opaque diff --git a/deployments/scheduler/admission-controller.yaml b/deployments/scheduler/admission-controller.yaml deleted file mode 100644 index fcd84a1c6..000000000 --- a/deployments/scheduler/admission-controller.yaml +++ /dev/null @@ -1,92 +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/v1 -kind: Deployment -metadata: - name: yunikorn-admission-controller - labels: - app: yunikorn -spec: - replicas: 1 - selector: - matchLabels: - app: yunikorn - template: - metadata: - labels: - app: yunikorn - component: yunikorn-admission-controller - name: yunikorn-admission-controller - spec: - serviceAccountName: yunikorn-admission-controller - containers: - - name: yunikorn-admission-controller - image: apache/yunikorn:admission-amd64-latest - imagePullPolicy: IfNotPresent - resources: - requests: - cpu: 100m - memory: 500Mi - limits: - cpu: 500m - memory: 500Mi - volumeMounts: - - name: admission-controller-secrets - mountPath: /run/secrets/webhook - readOnly: true - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - ports: - - containerPort: 9089 - name: webhook-api - startupProbe: - httpGet: - scheme: HTTPS - path: /health - port: webhook-api - failureThreshold: 30 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: HTTPS - path: /health - port: webhook-api - periodSeconds: 5 - failureThreshold: 3 - volumes: - - name: admission-controller-secrets - secret: - secretName: admission-controller-secrets - ---- -apiVersion: v1 -kind: Service -metadata: - name: yunikorn-admission-controller-service - labels: - app: yunikorn-admission-controller-service -spec: - ports: - - port: 443 - targetPort: webhook-api - selector: - app: yunikorn - type: LoadBalancer diff --git a/deployments/scheduler/plugin.yaml b/deployments/scheduler/plugin.yaml deleted file mode 100644 index 889518618..000000000 --- a/deployments/scheduler/plugin.yaml +++ /dev/null @@ -1,119 +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 - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: yunikorn-rbac -subjects: - - kind: ServiceAccount - name: yunikorn-admin - namespace: default -roleRef: - kind: ClusterRole - name: cluster-admin - apiGroup: rbac.authorization.k8s.io - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: yunikorn - name: yunikorn-scheduler -spec: - replicas: 1 - selector: - matchLabels: - app: yunikorn - template: - metadata: - labels: - app: yunikorn - component: yunikorn-scheduler - name: yunikorn-scheduler - spec: - serviceAccountName: yunikorn-admin - containers: - - name: yunikorn-scheduler-k8s - image: apache/yunikorn:scheduler-plugin-latest - imagePullPolicy: IfNotPresent - ports: - - name: http1 - containerPort: 9080 - protocol: TCP - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: 1 - memory: 1Gi - limits: - cpu: 4 - memory: 2Gi - livenessProbe: - httpGet: - path: /ws/v1/scheduler/healthcheck - port: 9080 - initialDelaySeconds: 20 - periodSeconds: 600 - failureThreshold: 1 - - name: yunikorn-scheduler-web - image: apache/yunikorn:web-latest - imagePullPolicy: IfNotPresent - ports: - - name: http2 - containerPort: 9889 - protocol: TCP - resources: - requests: - memory: "100Mi" - cpu: "100m" - limits: - memory: "500Mi" - cpu: "200m" - ---- -apiVersion: v1 -kind: Service -metadata: - name: yunikorn-service - labels: - app: yunikorn-service -spec: - ports: - - port: 9080 - targetPort: http1 - protocol: TCP - name: yunikorn-core - - port: 9889 - targetPort: http2 - protocol: TCP - name: yunikorn-service - selector: - app: yunikorn - type: LoadBalancer diff --git a/deployments/scheduler/prometheus.yml b/deployments/scheduler/prometheus.yml deleted file mode 100644 index 01f1ba2c1..000000000 --- a/deployments/scheduler/prometheus.yml +++ /dev/null @@ -1,38 +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 sample Prometheus configuration file used to collect scheduler metrics -global: - scrape_interval: 3s - evaluation_interval: 15s - -alerting: - alertmanagers: - - static_configs: - - targets: - # - alert manager:9093 - -rule_files: - # - "first_rules.yml" - # - "second_rules.yml" - -scrape_configs: - - job_name: 'yunikorn' - scrape_interval: 1s - metrics_path: '/ws/v1/metrics' - static_configs: - - targets: ['docker.for.mac.host.internal:9080'] diff --git a/deployments/scheduler/scheduler-load.yaml b/deployments/scheduler/scheduler-load.yaml deleted file mode 100644 index e6e7f83ef..000000000 --- a/deployments/scheduler/scheduler-load.yaml +++ /dev/null @@ -1,83 +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/v1 -kind: Deployment -metadata: - labels: - app: yunikorn - name: yunikorn-scheduler -spec: - replicas: 1 - selector: - matchLabels: - app: yunikorn - template: - metadata: - labels: - app: yunikorn - component: yunikorn-scheduler - name: yunikorn-scheduler - spec: - hostNetwork: true - serviceAccountName: yunikorn-admin - containers: - - name: yunikorn-scheduler-k8s - image: apache/yunikorn:scheduler-amd64-latest - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: 200m - memory: 1Gi - limits: - cpu: 4 - memory: 2Gi - imagePullPolicy: IfNotPresent - ports: - - containerPort: 9080 - - name: yunikorn-scheduler-web - image: apache/yunikorn:web-amd64-latest - imagePullPolicy: IfNotPresent - resources: - requests: - cpu: 100m - memory: 100Mi - limits: - cpu: 200m - memory: 500Mi - ports: - - containerPort: 9889 ---- -apiVersion: v1 -kind: Service -metadata: - name: yunikorn-service - labels: - app: yunikorn-service -spec: - ports: - - name: yunikorn-service - port: 9889 - - name: yunikorn-core - port: 9080 - selector: - app: yunikorn - type: LoadBalancer diff --git a/deployments/scheduler/scheduler.yaml b/deployments/scheduler/scheduler.yaml deleted file mode 100644 index c61ee5600..000000000 --- a/deployments/scheduler/scheduler.yaml +++ /dev/null @@ -1,67 +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/v1 -kind: Deployment -metadata: - labels: - app: yunikorn - name: yunikorn-scheduler -spec: - replicas: 1 - selector: - matchLabels: - app: yunikorn - template: - metadata: - labels: - app: yunikorn - component: yunikorn-scheduler - name: yunikorn-scheduler - spec: - hostNetwork: true - serviceAccountName: yunikorn-admin - containers: - - name: yunikorn-scheduler-k8s - image: apache/yunikorn:scheduler-amd64-latest - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: 200m - memory: 1Gi - limits: - cpu: 4 - memory: 2Gi - imagePullPolicy: IfNotPresent - ports: - - containerPort: 9080 - - name: yunikorn-scheduler-web - image: apache/yunikorn:web-amd64-latest - imagePullPolicy: IfNotPresent - resources: - requests: - cpu: 100m - memory: 100Mi - limits: - cpu: 200m - memory: 500Mi - ports: - - containerPort: 9889 diff --git a/deployments/scheduler/yunikorn-configs.yaml b/deployments/scheduler/yunikorn-configs.yaml deleted file mode 100644 index 888db848f..000000000 --- a/deployments/scheduler/yunikorn-configs.yaml +++ /dev/null @@ -1,32 +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 -data: - queues.yaml: | - partitions: - - name: default - placementrules: - - name: tag - value: namespace - create: true - queues: - - name: root - submitacl: '*' diff --git a/deployments/scheduler/yunikorn-rbac.yaml b/deployments/scheduler/yunikorn-rbac.yaml deleted file mode 100644 index ff922e06f..000000000 --- a/deployments/scheduler/yunikorn-rbac.yaml +++ /dev/null @@ -1,114 +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 - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: yunikorn-scheduler -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "watch", "list"] - - apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "watch", "list"] - - apiGroups: ["scheduling.k8s.io"] - resources: ["priorityclasses"] - verbs: ["get", "watch", "list"] - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "watch", "list", "create", "patch", "update", "delete"] - - apiGroups: ["yunikorn.apache.org"] - resources: ["*"] - verbs: ["*"] - - apiGroups: ["sparkoperator.k8s.io"] - resources: ["*"] - verbs: ["*"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: yunikorn-scheduler -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "watch", "list", "update"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "watch", "list"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: yunikorn-rbac -subjects: - - kind: ServiceAccount - name: yunikorn-admin - namespace: yunikorn -roleRef: - kind: ClusterRole - name: yunikorn-scheduler - apiGroup: rbac.authorization.k8s.io - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: yunikorn-rbac-kube-scheduler -subjects: - - kind: ServiceAccount - name: yunikorn-admin - namespace: yunikorn -roleRef: - kind: ClusterRole - name: system:kube-scheduler - apiGroup: rbac.authorization.k8s.io - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: yunikorn-rbac-volume-scheduler -subjects: - - kind: ServiceAccount - name: yunikorn-admin - namespace: yunikorn -roleRef: - kind: ClusterRole - name: system:volume-scheduler - apiGroup: rbac.authorization.k8s.io - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: yunikorn-rbac -subjects: - - kind: ServiceAccount - name: yunikorn-admin -roleRef: - kind: Role - name: yunikorn-scheduler - apiGroup: rbac.authorization.k8s.io