v1alpha2

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

+groupName=greenhouse.sap

Package v1alpha1 contains API Schema definitions for the greenhouse v1alpha2 API group. +kubebuilder:object:generate=true +groupName=greenhouse.sap

Index

Constants

View Source
const (
	// RBACReady is the condition type for the TeamRoleBinding when the rbacv1 resources are ready
	RBACReady greenhousemetav1alpha1.ConditionType = "RBACReady"

	// RBACReconciled is the condition reason for the TeamRoleBinding when the rbacv1 resources are successfully reconciled
	RBACReconciled greenhousemetav1alpha1.ConditionReason = "RBACReconciled"

	// RBACReconcileFailed is the condition reason for the TeamRoleBinding when not all of the rbacv1 resources have been successfully reconciled
	RBACReconcileFailed greenhousemetav1alpha1.ConditionReason = "RBACReconcileFailed"

	// EmptyClusterList is the condition reason for a resource when the clusterSelector and clusterName do not provide any existing cluster
	EmptyClusterList greenhousemetav1alpha1.ConditionReason = "EmptyClusterList"

	// TeamNotFound is the condition reason when the resources refers to a non-existing Team
	TeamNotFound greenhousemetav1alpha1.ConditionReason = "TeamNotFound"

	// ClusterConnectionFailed is the condition reason for the TeamRoleBinding when the connection to the cluster failed
	ClusterConnectionFailed greenhousemetav1alpha1.ConditionReason = "ClusterConnectionFailed"

	// ClusterRoleFailed is the condition reason for the TeamRoleBinding when the ClusterRole could not be created
	ClusterRoleFailed greenhousemetav1alpha1.ConditionReason = "ClusterRoleFailed"

	// RoleBindingFailed is the condition reason for the TeamRoleBinding when the RoleBinding could not be created
	RoleBindingFailed greenhousemetav1alpha1.ConditionReason = "RoleBindingFailed"

	// CreateNamespacesFailed is the condition reason for the TeamRoleBinding when the namespaces could not be created
	CreateNamespacesFailed greenhousemetav1alpha1.ConditionReason = "CreateNamespacesFailed"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: apis.GroupName, Version: "v1alpha2"}

	// 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

This section is empty.

Types

type ClusterSelector

type ClusterSelector struct {
	// Name of a single Cluster to select.
	Name string `json:"clusterName,omitempty"`
	// LabelSelector is a label query over a set of Clusters.
	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`
}

ClusterSelector specifies a selector for clusters by name or by label

func (*ClusterSelector) DeepCopy

func (in *ClusterSelector) DeepCopy() *ClusterSelector

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

func (*ClusterSelector) DeepCopyInto

func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector)

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

type PropagationStatus

type PropagationStatus struct {
	// ClusterName is the name of the cluster the rbacv1 resources are created on.
	ClusterName string `json:"clusterName"`
	// Condition is the overall Status of the rbacv1 resources created on the cluster
	greenhousemetav1alpha1.Condition `json:"condition,omitempty"`
}

PropagationStatus defines the observed state of the TeamRoleBinding's associated rbacv1 resources on a Cluster

func (*PropagationStatus) DeepCopy

func (in *PropagationStatus) DeepCopy() *PropagationStatus

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

func (*PropagationStatus) DeepCopyInto

func (in *PropagationStatus) DeepCopyInto(out *PropagationStatus)

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

type TeamRoleBinding

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

	Spec   TeamRoleBindingSpec   `json:"spec,omitempty"`
	Status TeamRoleBindingStatus `json:"status,omitempty"`
}

TeamRoleBinding is the Schema for the rolebindings API

func (*TeamRoleBinding) DeepCopy

func (in *TeamRoleBinding) DeepCopy() *TeamRoleBinding

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

func (*TeamRoleBinding) DeepCopyInto

func (in *TeamRoleBinding) DeepCopyInto(out *TeamRoleBinding)

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

func (*TeamRoleBinding) DeepCopyObject

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

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

func (*TeamRoleBinding) GetConditions

func (*TeamRoleBinding) GetRBACName

func (trb *TeamRoleBinding) GetRBACName() string

GetRBACName returns the name of the rbacv1.RoleBinding or rbacv1.ClusterRoleBinding that will be created on the remote cluster

func (*TeamRoleBinding) Hub

func (*TeamRoleBinding) Hub()

Hub marks this type as a conversion hub. See: https://book.kubebuilder.io/multiversion-tutorial/conversion

func (*TeamRoleBinding) RemovePropagationStatus

func (trb *TeamRoleBinding) RemovePropagationStatus(cluster string)

RemovePropagationStatus removes a condition for the Cluster from TeamRoleBinding's PropagationStatus

func (*TeamRoleBinding) SetCondition

func (trb *TeamRoleBinding) SetCondition(condition greenhousemetav1alpha1.Condition)

func (*TeamRoleBinding) SetPropagationStatus

func (trb *TeamRoleBinding) SetPropagationStatus(cluster string, rbacReady metav1.ConditionStatus, reason greenhousemetav1alpha1.ConditionReason, message string)

SetPropagationStatus updates the TeamRoleBinding's PropagationStatus for the Cluster

type TeamRoleBindingList

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

TeamRoleBindingList contains a list of RoleBinding

func (*TeamRoleBindingList) DeepCopy

func (in *TeamRoleBindingList) DeepCopy() *TeamRoleBindingList

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

func (*TeamRoleBindingList) DeepCopyInto

func (in *TeamRoleBindingList) DeepCopyInto(out *TeamRoleBindingList)

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

func (*TeamRoleBindingList) DeepCopyObject

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

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

type TeamRoleBindingSpec

type TeamRoleBindingSpec struct {
	// TeamRoleRef references a Greenhouse TeamRole by name
	TeamRoleRef string `json:"teamRoleRef,omitempty"`
	// TeamRef references a Greenhouse Team by name
	TeamRef string `json:"teamRef,omitempty"`
	// Usernames defines list of users to add to the (Cluster-)RoleBindings
	Usernames []string `json:"usernames,omitempty"`
	// ClusterSelector is used to select a Cluster or Clusters the TeamRoleBinding should be deployed to.
	ClusterSelector ClusterSelector `json:"clusterSelector,omitempty"`
	// Namespaces is a list of namespaces in the Greenhouse Clusters to apply the RoleBinding to.
	// If empty, a ClusterRoleBinding will be created on the remote cluster, otherwise a RoleBinding per namespace.
	Namespaces []string `json:"namespaces,omitempty"`
	// CreateNamespaces when enabled the controller will create namespaces for RoleBindings if they do not exist.
	// +kubebuilder:default:=false
	CreateNamespaces bool `json:"createNamespaces,omitempty"`
}

TeamRoleBindingSpec defines the desired state of a TeamRoleBinding

func (*TeamRoleBindingSpec) DeepCopy

func (in *TeamRoleBindingSpec) DeepCopy() *TeamRoleBindingSpec

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

func (*TeamRoleBindingSpec) DeepCopyInto

func (in *TeamRoleBindingSpec) DeepCopyInto(out *TeamRoleBindingSpec)

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

type TeamRoleBindingStatus

type TeamRoleBindingStatus struct {
	// StatusConditions contain the different conditions that constitute the status of the TeamRoleBinding.
	greenhousemetav1alpha1.StatusConditions `json:"statusConditions,omitempty"`
	// PropagationStatus is the list of clusters the TeamRoleBinding is applied to
	// +listType="map"
	// +listMapKey=clusterName
	PropagationStatus []PropagationStatus `json:"clusters,omitempty"`
}

TeamRoleBindingStatus defines the observed state of the TeamRoleBinding

func (*TeamRoleBindingStatus) DeepCopy

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

func (*TeamRoleBindingStatus) DeepCopyInto

func (in *TeamRoleBindingStatus) DeepCopyInto(out *TeamRoleBindingStatus)

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

Jump to

Keyboard shortcuts

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