Documentation ¶
Index ¶
- type IstioClient
- type IstioConfig
- func (ic *IstioConfig) ConfigureAP(adminns, url string, nsn types.NamespacedName, inCIDRs []string, ...) error
- func (ic *IstioConfig) ConfigureVS(url string, gw, svc, es types.NamespacedName, ...) error
- func (ic *IstioConfig) GetAuthorizationPolicy() *issecv1beta1.AuthorizationPolicy
- func (ic *IstioConfig) GetVirtualService() *isnetv1beta1.VirtualService
- func (ic *IstioConfig) IsConfigured() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IstioClient ¶
type IstioClient struct {
// contains filtered or unexported fields
}
IstioClient provides a means of upserting rendered resource from an IstioConfig object
func NewClient ¶
func NewClient(cs istioclient.Interface, gs map[string]string) *IstioClient
func (*IstioClient) Configure ¶
func (i *IstioClient) Configure(ctx context.Context, config *v1.EventSourceIngressConfig) ([]types.NamespacedName, error)
func (*IstioClient) Remove ¶
func (i *IstioClient) Remove(ctx context.Context, config *v1.EventSourceIngressConfig) error
type IstioConfig ¶
type IstioConfig struct {
// contains filtered or unexported fields
}
IstioConfig contains global configuration for rendering istio VirtualService and AuthorizationPolicy resources from a port to endpoint mapping.
func NewIstioConfig ¶
func NewIstioConfig() *IstioConfig
func (*IstioConfig) ConfigureAP ¶
func (ic *IstioConfig) ConfigureAP(adminns, url string, nsn types.NamespacedName, inCIDRs []string, endpoints map[string]common.NamedPath, gws map[string]string) error
ConfigureAP configures the IstioConfig.ap field with an AuthorizationPolicy base on the inputs. The AP will contain a single rule that contains the full IP CIDR list and all paths from the endpoint mapping with a glob match. The AP will match the baseURL and baseURL:* hostnames per istio host match best practice.
func (*IstioConfig) ConfigureVS ¶
func (ic *IstioConfig) ConfigureVS(url string, gw, svc, es types.NamespacedName, endpoints map[string]common.NamedPath) error
ConfigureVS populates the IstioConfig.vs field with a VirtualService associated with the IC. The VS is associated with the gateway assigned to the IstioConfig and maps paths onto the base url in the format baseURL/es.Namespace/es.Name/endpoint/ as a prefix match. The virtual service targets the fully qualified internal service host name on the port assigned to the endpoint in the port mapping.
func (*IstioConfig) GetAuthorizationPolicy ¶
func (ic *IstioConfig) GetAuthorizationPolicy() *issecv1beta1.AuthorizationPolicy
GetAuthorizationPolicy returns the current configured or unconfigured authorization policy if the authorization policy is unconfigured it is nil.
func (*IstioConfig) GetVirtualService ¶
func (ic *IstioConfig) GetVirtualService() *isnetv1beta1.VirtualService
GetVirtualService returns the current configured or unconfigured virtual service if the virtual service is unconfigured it is nil.
func (*IstioConfig) IsConfigured ¶
func (ic *IstioConfig) IsConfigured() bool
IsConfigured returns true if both the ap and vs fields of an IstioConfig have been properly Configured