Skip to content

Commit

Permalink
Separate Activator SA (knative#14133)
Browse files Browse the repository at this point in the history
* Activator SA

* Activator SA

* Update config/core/200-roles/activator.yaml

Co-authored-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>

* s/2019/2023

---------

Co-authored-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
  • Loading branch information
2 people authored and skonto committed Oct 5, 2023
1 parent cc9a098 commit 514f523
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
47 changes: 47 additions & 0 deletions config/core/200-roles/activator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2023 The Knative Authors
#
# Licensed 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
#
# https://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.

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: knative-serving-activator
namespace: knative-serving
labels:
serving.knative.dev/controller: "true"
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-serving
rules:
- apiGroups: [""]
resources: ["configmaps", "secrets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch"]
resourceNames: ["routing-serving-certs", "knative-serving-certs"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: knative-serving-activator-cluster
labels:
serving.knative.dev/controller: "true"
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-serving
rules:
- apiGroups: [""]
resources: ["services", "endpoints"]
verbs: ["get", "list", "watch"]
- apiGroups: ["serving.knative.dev"]
resources: ["revisions"]
verbs: ["get", "list", "watch"]
45 changes: 45 additions & 0 deletions config/core/200-serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,48 @@ roleRef:
kind: ClusterRole
name: knative-serving-aggregated-addressable-resolver
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: activator
namespace: knative-serving
labels:
app.kubernetes.io/component: activator
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: devel
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: knative-serving-activator
namespace: knative-serving
labels:
app.kubernetes.io/component: activator
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: devel
subjects:
- kind: ServiceAccount
name: activator
namespace: knative-serving
roleRef:
kind: Role
name: knative-serving-activator
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: knative-serving-activator-cluster
labels:
app.kubernetes.io/component: activator
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: devel
subjects:
- kind: ServiceAccount
name: activator
namespace: knative-serving
roleRef:
kind: ClusterRole
name: knative-serving-activator-cluster
apiGroup: rbac.authorization.k8s.io
2 changes: 1 addition & 1 deletion config/core/deployments/activator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: devel
spec:
serviceAccountName: controller
serviceAccountName: activator
containers:
- name: activator
# This is the Go import path for the binary that is containerized
Expand Down

0 comments on commit 514f523

Please sign in to comment.