Documentation ¶
Index ¶
- Variables
- func DeleteAPIRuleSubresources(k8sClient client.Client, ctx context.Context, apiRule gatewayv1beta1.APIRule) error
- func FilterDuplicatePaths(rules []gatewayv1beta1.Rule) []gatewayv1beta1.Rule
- func GetOwnerLabels(api *gatewayv1beta1.APIRule) map[string]string
- func HasJwtRule(api *gatewayv1beta1.APIRule) bool
- func IsJwtSecured(rule gatewayv1beta1.Rule) bool
- func IsSecuredByOathkeeper(rule gatewayv1beta1.Rule) bool
- type Action
- type CorsConfig
- type ObjectChange
- type ReconciliationCommand
- type ReconciliationConfig
- type ReconciliationProcessor
- type ReconciliationStatus
- func GenerateStatusFromFailures(failures []validation.Failure, statusBase ReconciliationStatus) ReconciliationStatus
- func GetStatusForErrorMap(errorMap map[ResourceSelector][]error, statusBase ReconciliationStatus) ReconciliationStatus
- func Reconcile(ctx context.Context, client client.Client, log *logr.Logger, ...) ReconciliationStatus
- type ResourceSelector
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //OwnerLabel . OwnerLabel = fmt.Sprintf("%s.%s", "apirule", gatewayv1beta1.GroupVersion.String()) )
Functions ¶
func FilterDuplicatePaths ¶
func FilterDuplicatePaths(rules []gatewayv1beta1.Rule) []gatewayv1beta1.Rule
func GetOwnerLabels ¶
func GetOwnerLabels(api *gatewayv1beta1.APIRule) map[string]string
func HasJwtRule ¶
func HasJwtRule(api *gatewayv1beta1.APIRule) bool
func IsJwtSecured ¶
func IsJwtSecured(rule gatewayv1beta1.Rule) bool
func IsSecuredByOathkeeper ¶
func IsSecuredByOathkeeper(rule gatewayv1beta1.Rule) bool
IsSecuredByOathkeeper checks whether the rule contains an access strategy that should lead to the creation of an Oathkeeper rule.
Types ¶
type CorsConfig ¶
type CorsConfig struct { AllowOrigins []*v1beta1.StringMatch AllowMethods []string AllowHeaders []string }
CorsConfig is an internal representation of v1alpha3.CorsPolicy object
type ObjectChange ¶
func NewObjectCreateAction ¶
func NewObjectCreateAction(obj client.Object) *ObjectChange
func NewObjectDeleteAction ¶
func NewObjectDeleteAction(obj client.Object) *ObjectChange
func NewObjectUpdateAction ¶
func NewObjectUpdateAction(obj client.Object) *ObjectChange
type ReconciliationCommand ¶
type ReconciliationCommand interface { // Validate performs provided APIRule validation in context of the provided client cluster Validate(context.Context, client.Client, *gatewayv1beta1.APIRule) ([]validation.Failure, error) // GetStatusBase returns ReconciliationStatus that sets unused subresources status to nil and to gatewayv1beta1.StatusCode paramter for all the others GetStatusBase(gatewayv1beta1.StatusCode) ReconciliationStatus // GetProcessors returns the processor relevant for the reconciliation of this command. GetProcessors() []ReconciliationProcessor }
ReconciliationCommand provides the processors and validation required to reconcile the API rule.
type ReconciliationConfig ¶
type ReconciliationConfig struct { OathkeeperSvc string OathkeeperSvcPort uint32 CorsConfig *CorsConfig DefaultDomainName string }
type ReconciliationProcessor ¶
type ReconciliationProcessor interface { // EvaluateReconciliation returns the changes that needs to be applied to the cluster by comparing the desired with the actual state. EvaluateReconciliation(context.Context, client.Client, *gatewayv1beta1.APIRule) ([]*ObjectChange, error) }
ReconciliationProcessor provides the evaluation of changes during the reconciliation of API Rule.
type ReconciliationStatus ¶
type ReconciliationStatus struct { ApiRuleStatus *gatewayv1beta1.APIRuleResourceStatus VirtualServiceStatus *gatewayv1beta1.APIRuleResourceStatus AccessRuleStatus *gatewayv1beta1.APIRuleResourceStatus RequestAuthenticationStatus *gatewayv1beta1.APIRuleResourceStatus AuthorizationPolicyStatus *gatewayv1beta1.APIRuleResourceStatus }
func GenerateStatusFromFailures ¶
func GenerateStatusFromFailures(failures []validation.Failure, statusBase ReconciliationStatus) ReconciliationStatus
func GetStatusForErrorMap ¶
func GetStatusForErrorMap(errorMap map[ResourceSelector][]error, statusBase ReconciliationStatus) ReconciliationStatus
func Reconcile ¶
func Reconcile(ctx context.Context, client client.Client, log *logr.Logger, cmd ReconciliationCommand, apiRule *gatewayv1beta1.APIRule) ReconciliationStatus
Reconcile executes the reconciliation of the APIRule using the given reconciliation command.
func (ReconciliationStatus) HasError ¶
func (status ReconciliationStatus) HasError() bool
type ResourceSelector ¶
type ResourceSelector int
const ( OnApiRule ResourceSelector = iota OnVirtualService OnAccessRule OnAuthorizationPolicy OnRequestAuthentication )
func (ResourceSelector) String ¶
func (r ResourceSelector) String() string
Directories ¶
Path | Synopsis |
---|---|
Package hashbasedstate provides types and functions to compare objects by a hash and a position in a yaml sequence.
|
Package hashbasedstate provides types and functions to compare objects by a hash and a position in a yaml sequence. |
internal
|
|
Click to show internal directories.
Click to hide internal directories.