clusterroles

package
v0.7.9 Latest Latest
Warning

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

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

Documentation

Overview

pkg/resources/clusterroles/clusterrole.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

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

func Delete

Delete deletes the ClusterRole if it exists.

func DeleteIfOwned

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

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

func Update

Update applies the desired rules to an existing ClusterRole. If it does not exist, creates it.

Types

type ResolvedClusterRoleSpec

type ResolvedClusterRoleSpec struct {
	Name   string
	Labels map[string]string
	Rules  []rbacv1.PolicyRule
	Sleep  string
}

ResolvedClusterRoleSpec is the fully resolved ClusterRole specification.

func Resolve

Resolve builds a ResolvedClusterRoleSpec from a ClusterRoleTemplateSource. 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