Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Use namespace scoped informers when namespaces-list is provided. #2900

Closed
wwitzel3 opened this issue Sep 21, 2021 · 1 comment · Fixed by #2923
Closed

Use namespace scoped informers when namespaces-list is provided. #2900

wwitzel3 opened this issue Sep 21, 2021 · 1 comment · Fixed by #2923
Assignees
Labels
api enhancement New feature or request
Projects

Comments

@wwitzel3
Copy link
Contributor

When an explicit namespaces-list is provided to Octant, create namespace scoped informers instead of cluster scoped informers.

fixes #2687

@wwitzel3 wwitzel3 added this to To do in 0.25 via automation Sep 21, 2021
@wwitzel3 wwitzel3 added api enhancement New feature or request labels Sep 21, 2021
@GuessWhoSamFoo GuessWhoSamFoo moved this from To do to In progress in 0.25 Sep 21, 2021
@GuessWhoSamFoo GuessWhoSamFoo self-assigned this Sep 21, 2021
@GuessWhoSamFoo
Copy link
Contributor

To help facilitate reviews, here is yaml to create a service account scoped to reading pods only.

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: test-user
  namespace: default

---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
  resources: ["pods"]
  verbs: ["get", "watch", "list"]

---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: test-user-view
  namespace: default 
subjects:
- kind: ServiceAccount
  name: test-user
  namespace: default 
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: pod-reader
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: $CA_DATA
    server: https://127.0.0.1:39567
  name: kind-kind

contexts:
- context:
    cluster: kind-kind
    namespace: default
    user: test-user
  name: kind-kind

current-context: kind-kind
kind: Config
preferences: {}


users:
- name: test-user
  user:
    token: $TOKEN
    client-key-data: $CA_DATA

where $TOKEN and $CA_DATA can be found under the secret test-user-token-____

Minimum expectations are having pods to be visible. The navigation panel should also hide extraneous elements

0.25 automation moved this from In progress to Done Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api enhancement New feature or request
Projects
0.25
Done
Development

Successfully merging a pull request may close this issue.

2 participants