Documentation ¶
Index ¶
- Constants
- Variables
- func AddNamespaceSelector(np *netv1.NetworkPolicy, kind, value string)
- func DefaultNetworkPolicy(namespace, name string, cidrs []string) netv1.NetworkPolicy
- func DelNamespaceSelector(np *netv1.NetworkPolicy, kind string)
- func ExistOwnerRef(meta metav1.ObjectMeta, owner metav1.OwnerReference) bool
- func GetCIDRs(c client.Client) ([]string, error)
- func HasDifferentResources(origin, newone corev1.ResourceRequirements) bool
- func NewResourceQuotaHandler() handler.Funcs
- func OnNamespceChangeFunc(cli client.Client) handler.MapFunc
- func RemoveInvalidResourceName(list corev1.ResourceList) corev1.ResourceList
- type ComponentName
- type EnvironmentReconciler
- type NetworkPolicyAction
- type PluginStatus
- type PluginStatusController
- func (r *PluginStatusController) Init(ctx context.Context) error
- func (r *PluginStatusController) OnChange(ctx context.Context, crd *apiextensionsv1.CustomResourceDefinition, exist bool) (ctrl.Result, error)
- func (r *PluginStatusController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PluginStatusController) SetupWithManager(mgr ctrl.Manager) error
- type ServiceentryReconciler
- func (r *ServiceentryReconciler) OnChange(ctx context.Context, svc *corev1.Service) (ctrl.Result, error)
- func (r *ServiceentryReconciler) OnRemove(ctx context.Context, svc *corev1.Service) (ctrl.Result, error)
- func (r *ServiceentryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ServiceentryReconciler) SetupWithManager(mgr ctrl.Manager) error
- type TenantGatewayReconciler
- type TenantNetworkPolicyReconciler
- type TenantReconciler
- type TenantResourceQuotaReconciler
- type VirtuslspaceReconciler
Constants ¶
const ( ReasonFailedCreateSubResource = "FailedCreateSubResource" ReasonFailedCreate = "FailedCreate" ReasonFailedDelete = "FailedDelete" ReasonFailedUpdate = "FailedUpdate" ReasonCreated = "Created" ReasonDeleted = "Deleted" ReasonUpdated = "Updated" ReasonUnknowError = "UnknowError" )
event reason
Variables ¶
var PluginStatusInstance = &PluginStatus{init: make(chan struct{})}
Functions ¶
func AddNamespaceSelector ¶
func AddNamespaceSelector(np *netv1.NetworkPolicy, kind, value string)
func DefaultNetworkPolicy ¶
func DefaultNetworkPolicy(namespace, name string, cidrs []string) netv1.NetworkPolicy
network policy
func DelNamespaceSelector ¶
func DelNamespaceSelector(np *netv1.NetworkPolicy, kind string)
func ExistOwnerRef ¶
func ExistOwnerRef(meta metav1.ObjectMeta, owner metav1.OwnerReference) bool
owner
func HasDifferentResources ¶
func HasDifferentResources(origin, newone corev1.ResourceRequirements) bool
only cpu and memory
func NewResourceQuotaHandler ¶
func RemoveInvalidResourceName ¶ added in v1.22.0
func RemoveInvalidResourceName(list corev1.ResourceList) corev1.ResourceList
Types ¶
type ComponentName ¶
type ComponentName string
const ( ComponentNginx ComponentName = "nginx" ComponentIstio ComponentName = "istio" )
type EnvironmentReconciler ¶
type EnvironmentReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder }
EnvironmentReconciler reconciles a Environment object
func (*EnvironmentReconciler) SetupWithManager ¶
func (r *EnvironmentReconciler) SetupWithManager(mgr ctrl.Manager) error
type NetworkPolicyAction ¶
type PluginStatus ¶
type PluginStatus struct {
// contains filtered or unexported fields
}
func (*PluginStatus) ComponentEnabled ¶
func (p *PluginStatus) ComponentEnabled(name ComponentName) bool
type PluginStatusController ¶
func (*PluginStatusController) Init ¶
func (r *PluginStatusController) Init(ctx context.Context) error
func (*PluginStatusController) OnChange ¶
func (r *PluginStatusController) OnChange(ctx context.Context, crd *apiextensionsv1.CustomResourceDefinition, exist bool) (ctrl.Result, error)
func (*PluginStatusController) SetupWithManager ¶
func (r *PluginStatusController) SetupWithManager(mgr ctrl.Manager) error
type ServiceentryReconciler ¶
ServiceentryReconciler 用于为对开启 虚拟域名的 namespace 中service创建与虚拟域名相同的 serviceentry 功能: 1. 观察 namespace 是否具有虚拟空间标志 annotation "kubegems.io/virtualdomain={virtualdomain name}" 2. 若有,则为该namespace下的service创建一个virtual service,并设置其hosts 为 {servicename}.{virtualservicename} 处理流程: 1. 若 service 变化,则判断该 namespace 是否具有 annotation "kubegems.io/virtualdomain={virtualdomain name}" 2. 判断 service 是否具有annotation "kubegems.io/virtualdomain={virtualdomain name}" 3. 确定service同名的 serviceentry 是否存在并 uptodate
func (*ServiceentryReconciler) Reconcile ¶
func (r *ServiceentryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
virtualservices.networking.istio.io
func (*ServiceentryReconciler) SetupWithManager ¶
func (r *ServiceentryReconciler) SetupWithManager(mgr ctrl.Manager) error
type TenantGatewayReconciler ¶
type TenantGatewayReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder }
TenantGatewayReconciler reconciles a TenantGateway object
func (*TenantGatewayReconciler) SetupWithManager ¶
func (r *TenantGatewayReconciler) SetupWithManager(mgr ctrl.Manager) error
type TenantNetworkPolicyReconciler ¶
type TenantNetworkPolicyReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder }
TenantNetworkPolicyReconciler reconciles a TenantNetworkPolicy object
func (*TenantNetworkPolicyReconciler) SetupWithManager ¶
func (r *TenantNetworkPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
type TenantReconciler ¶
type TenantReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder }
TenantReconciler reconciles a Tenant object
func (*TenantReconciler) SetupWithManager ¶
func (r *TenantReconciler) SetupWithManager(mgr ctrl.Manager) error
type TenantResourceQuotaReconciler ¶
TenantResourceQuotaReconciler reconciles a TenantResourceQuota object
func (*TenantResourceQuotaReconciler) SetupWithManager ¶
func (r *TenantResourceQuotaReconciler) SetupWithManager(mgr ctrl.Manager) error
type VirtuslspaceReconciler ¶
VirtuslspaceReconciler 用于解析 ns 上的annotation以在不同的空间中创建sidecar
func (*VirtuslspaceReconciler) Reconcile ¶
func (r *VirtuslspaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
virtualservices.networking.istio.io
func (*VirtuslspaceReconciler) SetupWithManager ¶
func (r *VirtuslspaceReconciler) SetupWithManager(mgr ctrl.Manager) error