deployfabric

package
v0.0.0-...-1a1319b Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KUBERNETES_DEPLOY_FAILED string = "Failure"
)

Variables

This section is empty.

Functions

func CreateCaDeployment

func CreateCaDeployment(clusterId string, node string, namespaceId string, chainId string, image string, caName string, orgDomain string, caPriKey string) ([]byte, error)

func CreateCaService

func CreateCaService(clusterId string, namespaceId string, chainId string, caName string) ([]byte, error)

func CreateDeployment

func CreateDeployment(clusterId string, namespaceId string, deployObj interface{}) ([]byte, error)

func CreateKafkaDeployment

func CreateKafkaDeployment(clusterId string, node string, namespaceId string, chainId string, kafkaId string, image string, kafkaName string) ([]byte, error)

func CreateKafkaService

func CreateKafkaService(clusterId string, namespaceId string, chainId string, kafkaName string) ([]byte, error)

func CreateNamespace

func CreateNamespace(clusterId string, namespaceId string) ([]byte, error)

func CreateOrderKafkaDeployment

func CreateOrderKafkaDeployment(clusterId string, node string, namespaceId string, chainId string, image string, orderName string, orderDomain string) ([]byte, error)

func CreateOrderRaftDeployment

func CreateOrderRaftDeployment(clusterId string, node string, namespaceId string, chainId string, image string, orderName string, orderDomain string) ([]byte, error)

func CreateOrderService

func CreateOrderService(clusterId string, namespaceId string, chainId string, orderName string) ([]byte, error)

func CreatePeerDeployment

func CreatePeerDeployment(clusterId string, node string, namespaceId string, chainId string, p PeerDeploymentPara) ([]byte, error)

func CreatePeerService

func CreatePeerService(clusterId string, namespaceId string, chainId string, peerName string) ([]byte, error)

func CreateService

func CreateService(clusterId string, namespaceId string, serviceObj interface{}) ([]byte, error)

func CreateToolsDeployment

func CreateToolsDeployment(clusterId string, node string, namespaceId string, chainId string, p ToolsDeploymentPara) ([]byte, error)

func CreateZookeeperDeployment

func CreateZookeeperDeployment(clusterId string, node string, namespaceId string, chainId string, zkId string, image string, zookeeperName string) ([]byte, error)

func CreateZookeeperService

func CreateZookeeperService(clusterId string, namespaceId string, chainId string, zkName string) ([]byte, error)

func DeleteDeployment

func DeleteDeployment(clusterId string, namespaceId string, deployName string) ([]byte, error)

func DeleteNamespace

func DeleteNamespace(clusterId string, namespaceId string) ([]byte, error)

func DeleteService

func DeleteService(clusterId string, namespaceId string, serviceName string) ([]byte, error)

func OrgAddPatchToolsDeployment

func OrgAddPatchToolsDeployment(clusterId string, node string, namespaceId string, chainId string, p OrgAddToolsDeploymentPara) ([]byte, error)

func PatchDeployment

func PatchDeployment(clusterId string, namespaceId string, deploymentName string, deployObj interface{}) ([]byte, error)

func PatchToolsDeployment

func PatchToolsDeployment(clusterId string, node string, namespaceId string, chainId string, p PathToolsDeploymentPara) ([]byte, error)

Types

type AffinitySpecTemplateSt

type AffinitySpecTemplateSt struct {
	NodeAffinity NodeAffinityAffinitySpecTemplateSt `json:"nodeAffinity"`
}

type CaDeployMent

type CaDeployMent struct {
	APIVersion string             `json:"apiVersion"`
	Kind       string             `json:"kind"`
	Metadata   MetadataDeployMent `json:"metadata"`
	Spec       SpecSt             `json:"spec"`
}

type CaService

type CaService struct {
	APIVersion string          `json:"apiVersion"`
	Kind       string          `json:"kind"`
	Metadata   MetadataService `json:"metadata"`
	Spec       SpecService     `json:"spec"`
}

type ContainerSpecTemplateSt

type ContainerSpecTemplateSt struct {
	Name            string                          `json:"name"`
	Image           string                          `json:"image"`
	ImagePullPolicy string                          `json:"imagePullPolicy"`
	Resources       ResourceContainerSpecTemplateSt `json:"resources"`
	Args            []string                        `json:"args"`
	Env             []EnvContainerSpecTemplateSt    `json:"env"`
	Ports           []PortContainerSpecTemplateSt   `json:"ports"`
	VolumeMounts    []VolumeContainerSpecTemplateSt `json:"volumeMounts"`
	WorkingDir      string                          `json:"workingDir,omitempty"`
	Command         []string                        `json:"command,omitempty"`
	Tty             bool                            `json:"tty,omitempty"`
	Stdin           bool                            `json:"stdin,omitempty"`
}

type DeployResult

type DeployResult struct {
	Kind       string      `json:"kind"`
	APIVersion string      `json:"apiVersion"`
	Metadata   interface{} `json:"metadata"`
	Status     interface{} `json:"status"`
	Message    string      `json:"message"`
	Reason     string      `json:"reason"`
	Details    struct {
		Name  string `json:"name"`
		Group string `json:"group"`
		Kind  string `json:"kind"`
	} `json:"details"`
	Code int `json:"code"`
}

type EmptyDirVolumeSpecTemplateSt

type EmptyDirVolumeSpecTemplateSt struct {
}

type EnvContainerSpecTemplateSt

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

type ExeAffinitySpecTemplateSt

type ExeAffinitySpecTemplateSt struct {
	Weight     int                                 `json:"weight"`
	Preference PreferenceExeAffinitySpecTemplateSt `json:"preference"`
}

type HostPathVolumeSpecTemplateSt

type HostPathVolumeSpecTemplateSt struct {
	Path string `json:"path"`
}

type ImagePullSecretSpecTemplateSt

type ImagePullSecretSpecTemplateSt struct {
	Name string `json:"name"`
}

type KafkaDeployMent

type KafkaDeployMent struct {
	APIVersion string             `json:"apiVersion"`
	Kind       string             `json:"kind"`
	Metadata   MetadataDeployMent `json:"metadata"`
	Spec       SpecSt             `json:"spec"`
}

type KafkaService

type KafkaService struct {
	APIVersion string          `json:"apiVersion"`
	Kind       string          `json:"kind"`
	Metadata   MetadataService `json:"metadata"`
	Spec       SpecService     `json:"spec"`
}

type LabelsSt

type LabelsSt struct {
	App string `json:"app"`
}

type MatchPreferenceExeAffinitySpecTemplateSt

type MatchPreferenceExeAffinitySpecTemplateSt struct {
	Key      string   `json:"key"`
	Operator string   `json:"operator"`
	Values   []string `json:"values"`
}

type MetadataDeployMent

type MetadataDeployMent struct {
	Name   string   `json:"name"`
	Labels LabelsSt `json:"labels"`
}

type MetadataService

type MetadataService struct {
	Name string `json:"name"`
}

type MetadataTemplateSt

type MetadataTemplateSt struct {
	Labels LabelsSt `json:"labels"`
}

type NamespaceDeploy

type NamespaceDeploy struct {
	ApiVersion string `yaml:"apiVersion"`
	Kind       string `yaml:"kind"`
	Metadata   struct {
		Name string `yaml:"name"`
	} `yaml:"metadata"`
}

type NamespaceDeployResult

type NamespaceDeployResult struct {
	Kind       string `json:"kind"`
	APIVersion string `json:"apiVersion"`
	Metadata   struct {
		Name              string    `json:"name"`
		SelfLink          string    `json:"selfLink"`
		UID               string    `json:"uid"`
		ResourceVersion   string    `json:"resourceVersion"`
		CreationTimestamp time.Time `json:"creationTimestamp"`
	} `json:"metadata"`
	Spec struct {
		Finalizers []string `json:"finalizers"`
	} `json:"spec"`
	Status struct {
		Phase string `json:"phase"`
	} `json:"status"`
}

type NamespaceDeployResultError

type NamespaceDeployResultError struct {
	Kind       string `json:"kind"`
	APIVersion string `json:"apiVersion"`
	Metadata   struct {
	} `json:"metadata"`
	Status  string `json:"status"`
	Message string `json:"message"`
	Reason  string `json:"reason"`
	Details struct {
	} `json:"details"`
	Code int `json:"code"`
}

type NfsVolumeSpecTemplateSt

type NfsVolumeSpecTemplateSt struct {
	Server string `json:"server"`
	Path   string `json:"path"`
}

type NodeAffinityAffinitySpecTemplateSt

type NodeAffinityAffinitySpecTemplateSt struct {
	PreferredDuringSchedulingIgnoredDuringExecution []ExeAffinitySpecTemplateSt `json:"preferredDuringSchedulingIgnoredDuringExecution"`
}

type NodeSelectorSpecTemplateSt

type NodeSelectorSpecTemplateSt struct {
	KubernetesIoHostname string `json:"kubernetes.io/hostname"`
}

type OrderDeployMent

type OrderDeployMent struct {
	APIVersion string             `json:"apiVersion"`
	Kind       string             `json:"kind"`
	Metadata   MetadataDeployMent `json:"metadata"`
	Spec       SpecSt             `json:"spec"`
}

type OrderService

type OrderService struct {
	APIVersion string          `json:"apiVersion"`
	Kind       string          `json:"kind"`
	Metadata   MetadataService `json:"metadata"`
	Spec       SpecService     `json:"spec"`
}

type OrgAddToolsDeploymentPara

type OrgAddToolsDeploymentPara struct {
	Args        []string
	ToolsImage  string
	PeerName    string
	PeerDomain  string
	OrgName     string
	LogLevel    string
	CoreCfgPath string
	MspId       string
	MspPath     string
	CertFile    string
	PeerAddr    string
	AddOrgName  string
}

type PathToolsDeploymentPara

type PathToolsDeploymentPara struct {
	Args       []string
	ToolsImage string
	PeerName   string
	PeerDomain string
	OrgName    string
	LogLevel   string
}

type PeerDeployMent

type PeerDeployMent struct {
	APIVersion string             `json:"apiVersion"`
	Kind       string             `json:"kind"`
	Metadata   MetadataDeployMent `json:"metadata"`
	Spec       SpecSt             `json:"spec"`
}

type PeerDeploymentPara

type PeerDeploymentPara struct {
	PeerImage   string
	CcenvImage  string
	BaseosImage string
	PeerName    string
	RawPeerName string
	AnchorPeer  string
	PeerDomain  string
	OrgName     string
}

type PeerService

type PeerService struct {
	APIVersion string          `json:"apiVersion"`
	Kind       string          `json:"kind"`
	Metadata   MetadataService `json:"metadata"`
	Spec       SpecService     `json:"spec"`
}

type PortContainerSpecTemplateSt

type PortContainerSpecTemplateSt struct {
	ContainerPort int `json:"containerPort"`
}

type PortSpecService

type PortSpecService struct {
	Name       string `json:"name"`
	Port       int    `json:"port"`
	TargetPort int    `json:"targetPort"`
}

type PreferenceExeAffinitySpecTemplateSt

type PreferenceExeAffinitySpecTemplateSt struct {
	MatchExpressions []MatchPreferenceExeAffinitySpecTemplateSt `json:"matchExpressions"`
}

type RequestsResourceContainerSpecTemplateSt

type RequestsResourceContainerSpecTemplateSt struct {
	Memory string `json:"memory"`
	CPU    string `json:"cpu"`
}

type ResourceContainerSpecTemplateSt

type ResourceContainerSpecTemplateSt struct {
	Requests RequestsResourceContainerSpecTemplateSt `json:"requests"`
}

type SelectorSpecService

type SelectorSpecService struct {
	App string `json:"app"`
}

type SelectorSt

type SelectorSt struct {
	MatchLabels LabelsSt `json:"matchLabels"`
}

type SpecService

type SpecService struct {
	Type     string              `json:"type"`
	Ports    []PortSpecService   `json:"ports"`
	Selector SelectorSpecService `json:"selector"`
}

type SpecSt

type SpecSt struct {
	Selector SelectorSt `json:"selector,omitempty"`
	Replicas int        `json:"replicas"`
	Strategy StrategySt `json:"strategy"`
	Template TemplateSt `json:"template"`
}

type SpecTemplateSt

type SpecTemplateSt struct {
	//NodeSelector NodeSelectorSpecTemplateSt `json:"nodeSelector,omitempty"`
	NodeName         string                          `json:"nodeName,omitempty"`
	Affinity         AffinitySpecTemplateSt          `json:"affinity,omitempty"`
	InitContainers   []ContainerSpecTemplateSt       `json:"initContainers,omitempty"`
	Containers       []ContainerSpecTemplateSt       `json:"containers"`
	RestartPolicy    string                          `json:"restartPolicy"`
	ImagePullSecrets []ImagePullSecretSpecTemplateSt `json:"imagePullSecrets"`
	Hostname         string                          `json:"hostname,omitempty"`
	Subdomain        string                          `json:"subdomain,omitempty"`
	HostNetwork      string                          `json:"hostNetwork,omitempty"`
	DnsPolicy        string                          `json:"dnsPolicy,omitempty"`
	//Volumes []VolumeSpecTemplateSt `json:"volumes"`
	Volumes []interface{} `json:"volumes,omitempty"`
}

type StrategySt

type StrategySt struct {
	Type string `json:"type"`
}

type TemplateSt

type TemplateSt struct {
	Metadata MetadataTemplateSt `json:"metadata"`
	Spec     SpecTemplateSt     `json:"spec"`
}

type ToolsDeployMent

type ToolsDeployMent struct {
	APIVersion string             `json:"apiVersion"`
	Kind       string             `json:"kind"`
	Metadata   MetadataDeployMent `json:"metadata"`
	Spec       SpecSt             `json:"spec"`
}

type ToolsDeploymentPara

type ToolsDeploymentPara struct {
	ToolsImage string
	PeerName   string
	PeerDomain string
	OrgName    string
}

type VolumeContainerSpecTemplateSt

type VolumeContainerSpecTemplateSt struct {
	MountPath string `json:"mountPath"`
	Name      string `json:"name"`
	SubPath   string `json:"subPath,omitempty"`
}

type VolumeSpecTemplateHostSt

type VolumeSpecTemplateHostSt struct {
	Name     string                       `json:"name"`
	HostPath HostPathVolumeSpecTemplateSt `json:"hostPath"`
}

type VolumeSpecTemplateSt

type VolumeSpecTemplateSt struct {
	Name string `json:"name"`
	//EmptyDir EmptyDirVolumeSpecTemplateSt `json:"emptyDir,omitempty"`
	Nfs NfsVolumeSpecTemplateSt `json:"nfs,omitempty"`
}

type ZookeeperDeployMent

type ZookeeperDeployMent struct {
	APIVersion string             `json:"apiVersion"`
	Kind       string             `json:"kind"`
	Metadata   MetadataDeployMent `json:"metadata"`
	Spec       SpecSt             `json:"spec"`
}

type ZookeeperService

type ZookeeperService struct {
	APIVersion string          `json:"apiVersion"`
	Kind       string          `json:"kind"`
	Metadata   MetadataService `json:"metadata"`
	Spec       SpecService     `json:"spec"`
}

Jump to

Keyboard shortcuts

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