v1beta1

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the kubedirector v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=kubedirector.hpe.com

Package v1beta1 contains API Schema definitions for the kubedirector v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=kubedirector.hpe.com

Index

Constants

View Source
const (
	// UID represents the old naming scheme where object names were generated
	// with unique UID extensions.
	UID string = "UID"

	// CrNameRole represents the new naming scheme based on cluster name and
	// respective role name.
	CrNameRole string = "CrNameRole"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "kubedirector.hpe.com", Version: "v1beta1"}

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

Functions

This section is empty.

Types

type BlockStorage added in v0.5.3

type BlockStorage struct {
	StorageClass *string `json:"storageClassName,omitempty"`
	Path         *string `json:"pathPrefix,omitempty"`
	Size         *string `json:"size,omitempty"`
	NumDevices   *int32  `json:"numDevices,omitempty"`
}

BlockStorage defines the block storage type, path, and optionally size, if any, to be used for mounting a block volume in a role.

type ClusterStorage

type ClusterStorage struct {
	Size         string  `json:"size"`
	StorageClass *string `json:"storageClassName,omitempty"`
}

ClusterStorage defines the persistent storage size/type, if any, to be used for certain specified directories of each container filesystem in a role.

type Connections

type Connections struct {
	Clusters   []string `json:"clusters,omitempty"`
	ConfigMaps []string `json:"configmaps,omitempty"`
	Secrets    []string `json:"secrets,omitempty"`
}

Connections specifies list of cluster objects and configmaps objects that has be connected to the cluster.

type ContainerSpec added in v0.6.0

type ContainerSpec struct {
	Stdin bool `json:"stdin,omitempty"`
	Tty   bool `json:"tty,omitempty"`
}

ContainerSpec comments

type EnvVar

type EnvVar struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

EnvVar specifies environment variables for the start script in a container

type FileInjections

type FileInjections struct {
	SrcURL      string           `json:"srcURL"`
	DestDir     string           `json:"destDir"`
	Permissions *FilePermissions `json:"permissions,omitempty"`
}

FileInjections specifies file injection spec, including file permissions on the destination file

type FilePermissions

type FilePermissions struct {
	FileMode  *int32  `json:"fileMode,omitempty"`
	FileOwner *string `json:"fileOwner,omitempty"`
	FileGroup *string `json:"fileGroup,omitempty"`
}

FilePermissions specifies file mode along with user/group information for the file

type KDSecret

type KDSecret struct {
	Name        string `json:"name"`
	DefaultMode *int32 `json:"defaultMode,omitempty"`
	MountPath   string `json:"mountPath"`
	ReadOnly    bool   `json:"readOnly,omitempty"`
}

KDSecret describes a secret object intended to be mounted inside a container.

type KubeDirectorApp

type KubeDirectorApp struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              KubeDirectorAppSpec `json:"spec,omitempty"`
}

KubeDirectorApp is the Schema for the kubedirectorapps API. +kubebuilder:resource:path=kubedirectorapps,scope=Namespaced

type KubeDirectorAppList

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

KubeDirectorAppList contains a list of KubeDirectorApp.

type KubeDirectorAppSpec

type KubeDirectorAppSpec struct {
	Label                 Label               `json:"label"`
	DistroID              string              `json:"distroID"`
	Version               string              `json:"version"`
	SchemaVersion         int                 `json:"configSchemaVersion"`
	DefaultImageRepoTag   *string             `json:"defaultImageRepoTag,omitempty"`
	DefaultSetupPackage   SetupPackage        `json:"defaultConfigPackage,omitempty"`
	Services              []Service           `json:"services,omitempty"`
	NodeRoles             []NodeRole          `json:"roles"`
	Config                NodeGroupConfig     `json:"config"`
	DefaultPersistDirs    *[]string           `json:"defaultPersistDirs,omitempty"`
	DefaultEventList      *[]string           `json:"defaultEventList,omitempty"`
	Capabilities          []corev1.Capability `json:"capabilities,omitempty"`
	SystemdRequired       bool                `json:"systemdRequired,omitempty"`
	LogoURL               string              `json:"logoURL,omitempty"`
	DefaultMaxLogSizeDump *int32              `json:"defaultMaxLogSizeDump,omitempty"`
}

KubeDirectorAppSpec defines the desired state of KubeDirectorApp.

type KubeDirectorCluster

type KubeDirectorCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              KubeDirectorClusterSpec    `json:"spec,omitempty"`
	Status            *KubeDirectorClusterStatus `json:"status,omitempty"`
	AppSpec           *KubeDirectorApp           `json:"-"`
}

KubeDirectorCluster is the Schema for the kubedirectorclusters API. This object represents a single virtual cluster. This cluster will be implemented by KubeDirector using native k8s objects. Note that the AppSpec field is only used internally in KubeDirector; that field is not persisted to k8s. +kubebuilder:subresource:status +kubebuilder:resource:path=kubedirectorclusters,scope=Namespaced

type KubeDirectorClusterList

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

KubeDirectorClusterList contains a list of KubeDirectorCluster.

type KubeDirectorClusterSpec

type KubeDirectorClusterSpec struct {
	AppID         string      `json:"app"`
	AppCatalog    *string     `json:"appCatalog,omitempty"`
	ServiceType   *string     `json:"serviceType,omitempty"`
	Roles         []Role      `json:"roles"`
	DefaultSecret *KDSecret   `json:"defaultSecret,omitempty"`
	Connections   Connections `json:"connections"`
	NamingScheme  *string     `json:"namingScheme,omitempty"`
}

KubeDirectorClusterSpec defines the desired state of KubeDirectorCluster. AppID references a KubeDirectorApp CR. ServiceType indicates whether to use NodePort or LoadBalancer services. The Roles field describes the requested cluster roles, each of which will be implemented (by KubeDirector) using a StatefulSet.

type KubeDirectorClusterStatus

type KubeDirectorClusterStatus struct {
	State                   string           `json:"state"`
	RestoreProgress         *RestoreProgress `json:"restoreProgress,omitempty"`
	MemberStateRollup       StateRollup      `json:"memberStateRollup"`
	GenerationUID           string           `json:"generationUID"`
	SpecGenerationToProcess *int64           `json:"specGenerationToProcess,omitempty"`
	ClusterService          string           `json:"clusterService"`
	LastNodeID              int64            `json:"lastNodeID"`
	Roles                   []RoleStatus     `json:"roles"`
	LastConnectionHash      string           `json:"lastConnectionHash"`
}

KubeDirectorClusterStatus defines the observed state of KubeDirectorCluster. It identifies which native k8s objects make up the cluster, and broadly indicates ongoing operations of cluster creation or reconfiguration.

type KubeDirectorConfig

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

	Spec   *KubeDirectorConfigSpec   `json:"spec,omitempty"`
	Status *KubeDirectorConfigStatus `json:"status,omitempty"`
}

KubeDirectorConfig is the Schema for the kubedirectorconfigs API. +kubebuilder:subresource:status +kubebuilder:resource:path=kubedirectorconfigs,scope=Namespaced

type KubeDirectorConfigList

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

KubeDirectorConfigList contains a list of KubeDirectorConfig.

type KubeDirectorConfigSpec

type KubeDirectorConfigSpec struct {
	StorageClass                   *string           `json:"defaultStorageClassName,omitempty"`
	ServiceType                    *string           `json:"defaultServiceType,omitempty"`
	NativeSystemdSupport           *bool             `json:"nativeSystemdSupport,omitempty"`
	RequiredSecretPrefix           *string           `json:"requiredSecretPrefix,omitempty"`
	ClusterSvcDomainBase           *string           `json:"clusterSvcDomainBase,omitempty"`
	DefaultNamingScheme            *string           `json:"defaultNamingScheme,omitempty"`
	MasterEncryptionKey            *string           `json:"masterEncryptionKey,omitempty"`
	PodLabels                      map[string]string `json:"podLabels,omitempty"`
	PodAnnotations                 map[string]string `json:"podAnnotations,omitempty"`
	ServiceLabels                  map[string]string `json:"serviceLabels,omitempty"`
	ServiceAnnotations             map[string]string `json:"serviceAnnotations,omitempty"`
	BackupClusterStatus            *bool             `json:"backupClusterStatus,omitempty"`
	AllowRestoreWithoutConnections *bool             `json:"allowRestoreWithoutConnections,omitempty"`
}

KubeDirectorConfigSpec defines the desired state of KubeDirectorConfig.

type KubeDirectorConfigStatus

type KubeDirectorConfigStatus struct {
	GenerationUID string `json:"generationUID"`
	State         string `json:"state"`
}

KubeDirectorConfigStatus defines the observed state of KubeDirectorConfig.

type KubeDirectorStatusBackup added in v0.7.0

type KubeDirectorStatusBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              KubeDirectorStatusBackupSpec `json:"spec,omitempty"`
}

KubeDirectorStatusBackup is the Schema for the kubedirectorstatusbackups API. This object represents a single virtual cluster's backed-up status. +kubebuilder:resource:path=kubedirectorstatusbackups,scope=Namespaced

type KubeDirectorStatusBackupList added in v0.7.0

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

KubeDirectorStatusBackupList contains a list of KubeDirectorStatusBackup.

type KubeDirectorStatusBackupSpec added in v0.7.0

type KubeDirectorStatusBackupSpec struct {
	StatusBackup *KubeDirectorClusterStatus `json:"statusBackup,omitempty"`
}

KubeDirectorStatusBackupSpec defines the desired state of KubeDirectorStatusBackup. This contains a single property that mirrors the status stanza of the associated KubeDirectorCluster.

type Label

type Label struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

Label is a short name and long description for the app definition.

type MemberStateDetail

type MemberStateDetail struct {
	ConfigErrorDetail        *string             `json:"configErrorDetail,omitempty"`
	LastConfigDataGeneration *int64              `json:"lastConfigDataGeneration,omitempty"`
	LastSetupGeneration      *int64              `json:"lastSetupGeneration,omitempty"`
	ConfiguringContainer     string              `json:"configuringContainer,omitempty"`
	LastConfiguredContainer  string              `json:"lastConfiguredContainer,omitempty"`
	LastKnownContainerState  string              `json:"lastKnownContainerState,omitempty"`
	PendingNotifyCmds        []*NotificationDesc `json:"pendingNotifyCmds,omitempty"`
	LastConnectionVersion    *int64              `json:"lastConnectionVersion,omitempty"`
	StartScriptOutMsg        string              `json:"startScriptStdoutMessage,omitempty"`
	StartScriptErrMsg        string              `json:"startScriptStderrMessage,omitempty"`
	SchedulingErrorMessage   *string             `json:"schedulingErrorMessage,omitempty"`
	StorageInitProgress      *string             `json:"storageInitProgress,omitempty"`
}

MemberStateDetail digs into detail about the management of configmeta and app scripts in the member.

type MemberStatus

type MemberStatus struct {
	Pod              string            `json:"pod"`
	Service          string            `json:"service"`
	AuthToken        string            `json:"authToken,omitempty"`
	PVC              string            `json:"pvc,omitempty"`
	State            string            `json:"state"`
	StateDetail      MemberStateDetail `json:"stateDetail,omitempty"`
	NodeID           int64             `json:"nodeID"`
	BlockDevicePaths []string          `json:"blockDevicePaths,omitempty"`
}

MemberStatus describes the component objects of a virtual cluster member.

type MinStorage added in v0.8.0

type MinStorage struct {
	Size                   string `json:"size"`
	EphemeralModeSupported bool   `json:"ephemeralModeSupported"`
}

MinStorage describes the minimum persistent storage requirement, if any.

type NodeGroupConfig

type NodeGroupConfig struct {
	RoleServices   []RoleService     `json:"roleServices"`
	SelectedRoles  []string          `json:"selectedRoles"`
	ConfigMetadata map[string]string `json:"configMeta,omitempty"`
}

NodeGroupConfig identifies a set of roles, and the services on those roles. The top-level config indicates which roles and services will always be active. Implementation of "config choices" will introduce other conditional configs.

type NodeRole

type NodeRole struct {
	ID             string               `json:"id"`
	Cardinality    string               `json:"cardinality"`
	ImageRepoTag   *string              `json:"imageRepoTag,omitempty"`
	SetupPackage   SetupPackage         `json:"configPackage,omitempty"`
	PersistDirs    *[]string            `json:"persistDirs,omitempty"`
	EventList      *[]string            `json:"eventList,omitempty"`
	MinResources   *corev1.ResourceList `json:"minResources,omitempty"`
	MinStorage     *MinStorage          `json:"minStorage,omitempty"`
	ContainerSpec  *ContainerSpec       `json:"containerSpec,omitempty"`
	MaxLogSizeDump *int32               `json:"maxLogSizeDump,omitempty"`
}

NodeRole describes a subset of virtual cluster members that will provide the same services. At deployment time all role members will receive identical resource assignments.

type NotificationDesc

type NotificationDesc struct {
	Arguments []string `json:"arguments,omitempty"`
}

NotificationDesc contains the info necessary to perform a notify command.

type RestoreProgress added in v0.7.0

type RestoreProgress struct {
	AwaitingApp       bool   `json:"awaitingApp"`
	AwaitingStatus    bool   `json:"awaitingStatus"`
	AwaitingResources bool   `json:"awaitingResources"`
	Error             string `json:"error"`
}

RestoreProgress identifies any necessary kdcluster components that have not yet been re-created by a backup restore.

type Role

type Role struct {
	Name               string                      `json:"id"`
	PodLabels          map[string]string           `json:"podLabels,omitempty"`
	PodAnnotations     map[string]string           `json:"podAnnotations,omitempty"`
	ServiceLabels      map[string]string           `json:"serviceLabels,omitempty"`
	ServiceAnnotations map[string]string           `json:"serviceAnnotations,omitempty"`
	Members            *int32                      `json:"members,omitempty"`
	Resources          corev1.ResourceRequirements `json:"resources"`
	Affinity           *corev1.Affinity            `json:"affinity,omitempty"`
	Storage            *ClusterStorage             `json:"storage,omitempty"`
	EnvVars            []corev1.EnvVar             `json:"env,omitempty"`
	FileInjections     []FileInjections            `json:"fileInjections,omitempty"`
	Secret             *KDSecret                   `json:"secret,omitempty"`
	BlockStorage       *BlockStorage               `json:"blockStorage,omitempty"`
	ServiceAccountName string                      `json:"serviceAccountName,omitempty"`
	SecretKeys         []SecretKey                 `json:"secretKeys,omitempty"`
	VolumeProjections  []VolumeProjections         `json:"volumeProjections,omitempty"`
}

Role describes a subset of the virtual cluster members that shares a common image, resource requirements, persistent storage definition, and (as defined by the cluster's KubeDirectorApp) set of service endpoints.

type RoleService

type RoleService struct {
	ServiceIDs []string `json:"serviceIDs"`
	RoleID     string   `json:"roleID"`
}

RoleService associates a service with a role.

type RoleStatus

type RoleStatus struct {
	Name                string            `json:"id"`
	StatefulSet         string            `json:"statefulSet"`
	Members             []MemberStatus    `json:"members"`
	EncryptedSecretKeys map[string]string `json:"encryptedSecretKeys,omitempty"`
}

RoleStatus describes the component objects of a virtual cluster role.

type SecretKey added in v0.7.0

type SecretKey struct {
	// Name is required and cannot be empty
	Name string `json:"name"`
	// Non-empty Value overrides EncryptedValue after encryption.
	// Empty Value is allowed but requires EncryptedValue to be empty when submitting.
	Value string `json:"value,omitempty"`
	// EncryptedValue is supposed to be generated by KD webhook
	// by encrypting Value with AES using master encryption key from KubeDirectorConfig
	EncryptedValue string `json:"encryptedValue,omitempty"`
}

SecretKey holds data which is supposed to be only available on configuration phase

type Service

type Service struct {
	ID              string          `json:"id"`
	Label           Label           `json:"label,omitempty"`
	Endpoint        ServiceEndpoint `json:"endpoint,omitempty"`
	ExportedService string          `json:"exported_service,omitempty"`
}

Service describes a network endpoint that should be exposed for external access, and/or identified for other use by API clients or consumers internal to the virtual cluster (e.g. app setup packages).

type ServiceEndpoint

type ServiceEndpoint struct {
	URLScheme    string `json:"urlScheme,omitempty"`
	Port         *int32 `json:"port"`
	Path         string `json:"path,omitempty"`
	IsDashboard  bool   `json:"isDashboard,omitempty"`
	HasAuthToken bool   `json:"hasAuthToken,omitempty"`
}

ServiceEndpoint describes the service network address and protocol, and whether it should be displayed through a web browser.

type SetupPackage

type SetupPackage struct {
	IsSet  bool
	IsNull bool
	Info   SetupPackageInfo
}

SetupPackage describes the app setup package to be used. A top-level package can be specified, and/or a role-specific package that will override any top-level package. Note that there is custom deserialization code for this type in decode.go to allow us to distinguish the cases of "unset" from "explicitly set null". Therefore "operator-sdk generate crds" cannot be used to generate a correct CRD in this case.

func (*SetupPackage) UnmarshalJSON

func (setupPackage *SetupPackage) UnmarshalJSON(
	data []byte,
) error

UnmarshalJSON for SetupPackage handles the unmarshalling of three scenarios wrt 'defaultConfigPackage':

  1. omitted : IsSet==false
  2. explicitly set to null : IsSet==true && IsNull==true
  3. Set to a valid object : IsSet==true && IsNull==false

type SetupPackageInfo added in v0.8.0

type SetupPackageInfo struct {
	PackageURL        string `json:"packageURL"`
	UseNewSetupLayout bool   `json:"useNewSetupLayout"`
}

SetupPackageInfo is the URL of the setup package, plus a flag on whether the new setup layout (for configcli and persisted dirs) should be used.

type StateRollup

type StateRollup struct {
	MembershipChanging  bool `json:"membershipChanging"`
	MembersDown         bool `json:"membersDown"`
	MembersInitializing bool `json:"membersInitializing"`
	MembersWaiting      bool `json:"membersWaiting"`
	MembersRestarting   bool `json:"membersRestarting"`
	ConfigErrors        bool `json:"configErrors"`
	MembersNotScheduled bool `json:"membersNotScheduled"`
}

StateRollup surfaces whether any per-member statuses have problems that should be investigated.

type VolumeProjections added in v0.9.0

type VolumeProjections struct {
	PvcName   string `json:"pvcName"`
	MountPath string `json:"mountPath"`
	ReadOnly  bool   `json:"readOnly,omitempty"`
}

VolumeProjections describes an individual volume projection spec for mounting user created volumes to

Jump to

Keyboard shortcuts

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