v1beta1

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the kubedirector v1beta1 API group

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

Index

Constants

This section is empty.

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 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 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"`
	Spec              KubeDirectorAppSpec `json:"spec"`
}

KubeDirectorApp is the Schema for the kubedirectorapps API +k8s:openapi-gen=true +kubebuilder:subresource:status

type KubeDirectorAppList

type KubeDirectorAppList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	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"`
	NodeRoles           []NodeRole      `json:"roles"`
	Config              NodeGroupConfig `json:"config"`
	DefaultPersistDirs  *[]string       `json:"defaultPersistDirs,omitempty"`
	Capabilities        []v1.Capability `json:"capabilities"`
	SystemdRequired     bool            `json:"systemdRequired"`
}

KubeDirectorAppSpec is the spec provided for an app definition. +k8s:openapi-gen=true

type KubeDirectorCluster

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

KubeDirectorCluster 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. +k8s:openapi-gen=true

type KubeDirectorClusterList

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

KubeDirectorClusterList is the top-level list type for virtual cluster CRs.

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"`
}

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. +k8s:openapi-gen=true

type KubeDirectorClusterStatus

type KubeDirectorClusterStatus struct {
	State                   string       `json:"state"`
	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"`
}

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. +k8s:openapi-gen=true

type KubeDirectorConfig

type KubeDirectorConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              *KubeDirectorConfigSpec   `json:"spec,omitempty"`
	Status            *KubeDirectorConfigStatus `json:"status,omitempty"`
}

KubeDirectorConfig represents single global config. This will be referenced by kubedirector when processing cluster CRs and app CRs. +k8s:openapi-gen=true

type KubeDirectorConfigList

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

KubeDirectorConfigList is the top-level list type for global config CRs

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"`
}

KubeDirectorConfigSpec defines the desired state of KubeDirectorConfig +k8s:openapi-gen=true

type KubeDirectorConfigStatus

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

KubeDirectorConfigStatus defines the observed state of KubeDirectorConfig. +k8s:openapi-gen=true

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"`
}

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"`
	PVC         string            `json:"pvc,omitempty"`
	State       string            `json:"state"`
	StateDetail MemberStateDetail `json:"stateDetail,omitempty"`
	NodeID      int64             `json:"nodeID"`
}

MemberStatus describes the component objects of a virtual cluster member.

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"`
	MinResources *v1.ResourceList `json:"minResources,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 Role

type Role struct {
	Name           string                      `json:"id"`
	PodLabels      map[string]string           `json:"podLabels,omitempty"`
	ServiceLabels  map[string]string           `json:"serviceLabels,omitempty"`
	Members        *int32                      `json:"members,omitempty"`
	Resources      corev1.ResourceRequirements `json:"resources"`
	Storage        *ClusterStorage             `json:"storage,omitempty"`
	EnvVars        []corev1.EnvVar             `json:"env,omitempty"`
	FileInjections []FileInjections            `json:"fileInjections,omitempty"`
	Secret         *KDSecret                   `json:"secret,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"`
}

RoleStatus describes the component objects of a virtual cluster role.

type Service

type Service struct {
	ID       string          `json:"id"`
	Label    Label           `json:"label,omitempty"`
	Endpoint ServiceEndpoint `json:"endpoint,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"`
}

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
	PackageURL SetupPackageURL
}

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.

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 SetupPackageURL

type SetupPackageURL struct {
	PackageURL string `json:"packageURL"`
}

SetupPackageURL is the URL of the setup package.

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"`
}

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

Jump to

Keyboard shortcuts

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