v1alpha1

package
v0.2.2-beta Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the krkn v1alpha1 API group. +kubebuilder:object:generate=true +groupName=krkn.krkn-chaos.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "krkn.krkn-chaos.dev", 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

This section is empty.

Types

type ClusterJobStatus

type ClusterJobStatus struct {
	// ProviderName is the name of the provider that owns this cluster
	ProviderName string `json:"providerName"`
	// ClusterName is the name of the target cluster
	ClusterName string `json:"clusterName"`
	// ClusterAPIURL is the API URL of the cluster for permission checks
	// +optional
	ClusterAPIURL string `json:"clusterApiUrl,omitempty"`
	// JobID is the unique identifier for this job
	JobID string `json:"jobId"`
	// PodName is the name of the pod running the scenario
	PodName string `json:"podName,omitempty"`
	// Phase is the current phase of the job (Pending, Running, Succeeded, Failed, Retrying, Cancelled, MaxRetriesExceeded)
	// +kubebuilder:validation:Enum=Pending;Running;Succeeded;Failed;Retrying;Cancelled;MaxRetriesExceeded
	Phase string `json:"phase"`
	// StartTime is when the job started
	StartTime *metav1.Time `json:"startTime,omitempty"`
	// CompletionTime is when the job completed
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`
	// Message contains additional information about the job status
	Message string `json:"message,omitempty"`

	// RetryCount is the number of times this job has been retried
	// +optional
	RetryCount int `json:"retryCount,omitempty"`
	// MaxRetries is the maximum number of retries allowed for this job
	// +optional
	MaxRetries int `json:"maxRetries,omitempty"`
	// CancelRequested indicates if the user has requested cancellation
	// +optional
	CancelRequested bool `json:"cancelRequested,omitempty"`
	// LastRetryTime is when the last retry was initiated
	// +optional
	LastRetryTime *metav1.Time `json:"lastRetryTime,omitempty"`
	// FailureReason contains a categorized failure reason (OOMKilled, ContainerError, etc.)
	// +optional
	FailureReason string `json:"failureReason,omitempty"`
}

ClusterJobStatus represents the status of a scenario job for a specific cluster

func (*ClusterJobStatus) DeepCopy

func (in *ClusterJobStatus) DeepCopy() *ClusterJobStatus

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

func (*ClusterJobStatus) DeepCopyInto

func (in *ClusterJobStatus) DeepCopyInto(out *ClusterJobStatus)

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

type ClusterPermissionSet

type ClusterPermissionSet struct {
	// Actions is the list of allowed actions on this cluster
	// Allowed values: "view" (can view cluster and scenario runs),
	//                 "run" (can launch scenarios),
	//                 "cancel" (can cancel running scenarios)
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:items:Enum=view;run;cancel
	Actions []string `json:"actions"`
}

ClusterPermissionSet defines the actions allowed on a cluster.

func (*ClusterPermissionSet) DeepCopy

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

func (*ClusterPermissionSet) DeepCopyInto

func (in *ClusterPermissionSet) DeepCopyInto(out *ClusterPermissionSet)

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

type ClusterTarget

type ClusterTarget struct {
	// ClusterName is the name of the managed cluster
	ClusterName string `json:"cluster-name"`
	// ClusterAPIURL is the API server URL of the managed cluster
	ClusterAPIURL string `json:"cluster-api-url"`
}

ClusterTarget represents the target cluster information

func (*ClusterTarget) DeepCopy

func (in *ClusterTarget) DeepCopy() *ClusterTarget

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

func (*ClusterTarget) DeepCopyInto

func (in *ClusterTarget) DeepCopyInto(out *ClusterTarget)

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

type FileMount

type FileMount struct {
	// Name is the name of the file
	Name string `json:"name"`
	// Content is the base64-encoded content of the file
	Content string `json:"content"`
	// MountPath is the absolute path where the file should be mounted
	MountPath string `json:"mountPath"`
}

FileMount represents a file to be mounted in the scenario pod

func (*FileMount) DeepCopy

func (in *FileMount) DeepCopy() *FileMount

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

func (*FileMount) DeepCopyInto

func (in *FileMount) DeepCopyInto(out *FileMount)

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

type KrknOperatorTarget

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

	Spec   KrknOperatorTargetSpec   `json:"spec,omitempty"`
	Status KrknOperatorTargetStatus `json:"status,omitempty"`
}

KrknOperatorTarget is the Schema for the krknoperatortargets API.

func (*KrknOperatorTarget) DeepCopy

func (in *KrknOperatorTarget) DeepCopy() *KrknOperatorTarget

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

func (*KrknOperatorTarget) DeepCopyInto

func (in *KrknOperatorTarget) DeepCopyInto(out *KrknOperatorTarget)

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

func (*KrknOperatorTarget) DeepCopyObject

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

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

type KrknOperatorTargetList

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

KrknOperatorTargetList contains a list of KrknOperatorTarget.

func (*KrknOperatorTargetList) DeepCopy

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

func (*KrknOperatorTargetList) DeepCopyInto

func (in *KrknOperatorTargetList) DeepCopyInto(out *KrknOperatorTargetList)

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

func (*KrknOperatorTargetList) DeepCopyObject

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

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

type KrknOperatorTargetProvider

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

	Spec   KrknOperatorTargetProviderSpec   `json:"spec,omitempty"`
	Status KrknOperatorTargetProviderStatus `json:"status,omitempty"`
}

KrknOperatorTargetProvider is the Schema for the krknoperatortargetproviders API.

func (*KrknOperatorTargetProvider) DeepCopy

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

func (*KrknOperatorTargetProvider) DeepCopyInto

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

func (*KrknOperatorTargetProvider) DeepCopyObject

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

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

type KrknOperatorTargetProviderConfig

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

	Spec   KrknOperatorTargetProviderConfigSpec   `json:"spec,omitempty"`
	Status KrknOperatorTargetProviderConfigStatus `json:"status,omitempty"`
}

KrknOperatorTargetProviderConfig is the Schema for the krknoperatortargetproviderconfigs API.

func (*KrknOperatorTargetProviderConfig) DeepCopy

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

func (*KrknOperatorTargetProviderConfig) DeepCopyInto

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

func (*KrknOperatorTargetProviderConfig) DeepCopyObject

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

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

func (*KrknOperatorTargetProviderConfig) Default

func (r *KrknOperatorTargetProviderConfig) Default()

Default sets default values for KrknOperatorTargetProviderConfig

type KrknOperatorTargetProviderConfigList

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

KrknOperatorTargetProviderConfigList contains a list of KrknOperatorTargetProviderConfig.

func (*KrknOperatorTargetProviderConfigList) DeepCopy

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

func (*KrknOperatorTargetProviderConfigList) DeepCopyInto

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

func (*KrknOperatorTargetProviderConfigList) DeepCopyObject

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

type KrknOperatorTargetProviderConfigSpec

type KrknOperatorTargetProviderConfigSpec struct {
	// UUID is a unique identifier for this config request.
	// The operator will automatically add a label 'krkn.krkn-chaos.dev/uuid' with this value
	// for easy selection: kubectl get krknoperatortargetproviderconfigs -l krkn.krkn-chaos.dev/uuid=<uuid>
	UUID string `json:"uuid"`
}

KrknOperatorTargetProviderConfigSpec defines the desired state of KrknOperatorTargetProviderConfig.

func (*KrknOperatorTargetProviderConfigSpec) DeepCopy

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

func (*KrknOperatorTargetProviderConfigSpec) DeepCopyInto

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

type KrknOperatorTargetProviderConfigStatus

type KrknOperatorTargetProviderConfigStatus struct {
	// Status represents the current state of the request (pending, completed)
	Status string `json:"status,omitempty"`
	// ConfigData contains a map of operator-name to provider configuration data
	// This allows multiple operators to contribute their configuration schemas to the same request
	ConfigData map[string]ProviderConfigData `json:"configData,omitempty"`
	// Created is the timestamp when the CR was created and set to pending
	Created *metav1.Time `json:"created,omitempty"`
	// Completed is the timestamp when the CR was marked as completed
	Completed *metav1.Time `json:"completed,omitempty"`
}

KrknOperatorTargetProviderConfigStatus defines the observed state of KrknOperatorTargetProviderConfig.

func (*KrknOperatorTargetProviderConfigStatus) DeepCopy

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

func (*KrknOperatorTargetProviderConfigStatus) DeepCopyInto

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

type KrknOperatorTargetProviderList

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

KrknOperatorTargetProviderList contains a list of KrknOperatorTargetProvider.

func (*KrknOperatorTargetProviderList) DeepCopy

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

func (*KrknOperatorTargetProviderList) DeepCopyInto

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

func (*KrknOperatorTargetProviderList) DeepCopyObject

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

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

type KrknOperatorTargetProviderSpec

type KrknOperatorTargetProviderSpec struct {
	// OperatorName is the unique identifier for this operator instance
	OperatorName string `json:"operator-name"`
	// Active indicates whether this provider is actively contributing to target requests
	// +kubebuilder:default=true
	Active bool `json:"active"`
}

KrknOperatorTargetProviderSpec defines the desired state of KrknOperatorTargetProvider.

func (*KrknOperatorTargetProviderSpec) DeepCopy

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

func (*KrknOperatorTargetProviderSpec) DeepCopyInto

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

type KrknOperatorTargetProviderStatus

type KrknOperatorTargetProviderStatus struct {
	// Timestamp represents the last heartbeat/update time from the operator
	Timestamp metav1.Time `json:"timestamp,omitempty"`
}

KrknOperatorTargetProviderStatus defines the observed state of KrknOperatorTargetProvider.

func (*KrknOperatorTargetProviderStatus) DeepCopy

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

func (*KrknOperatorTargetProviderStatus) DeepCopyInto

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

type KrknOperatorTargetSpec

type KrknOperatorTargetSpec struct {
	// UUID is the unique identifier for this target
	UUID string `json:"uuid"`

	// ClusterName is the name of the target cluster
	ClusterName string `json:"clusterName"`

	// ClusterAPIURL is the Kubernetes API server URL
	// +optional
	ClusterAPIURL string `json:"clusterAPIURL,omitempty"`

	// SecretType specifies the authentication method
	// +kubebuilder:validation:Enum=kubeconfig;token;credentials
	SecretType string `json:"secretType"`

	// SecretUUID is the UUID of the Secret containing the kubeconfig
	SecretUUID string `json:"secretUUID"`

	// CABundle is the base64-encoded CA certificate bundle for TLS verification
	// Optional - if not provided and SecretType is not kubeconfig, TLS verification will be skipped
	// +optional
	CABundle string `json:"caBundle,omitempty"`

	// InsecureSkipTLSVerify skips TLS certificate verification
	// Only used when CABundle is not provided
	// +kubebuilder:default=false
	// +optional
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
}

KrknOperatorTargetSpec defines the desired state of KrknOperatorTarget.

func (*KrknOperatorTargetSpec) DeepCopy

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

func (*KrknOperatorTargetSpec) DeepCopyInto

func (in *KrknOperatorTargetSpec) DeepCopyInto(out *KrknOperatorTargetSpec)

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

type KrknOperatorTargetStatus

type KrknOperatorTargetStatus struct {
	// Ready indicates whether the target is ready to be used
	// +kubebuilder:default=true
	Ready bool `json:"ready,omitempty"`

	// LastUpdated is the timestamp of the last update
	// +optional
	LastUpdated metav1.Time `json:"lastUpdated,omitempty"`
}

KrknOperatorTargetStatus defines the observed state of KrknOperatorTarget.

func (*KrknOperatorTargetStatus) DeepCopy

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

func (*KrknOperatorTargetStatus) DeepCopyInto

func (in *KrknOperatorTargetStatus) DeepCopyInto(out *KrknOperatorTargetStatus)

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

type KrknScenarioRun

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

	Spec   KrknScenarioRunSpec   `json:"spec,omitempty"`
	Status KrknScenarioRunStatus `json:"status,omitempty"`
}

KrknScenarioRun is the Schema for the krknscenrarioruns API

func (*KrknScenarioRun) DeepCopy

func (in *KrknScenarioRun) DeepCopy() *KrknScenarioRun

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

func (*KrknScenarioRun) DeepCopyInto

func (in *KrknScenarioRun) DeepCopyInto(out *KrknScenarioRun)

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

func (*KrknScenarioRun) DeepCopyObject

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

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

type KrknScenarioRunList

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

KrknScenarioRunList contains a list of KrknScenarioRun

func (*KrknScenarioRunList) DeepCopy

func (in *KrknScenarioRunList) DeepCopy() *KrknScenarioRunList

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

func (*KrknScenarioRunList) DeepCopyInto

func (in *KrknScenarioRunList) DeepCopyInto(out *KrknScenarioRunList)

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

func (*KrknScenarioRunList) DeepCopyObject

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

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

type KrknScenarioRunSpec

type KrknScenarioRunSpec struct {
	// TargetRequestID is the reference to the KrknTargetRequest CR
	TargetRequestID string `json:"targetRequestId"`

	// OwnerUserID is the email address of the user who created this scenario run
	// +optional
	OwnerUserID string `json:"ownerUserId,omitempty"`

	// TargetClusters is a map of provider-name to list of cluster names
	// Example: {"krkn-operator": ["cluster1", "cluster2"], "krkn-operator-acm": ["cluster3"]}
	// +kubebuilder:validation:MinProperties=1
	TargetClusters map[string][]string `json:"targetClusters"`

	// ScenarioName is the name of the scenario to run
	ScenarioName string `json:"scenarioName"`

	// ScenarioImage is the container image for the scenario
	ScenarioImage string `json:"scenarioImage"`

	// KubeconfigPath is the path where kubeconfig will be mounted in the pod
	// +optional
	// +kubebuilder:default="/home/krkn/.kube/config"
	KubeconfigPath string `json:"kubeconfigPath,omitempty"`

	// Files is a list of files to mount in the scenario pod
	// +optional
	Files []FileMount `json:"files,omitempty"`

	// Environment is a map of environment variables to set in the scenario pod
	// +optional
	Environment map[string]string `json:"environment,omitempty"`

	// RegistryURL is the URL of the container registry
	// +optional
	RegistryURL string `json:"registryURL,omitempty"`

	// ScenarioRepository is the repository path in the registry
	// +optional
	ScenarioRepository string `json:"scenarioRepository,omitempty"`

	// Token is the authentication token for the registry
	// +optional
	Token string `json:"token,omitempty"`

	// Username is the username for registry authentication
	// +optional
	Username string `json:"username,omitempty"`

	// Password is the password for registry authentication
	// +optional
	Password string `json:"password,omitempty"`

	// MaxRetries is the maximum number of times to retry failed jobs
	// +optional
	// +kubebuilder:default=3
	MaxRetries int `json:"maxRetries,omitempty"`

	// RetryBackoff determines the backoff strategy for retries (exponential or fixed)
	// +optional
	// +kubebuilder:validation:Enum=exponential;fixed
	// +kubebuilder:default="exponential"
	RetryBackoff string `json:"retryBackoff,omitempty"`

	// RetryDelay is the initial delay before retrying (e.g., "10s")
	// +optional
	// +kubebuilder:default="10s"
	RetryDelay string `json:"retryDelay,omitempty"`
}

KrknScenarioRunSpec defines the desired state of KrknScenarioRun

func (*KrknScenarioRunSpec) DeepCopy

func (in *KrknScenarioRunSpec) DeepCopy() *KrknScenarioRunSpec

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

func (*KrknScenarioRunSpec) DeepCopyInto

func (in *KrknScenarioRunSpec) DeepCopyInto(out *KrknScenarioRunSpec)

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

type KrknScenarioRunStatus

type KrknScenarioRunStatus struct {
	// Phase is the overall phase of the scenario run
	// +kubebuilder:validation:Enum=Pending;Running;Succeeded;PartiallyFailed;Failed
	Phase string `json:"phase,omitempty"`

	// TotalTargets is the total number of target clusters
	TotalTargets int `json:"totalTargets,omitempty"`

	// SuccessfulJobs is the number of successfully completed jobs
	SuccessfulJobs int `json:"successfulJobs,omitempty"`

	// FailedJobs is the number of failed jobs
	FailedJobs int `json:"failedJobs,omitempty"`

	// RunningJobs is the number of currently running jobs
	RunningJobs int `json:"runningJobs,omitempty"`

	// ClusterJobs contains the status of each cluster job
	// +optional
	ClusterJobs []ClusterJobStatus `json:"clusterJobs,omitempty"`

	// Conditions represent the latest available observations of the scenario run's state
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

KrknScenarioRunStatus defines the observed state of KrknScenarioRun

func (*KrknScenarioRunStatus) DeepCopy

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

func (*KrknScenarioRunStatus) DeepCopyInto

func (in *KrknScenarioRunStatus) DeepCopyInto(out *KrknScenarioRunStatus)

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

type KrknTargetRequest

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

	Spec   KrknTargetRequestSpec   `json:"spec,omitempty"`
	Status KrknTargetRequestStatus `json:"status,omitempty"`
}

KrknTargetRequest is the Schema for the krkntargetrequests API.

func (*KrknTargetRequest) DeepCopy

func (in *KrknTargetRequest) DeepCopy() *KrknTargetRequest

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

func (*KrknTargetRequest) DeepCopyInto

func (in *KrknTargetRequest) DeepCopyInto(out *KrknTargetRequest)

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

func (*KrknTargetRequest) DeepCopyObject

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

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

func (*KrknTargetRequest) Default

func (r *KrknTargetRequest) Default()

Default sets default values for KrknTargetRequest

type KrknTargetRequestList

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

KrknTargetRequestList contains a list of KrknTargetRequest.

func (*KrknTargetRequestList) DeepCopy

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

func (*KrknTargetRequestList) DeepCopyInto

func (in *KrknTargetRequestList) DeepCopyInto(out *KrknTargetRequestList)

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

func (*KrknTargetRequestList) DeepCopyObject

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

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

type KrknTargetRequestSpec

type KrknTargetRequestSpec struct {
	// UUID is a unique identifier for this request.
	// The operator will automatically add a label 'krkn.krkn-chaos.dev/uuid' with this value
	// for easy selection: kubectl get krkntargetrequests -l krkn.krkn-chaos.dev/uuid=<uuid>
	UUID string `json:"uuid"`
}

KrknTargetRequestSpec defines the desired state of KrknTargetRequest.

func (*KrknTargetRequestSpec) DeepCopy

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

func (*KrknTargetRequestSpec) DeepCopyInto

func (in *KrknTargetRequestSpec) DeepCopyInto(out *KrknTargetRequestSpec)

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

type KrknTargetRequestStatus

type KrknTargetRequestStatus struct {
	// Status represents the current state of the request (pending, completed)
	Status string `json:"status,omitempty"`
	// TargetData contains a map of operator-name to list of cluster targets
	// This allows multiple operators to contribute their targets to the same request
	TargetData map[string][]ClusterTarget `json:"targetData,omitempty"`

	// Completed is the timestamp when the CR was marked as completed
	Completed *metav1.Time `json:"completed,omitempty"`
}

KrknTargetRequestStatus defines the observed state of KrknTargetRequest.

func (*KrknTargetRequestStatus) DeepCopy

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

func (*KrknTargetRequestStatus) DeepCopyInto

func (in *KrknTargetRequestStatus) DeepCopyInto(out *KrknTargetRequestStatus)

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

type KrknUser

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

	Spec   KrknUserSpec   `json:"spec,omitempty"`
	Status KrknUserStatus `json:"status,omitempty"`
}

KrknUser is the Schema for the krknusers API. It represents an authentication entity for the krkn-operator REST APIs.

The KrknUser CRD must be labeled with:

  • krkn.krkn-chaos.dev/user-account: "true"
  • krkn.krkn-chaos.dev/role: <user|admin>

func (*KrknUser) DeepCopy

func (in *KrknUser) DeepCopy() *KrknUser

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

func (*KrknUser) DeepCopyInto

func (in *KrknUser) DeepCopyInto(out *KrknUser)

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

func (*KrknUser) DeepCopyObject

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

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

type KrknUserGroup

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

	Spec KrknUserGroupSpec `json:"spec,omitempty"`
}

KrknUserGroup is the Schema for the krknusergroups API. It defines cluster-level access control for groups of users.

Users are associated with groups via labels on their KrknUser CR:

  • group.krkn.krkn-chaos.dev/<group-name>: "true"

Permissions are aggregated across all groups a user belongs to (union). Admin users bypass all group-based access controls.

func (*KrknUserGroup) DeepCopy

func (in *KrknUserGroup) DeepCopy() *KrknUserGroup

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

func (*KrknUserGroup) DeepCopyInto

func (in *KrknUserGroup) DeepCopyInto(out *KrknUserGroup)

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

func (*KrknUserGroup) DeepCopyObject

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

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

type KrknUserGroupList

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

KrknUserGroupList contains a list of KrknUserGroup.

func (*KrknUserGroupList) DeepCopy

func (in *KrknUserGroupList) DeepCopy() *KrknUserGroupList

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

func (*KrknUserGroupList) DeepCopyInto

func (in *KrknUserGroupList) DeepCopyInto(out *KrknUserGroupList)

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

func (*KrknUserGroupList) DeepCopyObject

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

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

type KrknUserGroupSpec

type KrknUserGroupSpec struct {
	// Name is the group name (duplicates metadata.name for API convenience)
	Name string `json:"name"`

	// Description is a human-readable description of the group's purpose
	// +optional
	Description string `json:"description,omitempty"`

	// ClusterPermissions defines access permissions per cluster
	// Key: cluster API URL (must match ClusterTarget.ClusterAPIURL from KrknTargetRequest)
	// Value: set of allowed actions (view, run, cancel)
	// +kubebuilder:validation:MinProperties=1
	ClusterPermissions map[string]ClusterPermissionSet `json:"clusterPermissions"`
}

KrknUserGroupSpec defines the desired state of KrknUserGroup. KrknUserGroup defines cluster access permissions for a group of users. User membership is managed via labels on KrknUser CRs: group.krkn.krkn-chaos.dev/<group-name>=true

func (*KrknUserGroupSpec) DeepCopy

func (in *KrknUserGroupSpec) DeepCopy() *KrknUserGroupSpec

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

func (*KrknUserGroupSpec) DeepCopyInto

func (in *KrknUserGroupSpec) DeepCopyInto(out *KrknUserGroupSpec)

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

type KrknUserList

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

KrknUserList contains a list of KrknUser.

func (*KrknUserList) DeepCopy

func (in *KrknUserList) DeepCopy() *KrknUserList

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

func (*KrknUserList) DeepCopyInto

func (in *KrknUserList) DeepCopyInto(out *KrknUserList)

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

func (*KrknUserList) DeepCopyObject

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

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

type KrknUserSpec

type KrknUserSpec struct {
	// UserID is the email address of the user, used as the unique identifier
	// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`
	UserID string `json:"userId"`

	// Name is the first name of the user
	Name string `json:"name"`

	// Surname is the last name of the user
	Surname string `json:"surname"`

	// Organization is the user's organization name
	// +optional
	Organization string `json:"organization,omitempty"`

	// Role defines the user's permission level
	// +kubebuilder:validation:Enum=user;admin
	// +kubebuilder:default=user
	Role string `json:"role"`

	// PasswordSecretRef references the Secret containing the hashed password
	// The Secret must contain a 'passwordHash' key with the bcrypt hash
	PasswordSecretRef string `json:"passwordSecretRef"`
}

KrknUserSpec defines the desired state of KrknUser. KrknUser serves as an authentication entity for the REST APIs. Each KrknUser instance has an associated Secret containing the hashed password.

func (*KrknUserSpec) DeepCopy

func (in *KrknUserSpec) DeepCopy() *KrknUserSpec

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

func (*KrknUserSpec) DeepCopyInto

func (in *KrknUserSpec) DeepCopyInto(out *KrknUserSpec)

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

type KrknUserStatus

type KrknUserStatus struct {
	// Active indicates whether the user account is active
	// +kubebuilder:default=true
	Active bool `json:"active,omitempty"`

	// Created is the timestamp when the user was created
	// +optional
	Created metav1.Time `json:"created,omitempty"`

	// LastLogin is the timestamp of the user's last successful login
	// +optional
	LastLogin metav1.Time `json:"lastLogin,omitempty"`
}

KrknUserStatus defines the observed state of KrknUser.

func (*KrknUserStatus) DeepCopy

func (in *KrknUserStatus) DeepCopy() *KrknUserStatus

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

func (*KrknUserStatus) DeepCopyInto

func (in *KrknUserStatus) DeepCopyInto(out *KrknUserStatus)

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

type ProviderConfigData

type ProviderConfigData struct {
	// ConfigMap is the name of the ConfigMap containing the provider's configuration
	ConfigMap string `json:"config-map"`
	// Namespace is the namespace where the ConfigMap is located
	Namespace string `json:"namespace"`
	// ConfigSchema is the JSON schema for the provider's configuration (as a JSON string)
	ConfigSchema string `json:"config-schema,omitempty"`
}

ProviderConfigData contains configuration information from a provider

func (*ProviderConfigData) DeepCopy

func (in *ProviderConfigData) DeepCopy() *ProviderConfigData

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

func (*ProviderConfigData) DeepCopyInto

func (in *ProviderConfigData) DeepCopyInto(out *ProviderConfigData)

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