|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +apiVersion: v1 |
| 19 | +kind: ServiceAccount |
| 20 | +metadata: |
| 21 | + name: spark-shuffle-service-service-account |
| 22 | + namespace: default |
| 23 | + labels: |
| 24 | + app: spark-shuffle-service |
| 25 | + spark-version: 2.2.0 |
| 26 | +--- |
| 27 | +apiVersion: extensions/v1beta1 |
| 28 | +kind: PodSecurityPolicy |
| 29 | +metadata: |
| 30 | + name: spark-shuffle-service-pod-security-policy |
| 31 | + labels: |
| 32 | + app: spark-shuffle-service |
| 33 | + spark-version: 2.2.0 |
| 34 | +spec: |
| 35 | + privileged: false |
| 36 | + fsGroup: |
| 37 | + rule: RunAsAny |
| 38 | + runAsUser: |
| 39 | + rule: RunAsAny |
| 40 | + volumes: |
| 41 | + - "hostPath" |
| 42 | + - "secret" |
| 43 | +--- |
| 44 | +apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 45 | +kind: ClusterRole |
| 46 | +metadata: |
| 47 | + name: spark-shuffle-service-role |
| 48 | + labels: |
| 49 | + app: spark-shuffle-service |
| 50 | + spark-version: 2.2.0 |
| 51 | +rules: |
| 52 | +- apiGroups: |
| 53 | + - "extensions" |
| 54 | + resources: |
| 55 | + - "podsecuritypolicies" |
| 56 | + resourceNames: |
| 57 | + - "spark-shuffle-service-pod-security-policy" |
| 58 | + verbs: |
| 59 | + - "use" |
| 60 | +- apiGroups: |
| 61 | + - "" # "" indicates the core API group |
| 62 | + resources: |
| 63 | + - "pods" |
| 64 | + verbs: |
| 65 | + - "get" |
| 66 | + - "list" |
| 67 | + - "watch" |
| 68 | +--- |
| 69 | +apiVersion: rbac.authorization.k8s.io/v1beta1 |
| 70 | +kind: ClusterRoleBinding |
| 71 | +metadata: |
| 72 | + name: spark-shuffle-service-role-binding |
| 73 | +subjects: |
| 74 | +- kind: ServiceAccount |
| 75 | + name: spark-shuffle-service-service-account |
| 76 | + namespace: default |
| 77 | +roleRef: |
| 78 | + apiGroup: rbac.authorization.k8s.io |
| 79 | + kind: ClusterRole |
| 80 | + name: spark-shuffle-service-role |
0 commit comments