v1alpha1

package
v0.0.0-...-62570a8 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the managed v1alpha1 API group +kubebuilder:object:generate=true +groupName=managed.openshift.io

Index

Constants

View Source
const (
	// ClusterRoleBindingCreated const for ClusterRoleBindingCreated status
	ClusterRoleBindingCreated SubjectPermissionType = "ClusterRoleBindingCreated"
	// RoleBindingCreated const for RoleBindingCreated status
	RoleBindingCreated SubjectPermissionType = "RoleBindingCreated"
	// SubjectPermissionStateCreated const for Created state
	SubjectPermissionStateCreated SubjectPermissionState = "Created"
	// SubjectPermissionStateFailed const for Failed state
	SubjectPermissionStateFailed SubjectPermissionState = "Failed"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "managed.openshift.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

Types

type Condition

type Condition struct {
	// Type is the type of the condition
	Type SubjectPermissionType `json:"type,omitempty"`
	// LastTransitionTime is the last time this condition was active for the CR
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
	// Message related to the condition
	// +optional
	Message string `json:"message,omitempty"`
	// ClusterRoleName in which this condition is true
	ClusterRoleNames []string `json:"clusterRoleName,omitempty"`
	// Flag to indicate if condition status is currently active
	Status bool `json:"status"`
	// State that this condition represents
	State SubjectPermissionState `json:"state"`
}

Condition defines a single condition of running the operator against an instance of the SubjectPermission CR

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Permission

type Permission struct {
	// ClusterRoleName to bind to the Subject as a RoleBindings in allowed Namespaces
	ClusterRoleName string `json:"clusterRoleName"`
	// NamespacesAllowedRegex representing allowed Namespaces
	NamespacesAllowedRegex string `json:"namespacesAllowedRegex,omitempty"`
	// NamespacesDeniedRegex representing denied Namespaces
	NamespacesDeniedRegex string `json:"namespacesDeniedRegex,omitempty"`
}

Permission defines a Role that is bound to the Subject Allowed in specific Namespaces

func (*Permission) DeepCopy

func (in *Permission) DeepCopy() *Permission

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permission.

func (*Permission) DeepCopyInto

func (in *Permission) DeepCopyInto(out *Permission)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubjectPermission

type SubjectPermission struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SubjectPermissionSpec   `json:"spec,omitempty"`
	Status SubjectPermissionStatus `json:"status,omitempty"`
}

SubjectPermission is the Schema for the subjectpermissions API

func (*SubjectPermission) DeepCopy

func (in *SubjectPermission) DeepCopy() *SubjectPermission

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectPermission.

func (*SubjectPermission) DeepCopyInto

func (in *SubjectPermission) DeepCopyInto(out *SubjectPermission)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubjectPermission) DeepCopyObject

func (in *SubjectPermission) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubjectPermissionList

type SubjectPermissionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SubjectPermission `json:"items"`
}

SubjectPermissionList contains a list of SubjectPermission

func (*SubjectPermissionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectPermissionList.

func (*SubjectPermissionList) DeepCopyInto

func (in *SubjectPermissionList) DeepCopyInto(out *SubjectPermissionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubjectPermissionList) DeepCopyObject

func (in *SubjectPermissionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubjectPermissionSpec

type SubjectPermissionSpec struct {
	// Important: Run "make" to regenerate code after modifying this file
	// Kind of the Subject that is being granted permissions by the operator
	SubjectKind string `json:"subjectKind"`
	// Name of the Subject granted permissions by the operator
	SubjectName string `json:"subjectName"`
	// Namespace of the Subject granted permissions by the operator
	// +optional
	SubjectNamespace string `json:"subjectNamespace"`
	// List of permissions applied at Cluster scope
	// +optional
	ClusterPermissions []string `json:"clusterPermissions,omitempty"`
	// List of permissions applied at Namespace scope
	// +optional
	Permissions []Permission `json:"permissions,omitempty"`
}

NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. +k8s:openapi-gen=true SubjectPermissionSpec defines the desired state of SubjectPermission

func (*SubjectPermissionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectPermissionSpec.

func (*SubjectPermissionSpec) DeepCopyInto

func (in *SubjectPermissionSpec) DeepCopyInto(out *SubjectPermissionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubjectPermissionState

type SubjectPermissionState string

SubjectPermissionState defines various states a SubjectPermission CR can be in

type SubjectPermissionStatus

type SubjectPermissionStatus struct {
	// Important: Run "make" to regenerate code after modifying this file
	// List of conditions for the CR
	Conditions []Condition `json:"conditions,omitempty"`
}

+k8s:openapi-gen=true SubjectPermissionStatus defines the observed state of SubjectPermission

func (*SubjectPermissionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectPermissionStatus.

func (*SubjectPermissionStatus) DeepCopyInto

func (in *SubjectPermissionStatus) DeepCopyInto(out *SubjectPermissionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubjectPermissionType

type SubjectPermissionType string

SubjectPermissionType defines various type a SubjectPermission CR can be in

Jump to

Keyboard shortcuts

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