v1alpha1

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the security-profiles-operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=security-profiles-operator.x-k8s.io

Index

Constants

View Source
const (
	// Identifies the profile by name so that the admin can list all node statuses for a certain profile.
	StatusToProfLabel = "spo.x-k8s.io/profile-name"
	// Identifies the node on which the profile is installed so that the admin can list profiles per node.
	StatusToNodeLabel = "spo.x-k8s.io/node-name"
	// Allows the admin to filter out node statuses with a certain state (e.g. show me all that failed).
	StatusStateLabel = "spo.x-k8s.io/profile-state"
	// The kind of profile so that the admin can filter only e.g. all selinux profile statuses.
	StatusKindLabel = "spo.x-k8s.io/profile-kind"
)

Common labels of the node status objects.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "security-profiles-operator.x-k8s.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

This section is empty.

Types

type ProfileState

type ProfileState string

ProfileState defines the state that the profile is in. A profile in this context refers to a SeccompProfile or a SELinux profile, the states are shared between them as well as the management API.

const (
	// The profile is pending installation.
	ProfileStatePending ProfileState = "Pending"
	// The profile is being installed.
	ProfileStateInProgress ProfileState = "InProgress"
	// The profile was installed successfully.
	ProfileStateInstalled ProfileState = "Installed"
	// The profile is being removed and is currently terminating.
	ProfileStateTerminating ProfileState = "Terminating"
	// The profile couldn't be installed.
	ProfileStateError ProfileState = "Error"
)
const LowestState ProfileState = ProfileStateInstalled

LowestState defines the "lowest" state for the profiles to be at. All of the statuses would need to reach this for us to get here.

func LowerOfTwoStates

func LowerOfTwoStates(currentLowest, candidate ProfileState) ProfileState

LowerOfTwoStates is used to figure out the "lowest common state" and is used to represent the overall status of a profile. The idea is that if, e.g. one in three profiles is already installed, but the two others are pending, the overall state should be pending.

type SecurityProfileNodeStatus

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

	NodeName string       `json:"nodeName"`
	Status   ProfileState `json:"status,omitempty"`
}

SecurityProfileNodeStatus is a per-node status of a security profile +kubebuilder:resource:shortName=spns +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:printcolumn:name="Node",type=string,priority=10,JSONPath=`.nodeName`

func (*SecurityProfileNodeStatus) DeepCopy

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

func (*SecurityProfileNodeStatus) DeepCopyInto

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

func (*SecurityProfileNodeStatus) DeepCopyObject

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

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

type SecurityProfileNodeStatusList

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

SecurityProfileNodeStatusList contains a list of SecurityProfileNodeStatus.

func (*SecurityProfileNodeStatusList) DeepCopy

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

func (*SecurityProfileNodeStatusList) DeepCopyInto

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

func (*SecurityProfileNodeStatusList) DeepCopyObject

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

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

Jump to

Keyboard shortcuts

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