From c802e99728240cf74f2aa69fbc763df7c6db8485 Mon Sep 17 00:00:00 2001 From: zeroalphat Date: Fri, 17 Nov 2023 02:52:55 +0000 Subject: [PATCH] Improve rbac manifests Signed-off-by: zeroalphat --- config/rbac/role.yaml | 16 ++++++++-------- config/rbac/rolebinding.yaml | 20 ++++++++++---------- config/rbac/serviceaccount.yaml | 2 +- e2e/manifests/necoperf-client.yaml | 10 +++++----- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f4abe22..a826556 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,19 +1,19 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: necoperf-daemon-role + name: necoperf-cli-service-discovery namespace: necoperf rules: -- apiGroups: [""] - resources: ["pods"] - verbs: ["get","list"] + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: necoperf-cli-role + name: necoperf-cli namespace: default rules: -- apiGroups: [""] - resources: ["pods"] - verbs: ["get","list"] + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list"] diff --git a/config/rbac/rolebinding.yaml b/config/rbac/rolebinding.yaml index bde6315..8d12805 100644 --- a/config/rbac/rolebinding.yaml +++ b/config/rbac/rolebinding.yaml @@ -1,27 +1,27 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: necoperf-cli-rolebinding + name: necoperf-cli-binding namespace: default roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: necoperf-cli-role + name: necoperf-cli subjects: -- kind: ServiceAccount - name: necoperf-sa - namespace: default + - kind: ServiceAccount + name: necoperf-cli + namespace: default --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: necoperf-daemon-rolebinding + name: necoperf-cli-service-discovery-binding namespace: necoperf roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: necoperf-daemon-role + name: necoperf-cli-service-discovery subjects: -- kind: ServiceAccount - name: necoperf-sa - namespace: default + - kind: ServiceAccount + name: necoperf-cli + namespace: default diff --git a/config/rbac/serviceaccount.yaml b/config/rbac/serviceaccount.yaml index 94f8909..46dd434 100644 --- a/config/rbac/serviceaccount.yaml +++ b/config/rbac/serviceaccount.yaml @@ -1,5 +1,5 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: necoperf-sa + name: necoperf-cli namespace: default diff --git a/e2e/manifests/necoperf-client.yaml b/e2e/manifests/necoperf-client.yaml index 45d6268..fa0e998 100644 --- a/e2e/manifests/necoperf-client.yaml +++ b/e2e/manifests/necoperf-client.yaml @@ -5,11 +5,11 @@ metadata: namespace: default spec: containers: - - name: necoperf-client - image: necoperf-cli:dev - imagePullPolicy: IfNotPresent - command: ["pause"] + - name: necoperf-client + image: necoperf-cli:dev + imagePullPolicy: IfNotPresent + command: ["pause"] securityContext: runAsUser: 10000 runAsGroup: 10000 - serviceAccountName: necoperf-sa + serviceAccountName: necoperf-cli