Skip to content

[BUG] useRoleBindings: True still continues to use ClusterRole and role bindings that use ClusterRole #1130

@murumkar

Description

@murumkar

What is the bug?

useRoleBindings: True still continues to use ClusterRoles

How can one reproduce the bug?

Set useRoleBindings: True in value overrides and try to install with an account that has namespace level privileges (such as namespace admin)

What is the expected behavior?

Operator should use Role and RoleBinding and not ClusterRole

What is your host/environment?

Linux

Do you have any screenshots?

No

Do you have any additional context?

Following changes can be done to rectify this bug. All the files are in templates director for the operator.
File: opensearch-operator-manager-role-cr.yaml
Change:
2c2
< kind: Role

kind: ClusterRole
File: opensearch-operator-manager-rolebinding.yaml
Change:
8c8
< kind: Role


kind: ClusterRole
File: opensearch-operator-metrics-reader-cr.yaml
Change:
2c2
< kind: Role


kind: ClusterRole
4a5,9
rules:

  • nonResourceURLs:
    • /metrics
      verbs:
    • get
      File: opensearch-operator-proxy-role-cr.yaml
      Change:
      2c2
      < kind: Role

kind: ClusterRole
File: opensearch-operator-proxy-rolebinding.yaml
Change:
8c8
< kind: Role


kind: ClusterRole

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguntriagedIssues that have not yet been triaged

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions