mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Found a typo in rbac and issue with example while preparing walk-through docs. <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/netbirdio/codesmith/kubernetes-operator/pr/374"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1786871474&installation_id=146802194&pr_number=374&repository=netbirdio%2Fkubernetes-operator&return_to=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Fkubernetes-operator%2Fpull%2F374&signature=050e666d4eacb869624c2045bdedd563bc789a733a0882abb61ae5c880528c3f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>/codesmith</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Corrected permissions for accessing NetworkEgress status resources. * **Examples** * Updated the NetworkEgress example to target a service by fully qualified domain name instead of a static IP address. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
277 lines
4.5 KiB
YAML
277 lines
4.5 KiB
YAML
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ include "netbird-operator.fullname" . }}
|
|
labels:
|
|
{{- include "netbird-operator.labels" . | nindent 4 }}
|
|
rules:
|
|
- apiGroups:
|
|
- netbird.io
|
|
resources:
|
|
- nbsetupkeys
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- apiGroups:
|
|
- netbird.io
|
|
resources:
|
|
- nbsetupkeys/finalizers
|
|
verbs:
|
|
- update
|
|
- apiGroups:
|
|
- netbird.io
|
|
resources:
|
|
- nbsetupkeys/status
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- netbird.io
|
|
resources:
|
|
- nbgroups
|
|
- nbresources
|
|
- nbroutingpeers
|
|
- nbpolicies
|
|
- setupkeys
|
|
- groups
|
|
- networkrouters
|
|
- networkresources
|
|
- networkegresses
|
|
- sidecarprofiles
|
|
- clusterproxies
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- list
|
|
- watch
|
|
- create
|
|
- delete
|
|
- apiGroups:
|
|
- netbird.io
|
|
resources:
|
|
- nbgroups/status
|
|
- nbresources/status
|
|
- nbroutingpeers/status
|
|
- nbpolicies/status
|
|
- setupkeys/status
|
|
- groups/status
|
|
- networkrouters/status
|
|
- networkresources/status
|
|
- networkegresses/status
|
|
- sidecarprofiles/status
|
|
- clusterproxies/status
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- netbird.io
|
|
resources:
|
|
- nbgroups/finalizers
|
|
- nbresources/finalizers
|
|
- nbroutingpeers/finalizers
|
|
- nbpolicies/finalizers
|
|
- setupkeys/finalizers
|
|
- groups/finalizers
|
|
- networkrouters/finalizers
|
|
- networkresources/finalizers
|
|
- networkegresses/finalizers
|
|
- sidecarprofiles/finalizers
|
|
verbs:
|
|
- update
|
|
- apiGroups:
|
|
- "discovery.k8s.io"
|
|
resources:
|
|
- endpointslices
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- list
|
|
- watch
|
|
- create
|
|
- delete
|
|
- apiGroups:
|
|
- "rbac.authorization.k8s.io"
|
|
resources:
|
|
- roles
|
|
- rolebindings
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- create
|
|
- update
|
|
- patch
|
|
- delete
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- configmaps
|
|
- serviceaccounts
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- create
|
|
- update
|
|
- patch
|
|
- delete
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- services
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- list
|
|
- watch
|
|
- create
|
|
- delete
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- namespaces
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- services/finalizers
|
|
verbs:
|
|
- update
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- deployments
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- list
|
|
- watch
|
|
- create
|
|
- delete
|
|
- apiGroups:
|
|
- policy
|
|
resources:
|
|
- poddisruptionbudgets
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- create
|
|
- update
|
|
- patch
|
|
- delete
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
{{- if or .Values.netbirdAPI.keyFromSecret .Values.clusterSecretsPermissions.allowAllSecrets }}
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- secrets
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
{{- if .Values.netbirdAPI.keyFromSecret }}
|
|
- patch
|
|
- update
|
|
- create
|
|
- delete
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.gatewayAPI.enabled }}
|
|
- apiGroups: ["gateway.networking.k8s.io"]
|
|
resources:
|
|
- gatewayclasses
|
|
- gateways
|
|
- httproutes
|
|
- tcproutes
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- update
|
|
- patch
|
|
- apiGroups: ["gateway.networking.k8s.io"]
|
|
resources:
|
|
- gatewayclasses/status
|
|
- gateways/status
|
|
- httproutes/status
|
|
- tcproutes/status
|
|
verbs:
|
|
- update
|
|
- patch
|
|
{{- end }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ include "netbird-operator.fullname" . }}
|
|
labels:
|
|
{{- include "netbird-operator.labels" . | nindent 4 }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ include "netbird-operator.fullname" . }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "netbird-operator.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ include "netbird-operator.fullname" . }}
|
|
labels:
|
|
{{- include "netbird-operator.labels" . | nindent 4 }}
|
|
rules:
|
|
- apiGroups:
|
|
- coordination.k8s.io
|
|
resources:
|
|
- leases
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- create
|
|
- update
|
|
- patch
|
|
- delete
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- events
|
|
verbs:
|
|
- create
|
|
- patch
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ include "netbird-operator.fullname" . }}
|
|
labels:
|
|
{{- include "netbird-operator.labels" . | nindent 4 }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: {{ include "netbird-operator.fullname" . }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "netbird-operator.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace }}
|