Documentation ¶
Index ¶
- Variables
- func CreatePV(req *PV) (int, error)
- func CreatePVC(req *PVC) (int, error)
- func DeletePV(req *Delete) (int, error)
- func DeletePVC(req *Delete) (int, error)
- func GetClientset() *kubernetes.Clientset
- func GetPV() *apiv1.PersistentVolumeList
- func GetPVC() *apiv1.PersistentVolumeClaimList
- func Getbaseimage(dep string) (string, error)
- func Getorg() orm.Ormer
- func Gettime() string
- func Insertbaseimage(dep string, image string, ver string) error
- func Insertlog(log *Log)
- func LinkTomysql() (*sql.DB, error)
- func Truncate()
- func Updateimage(dep string, image string) error
- type AutoScale
- type Container
- type Delete
- type Deployment
- type DeploymentList
- type Error
- type ListMeta
- type Log
- type PV
- type PVC
- type PersistentVolumeAccessMode
- type Pod
- type PodList
- type Port
- type Response
- type Service
- type ServiceList
- type ServiceType
- type StatefulSetList
- type Statefulset
- type TypeMeta
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Once sync.Once
)
Functions ¶
func GetClientset ¶
func GetClientset() *kubernetes.Clientset
func GetPV ¶
func GetPV() *apiv1.PersistentVolumeList
func GetPVC ¶
func GetPVC() *apiv1.PersistentVolumeClaimList
func Getbaseimage ¶
func LinkTomysql ¶
func Updateimage ¶
Types ¶
type Container ¶
type Container struct { Name string `json:"name"` Image string `json:"image"` ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"` Protocol string `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"` Env []v1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` }
type Deployment ¶
type DeploymentList ¶
type DeploymentList struct { TypeMeta TypeMeta `json:"typeMeta,inline"` // Standard list metadata. // +optional ListMeta ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of Deployments. Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"` }
type ListMeta ¶
type ListMeta struct { // selfLink is a URL representing this object. // Populated by the system. // Read-only. // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` // String that identifies the server's internal version of this object that // can be used by clients to determine when objects have changed. // Value must be treated as opaque by clients and passed unmodified back to the server. // Populated by the system. // Read-only. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` // continue may be set if the user set a limit on the number of items returned, and indicates that // the server has more data available. The value is opaque and may be used to issue another request // to the endpoint that served this list to retrieve the next set of available objects. Continuing a // list may not be possible if the server configuration has changed or more than a few minutes have // passed. The resourceVersion field returned when using this continue value will be identical to // the value in the first response. Continue string `json:"continue,omitempty" protobuf:"bytes,3,opt,name=continue"` }
type Log ¶
type PV ¶
type PV struct { Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` StorageName string `json:"storageName"` AccessModes string `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` StorageQuantity string `json:"storageQuantity"` NfsServer string `json:"nfsserver"` NfsPath string `json:"nfspath"` }
type PVC ¶
type PVC struct { Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` StorageName string `json:"storageName"` AccessModes string `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` StorageQuantity string `json:"storageQuantity"` NfsServer string `json:"nfsserver"` NfsPath string `json:"nfspath"` Namespace string `json:"namespace"` }
type PersistentVolumeAccessMode ¶
type PersistentVolumeAccessMode string
const ( // can be mounted read/write mode to exactly 1 host ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce" // can be mounted in read-only mode to many hosts ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany" // can be mounted in read/write mode to many hosts ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany" )
type PodList ¶
type PodList struct { TypeMeta TypeMeta `json:"typeMeta,inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds // +optional ListMeta ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of pods. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"` }
type Service ¶
type Service struct { Name string `json:"name"` Namespace string `json:"namespace"` Ports []Port `json:"ports"` Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` Type v1.ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"` }
type ServiceList ¶
type ServiceList struct { TypeMeta TypeMeta `json:"typeMeta,inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds // +optional ListMeta ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of services Items []Service `json:"items" protobuf:"bytes,2,rep,name=items"` }
type ServiceType ¶
type ServiceType string
type StatefulSetList ¶
type StatefulSetList struct { TypeMeta TypeMeta `json:",inline"` // +optional ListMeta ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []Statefulset `json:"items" protobuf:"bytes,2,rep,name=items"` }
type Statefulset ¶
type Statefulset struct { Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` StorageName string `json:"storageName"` Namespace string `json:"namespace"` Replicas int32 `json:"replicas"` Requests string `json:"requests"` Containers []Container `json:"containers"` VMname string `json:"vmname"` MountPath string `json:"mountpath"` AccessModes string `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` }
type TypeMeta ¶
type TypeMeta struct { // Kind is a string value representing the REST resource this object represents. // Servers may infer this from the endpoint the client submits requests to. // Cannot be updated. // In CamelCase. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds // +optional Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` // APIVersion defines the versioned schema of this representation of an object. // Servers should convert recognized schemas to the latest internal value, and // may reject unrecognized values. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` }
Click to show internal directories.
Click to hide internal directories.