Documentation ¶
Index ¶
- Constants
- func GetHttpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error)
- func GetTlsRoutesI(obj *unstructured.Unstructured) ([]interface{}, error)
- func UnmarshalJson(input []byte, result interface{}) (map[string]interface{}, error)
- func ValidateHTTPRoutes(r *v1alpha1.Rollout, routeNames []string, httpRoutes []VirtualServiceHTTPRoute) error
- func ValidateTlsRoutes(r *v1alpha1.Rollout, vsvcTLSRoutes []v1alpha1.TLSRoute, ...) error
- type DestinationRule
- type DestinationRuleSpec
- type IstioController
- func (c *IstioController) EnqueueDestinationRule(obj interface{})
- func (c *IstioController) EnqueueRolloutFromIstioVirtualService(vsvc interface{})
- func (c *IstioController) GetReferencedVirtualServices(ro *v1alpha1.Rollout) (*[]unstructured.Unstructured, error)
- func (c *IstioController) Run(stopCh <-chan struct{})
- type IstioControllerConfig
- type Reconciler
- func (r *Reconciler) SetWeight(desiredWeight int32, additionalDestinations ...v1alpha1.WeightDestination) error
- func (r *Reconciler) Type() string
- func (r *Reconciler) UpdateHash(canaryHash, stableHash string) error
- func (r *Reconciler) VerifyWeight(desiredWeight int32, additionalDestinations ...v1alpha1.WeightDestination) (*bool, error)
- type Subset
- type TLSMatchAttributes
- type VirtualService
- type VirtualServiceDestination
- type VirtualServiceHTTPRoute
- type VirtualServiceRouteDestination
- type VirtualServiceSpec
- type VirtualServiceTLSRoute
Constants ¶
const Http = "http"
const Tls = "tls"
const Type = "Istio"
Variables ¶
This section is empty.
Functions ¶
func GetHttpRoutesI ¶ added in v0.9.0
func GetHttpRoutesI(obj *unstructured.Unstructured) ([]interface{}, error)
func GetTlsRoutesI ¶ added in v1.1.0
func GetTlsRoutesI(obj *unstructured.Unstructured) ([]interface{}, error)
func UnmarshalJson ¶ added in v1.0.2
func ValidateHTTPRoutes ¶ added in v0.9.0
func ValidateHTTPRoutes(r *v1alpha1.Rollout, routeNames []string, httpRoutes []VirtualServiceHTTPRoute) error
validateHTTPRoutes ensures that all the routes in the rollout exist and they only have two destinations
func ValidateTlsRoutes ¶ added in v1.1.0
func ValidateTlsRoutes(r *v1alpha1.Rollout, vsvcTLSRoutes []v1alpha1.TLSRoute, tlsRoutes []VirtualServiceTLSRoute) error
ValidateTlsRoutes ensures that all the routes in the rollout exist and they only have two destinations
Types ¶
type DestinationRule ¶ added in v1.0.0
type DestinationRule struct { metav1.ObjectMeta `json:"metadata,omitempty"` Spec DestinationRuleSpec `json:"spec,omitempty"` }
DestinationRule is an Istio DestinationRule containing only the fields which we care about
type DestinationRuleSpec ¶ added in v1.0.0
type DestinationRuleSpec struct {
Subsets []Subset `json:"subsets,omitempty"`
}
type IstioController ¶ added in v1.0.0
type IstioController struct { IstioControllerConfig VirtualServiceLister dynamiclister.Lister DestinationRuleLister dynamiclister.Lister // contains filtered or unexported fields }
func NewIstioController ¶ added in v1.0.0
func NewIstioController(cfg IstioControllerConfig) *IstioController
func (*IstioController) EnqueueDestinationRule ¶ added in v1.0.0
func (c *IstioController) EnqueueDestinationRule(obj interface{})
EnqueueDestinationRule examines a VirtualService, finds the Rollout referencing that VirtualService, and enqueues the corresponding Rollout for reconciliation
func (*IstioController) EnqueueRolloutFromIstioVirtualService ¶ added in v1.0.0
func (c *IstioController) EnqueueRolloutFromIstioVirtualService(vsvc interface{})
EnqueueRolloutFromIstioVirtualService examines a VirtualService, finds the Rollout referencing that VirtualService, and enqueues the corresponding Rollout for reconciliation
func (*IstioController) GetReferencedVirtualServices ¶ added in v1.0.0
func (c *IstioController) GetReferencedVirtualServices(ro *v1alpha1.Rollout) (*[]unstructured.Unstructured, error)
func (*IstioController) Run ¶ added in v1.0.0
func (c *IstioController) Run(stopCh <-chan struct{})
Run starts the Istio informers. If Istio is not installed, will periodically check for presence of Istio, then start informers once detected. This allows Argo Rollouts to be installed in any order during cluster bootstrapping.
type IstioControllerConfig ¶ added in v1.0.0
type IstioControllerConfig struct { ArgoprojClientSet roclientset.Interface DynamicClientSet dynamic.Interface EnqueueRollout func(ro interface{}) RolloutsInformer informers.RolloutInformer VirtualServiceInformer cache.SharedIndexInformer DestinationRuleInformer cache.SharedIndexInformer }
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler holds required fields to reconcile Istio resources
func NewReconciler ¶
func NewReconciler(r *v1alpha1.Rollout, client dynamic.Interface, recorder record.EventRecorder, virtualServiceLister, destinationRuleLister dynamiclister.Lister) *Reconciler
NewReconciler returns a reconciler struct that brings the Virtual Service into the desired state
func (*Reconciler) SetWeight ¶ added in v1.0.0
func (r *Reconciler) SetWeight(desiredWeight int32, additionalDestinations ...v1alpha1.WeightDestination) error
SetWeight modifies Istio resources to reach desired state
func (*Reconciler) Type ¶
func (r *Reconciler) Type() string
Type indicates this reconciler is an Istio reconciler
func (*Reconciler) UpdateHash ¶ added in v1.0.0
func (r *Reconciler) UpdateHash(canaryHash, stableHash string) error
func (*Reconciler) VerifyWeight ¶ added in v1.0.0
func (r *Reconciler) VerifyWeight(desiredWeight int32, additionalDestinations ...v1alpha1.WeightDestination) (*bool, error)
type TLSMatchAttributes ¶ added in v1.1.0
type TLSMatchAttributes struct { SNI []string `json:"sniHosts,omitempty"` DestinationSubnets []string `json:"destinationSubnets,omitempty"` Port int64 `json:"port,omitempty"` SourceLabels map[string]string `json:"sourceLabels,omitempty"` Gateways []string `json:"gateways,omitempty"` SourceNamespace string `json:"sourceNamespace,omitempty"` }
TLSMatchAttributes is the route matcher for a TLS route in a VirtualService
type VirtualService ¶ added in v1.0.0
type VirtualService struct { metav1.ObjectMeta `json:"metadata,omitempty"` Spec VirtualServiceSpec `json:"spec,omitempty"` }
VirtualService is an Istio VirtualService containing only the fields which we care about
type VirtualServiceDestination ¶ added in v1.0.0
type VirtualServiceDestination struct { Host string `json:"host,omitempty"` Subset string `json:"subset,omitempty"` }
Destination fields within the VirtualServiceDestination struct of the Virtual Service that the controller modifies
type VirtualServiceHTTPRoute ¶ added in v1.0.0
type VirtualServiceHTTPRoute struct { Name string `json:"name,omitempty"` Route []VirtualServiceRouteDestination `json:"route,omitempty"` }
VirtualServiceHTTPRoute is a HTTP route in a VirtualService
func GetHttpRoutes ¶ added in v0.9.0
func GetHttpRoutes(obj *unstructured.Unstructured, httpRoutesI []interface{}) ([]VirtualServiceHTTPRoute, error)
type VirtualServiceRouteDestination ¶ added in v1.1.0
type VirtualServiceRouteDestination struct { // Destination holds the destination struct of the virtual service Destination VirtualServiceDestination `json:"destination,omitempty"` // Weight holds the destination struct of the virtual service Weight int64 `json:"weight,omitempty"` }
VirtualServiceRouteDestination is a destination within { VirtualServiceHTTPRoute, VirtualServiceTLSRoute }
type VirtualServiceSpec ¶ added in v1.0.0
type VirtualServiceSpec struct { HTTP []VirtualServiceHTTPRoute `json:"http,omitempty"` TLS []VirtualServiceTLSRoute `json:"tls,omitempty"` }
type VirtualServiceTLSRoute ¶ added in v1.1.0
type VirtualServiceTLSRoute struct { Match []TLSMatchAttributes `json:"match,omitempty"` Route []VirtualServiceRouteDestination `json:"route,omitempty"` }
VirtualServiceTLSRoute is a TLS route in a VirtualService
func GetTlsRoutes ¶ added in v1.1.0
func GetTlsRoutes(obj *unstructured.Unstructured, tlsRoutesI []interface{}) ([]VirtualServiceTLSRoute, error)