clusterroles

package
v0.7.12 Latest Latest
Warning

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

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

Documentation

Overview

pkg/resources/clusterroles/clusterrole.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply added in v0.7.12

Apply creates or updates a ClusterRole using Server-Side Apply. Sends only the fields Orkestra owns; k8s-injected defaults are invisible.

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 ClusterRole via SSA. Delegates to Apply.

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