[POLICY] Add Kserve participant
[oom.git] / kubernetes / policy / components / policy-clamp-ac-kserve-ppnt / templates / service.yaml
diff --git a/kubernetes/policy/components/policy-clamp-ac-kserve-ppnt/templates/service.yaml b/kubernetes/policy/components/policy-clamp-ac-kserve-ppnt/templates/service.yaml
new file mode 100644 (file)
index 0000000..ac5ee0b
--- /dev/null
@@ -0,0 +1,38 @@
+{{/*\r
+#  ============LICENSE_START=======================================================\r
+#   Copyright (C) 2023 Nordix Foundation. All rights reserved.\r
+#  ================================================================================\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#       http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+#  SPDX-License-Identifier: Apache-2.0\r
+#  ============LICENSE_END=========================================================\r
+*/}}\r
+\r
+apiVersion: rbac.authorization.k8s.io/v1\r
+kind: ClusterRoleBinding\r
+metadata:\r
+  name: {{ include "common.namespace" . }}-policy-clamp-ac-kserve-ppnt-binding\r
+  namespace: {{ include "common.namespace" . }}\r
+  labels:\r
+    app: {{ include "common.name" . }}\r
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}\r
+    release: {{ include "common.release" . }}\r
+    heritage: {{ .Release.Service }}\r
+roleRef:\r
+  apiGroup: rbac.authorization.k8s.io\r
+  kind: ClusterRole\r
+  name: cluster-admin\r
+subjects:\r
+  - kind: ServiceAccount\r
+    name: {{ include "common.fullname" (dict "suffix" "create" "dot" . )}}\r
+    namespace: {{ include "common.namespace" . }}\r