clusterrolebindings

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

pkg/resources/clusterrolebindings/clusterrolebinding.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create creates a ClusterRoleBinding if it does not already exist. Idempotent — skips if the ClusterRoleBinding already exists. ClusterRoleBindings are cluster-scoped; ownership is tracked via the orkestra.io/owner label.

func Delete

Delete deletes the ClusterRoleBinding if it exists.

func DeleteIfOwned

func DeleteIfOwned(ctx context.Context, kube kubeclient.KubeClient,
	owner domain.Object, name string) error

DeleteIfOwned deletes the ClusterRoleBinding only if it is owned by the CR.

func Update

Update applies the desired subjects to an existing ClusterRoleBinding. RoleRef is immutable in Kubernetes — if it changed the binding is deleted and recreated. If it does not exist, creates it.

Types

type ResolvedClusterRoleBindingSpec

type ResolvedClusterRoleBindingSpec struct {
	Name     string
	Labels   map[string]string
	RoleRef  rbacv1.RoleRef
	Subjects []rbacv1.Subject
	Sleep    string
}

ResolvedClusterRoleBindingSpec is the fully resolved ClusterRoleBinding specification.

func Resolve

Resolve builds a ResolvedClusterRoleBindingSpec from a ClusterRoleBindingTemplateSource. Template expressions must already be evaluated by template.Resolver before calling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL