Skip to content

fix tigera-operator secrets RBAC permission for egressgateway#3863

Merged
marvin-tigera merged 2 commits intotigera:masterfrom
vara2504:egw_secrets
Apr 4, 2025
Merged

fix tigera-operator secrets RBAC permission for egressgateway#3863
marvin-tigera merged 2 commits intotigera:masterfrom
vara2504:egw_secrets

Conversation

@vara2504
Copy link
Contributor

@vara2504 vara2504 commented Apr 4, 2025

Description

If the operator needs to create, update, or delete a secret in any namespace within the cluster (whether a product-specific or user-specific namespace), it must have a RoleBinding that grants the necessary RBAC permissions for secrets in that namespace.

apiVersion: v1
items:
- apiVersion: rbac.authorization.k8s.io/v1
  kind: RoleBinding
  metadata:
    creationTimestamp: "2025-04-04T15:10:45Z"
    name: tigera-operator-secrets
    namespace: calico-egress
    ownerReferences:
    - apiVersion: operator.tigera.io/v1
      kind: EgressGateway
      name: egress-gateway-red
      uid: 0dcb2194-0e64-447c-bf2e-a6de8907839c
    - apiVersion: operator.tigera.io/v1
      kind: EgressGateway
      name: egress-gateway-blue
      uid: 03270136-c8b9-4233-9042-7279aecd0cd6
    resourceVersion: "36674"
    uid: 44b58cfe-d7da-407e-8f8a-21f88c2a25dd
  roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: ClusterRole
    name: tigera-operator-secrets
  subjects:
  - kind: ServiceAccount
    name: tigera-operator
    namespace: tigera-operator
kind: List
metadata:
  resourceVersion: ""

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

@marvin-tigera marvin-tigera added this to the v1.39.0 milestone Apr 4, 2025
@vara2504 vara2504 changed the title fix tigera-operator permission error for egressgateway fix tigera-operator secrets RBAC error for egressgateway Apr 4, 2025
@vara2504 vara2504 changed the title fix tigera-operator secrets RBAC error for egressgateway fix tigera-operator secrets RBAC permission for egressgateway Apr 4, 2025
@vara2504 vara2504 marked this pull request as ready for review April 4, 2025 16:13
@vara2504 vara2504 requested a review from a team as a code owner April 4, 2025 16:13
@rene-dekker
Copy link
Member

/merge-when-ready

@marvin-tigera
Copy link
Contributor

OK, I will merge the pull request when it's ready, leave the commits as is when I merge it, and leave the branch after I've merged it.

@marvin-tigera marvin-tigera merged commit 90d436e into tigera:master Apr 4, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants