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 GetOwnerLabelsV2alpha1(api *gatewayv2alpha1.APIRule) map[string]string
- func IsJwtSecured(rule gatewayv1beta1.Rule) bool
- func IsSecuredByOathkeeper(rule gatewayv1beta1.Rule) bool
- func Reconcile(ctx context.Context, client client.Client, log *logr.Logger, ...) status.ReconciliationStatus
- func RequiresAuthorizationPolicies(api *gatewayv1beta1.APIRule) bool
- type Action
- type CorsConfig
- type ObjectChange
- type ReconciliationCommand
- type ReconciliationConfig
- type ReconciliationProcessor
Constants ¶
This section is empty.
Variables ¶
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 GetOwnerLabelsV2alpha1 ¶
func GetOwnerLabelsV2alpha1(api *gatewayv2alpha1.APIRule) map[string]string
GetOwnerLabelsV2alpha1 returns the owner labels for the given APIRule. The owner labels are still set to the old v1beta1 APIRule version. Do not switch the owner labels to the new APIRule version unless absolutely necessary! This has been done before, and it caused a lot of confusion and bugs. If the change for some reason has to be done, please remove the version from the OwnerLabel constant.
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.
func Reconcile ¶
func Reconcile(ctx context.Context, client client.Client, log *logr.Logger, cmd ReconciliationCommand) status.ReconciliationStatus
Reconcile executes the reconciliation of the APIRule using the given reconciliation command.
func RequiresAuthorizationPolicies ¶
func RequiresAuthorizationPolicies(api *gatewayv1beta1.APIRule) bool
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) ([]validation.Failure, error) // GetStatusBase returns ReconciliationV1beta1Status that sets unused subresources status to nil and to gatewayv1beta1.StatusCode paramter for all the others GetStatusBase(string) status.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) ([]*ObjectChange, error) }
ReconciliationProcessor provides the evaluation of changes during the reconciliation of API Rule.
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. |