Documentation ¶
Index ¶
Constants ¶
View Source
const (
)
View Source
const (
ServiceKind = "service"
)
Variables ¶
View Source
var (
Traits = map[string]Trait{}
)
Functions ¶
Types ¶
type Client ¶
type Client struct { Kclient kclientset.Interface Rclient clientset.Interface Client kubernetes.Interface }
func NewClient ¶
func NewClient(kclient kclientset.Interface, rclient clientset.Interface, client kubernetes.Interface) *Client
type PodUnavailableBudget ¶
type PodUnavailableBudget struct { // maxUnavailable 和 minAvailable 互斥,maxUnavailable 优先生效 MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` }
pod 干扰预算配置
type Service ¶
type Service struct { // 是否是无头服务 Headless bool `json:"headless,omitempty"` // 端口列表 Ports []v1.ServicePort `json:"ports,omitempty"` }
k8s service 配置
type ServiceTrait ¶
type ServiceTrait struct{}
func (*ServiceTrait) Generate ¶
func (*ServiceTrait) Generate(ttemp *rocketv1alpha1.Trait, obj interface{}) error
func (*ServiceTrait) Handler ¶
func (st *ServiceTrait) Handler(ttemp *rocketv1alpha1.Trait, app *rocketv1alpha1.Application, event EventType, client *Client) error
type Trait ¶
type Trait interface { // 根据给定的 traitTemplate 生成相应的配置 Generate(ttemp *rocketv1alpha1.Trait, obj interface{}) error // 根据 trait 进行相应的处理 Handler(trait *rocketv1alpha1.Trait, app *rocketv1alpha1.Application, event EventType, client *Client) error }
func NewPubTrait ¶
func NewPubTrait() Trait
func NewServiceTrait ¶
func NewServiceTrait() Trait
Click to show internal directories.
Click to hide internal directories.