Documentation ¶
Index ¶
- Constants
- func DecodeFile(ctx context.Context, fileData []byte, scheme *runtime.Scheme, ...) error
- func FindAuthorinoStatusCondition(conditions []authorinov1beta1.Condition, conditionType string) *authorinov1beta1.Condition
- func HasKuadrantAuthorizer(configWrapper ConfigWrapper, authorizer KuadrantAuthorizer) (bool, error)
- func MergeMapStringString(existing *map[string]string, desired map[string]string) bool
- func RegisterKuadrantAuthorizer(configWrapper ConfigWrapper, authorizer Authorizer) error
- func ToBase36Hash(s string) string
- func ToBase36HashLen(s string, l int) string
- func UnMarshallLimitNamespace(ns string) (client.ObjectKey, string, error)
- func UnMarshallObjectKey(keyStr string) (client.ObjectKey, error)
- func UnregisterKuadrantAuthorizer(configWrapper ConfigWrapper, authorizer Authorizer) error
- type Authorizer
- type ConfigWrapper
- type DecodeCallback
- type KuadrantAuthorizer
Constants ¶
const ( KuadrantRateLimitClusterName = "kuadrant-rate-limiting-service" AuthPolicyBackRefAnnotation = "kuadrant.io/authpolicy" NamespaceSeparator = '/' LimitadorName = "limitador" )
TODO: move the const to a proper place, or get it from config
const (
ExtAuthorizerName = "kuadrant-authorization"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeFile ¶
func DecodeFile(ctx context.Context, fileData []byte, scheme *runtime.Scheme, cb DecodeCallback) error
DecodeFile decodes the provided file data (encoded YAML documents) into Kubernetes objects using the specified scheme, and invokes the callback function for each decoded object. Returns an error if any decoding error occurs.
func FindAuthorinoStatusCondition ¶
func FindAuthorinoStatusCondition(conditions []authorinov1beta1.Condition, conditionType string) *authorinov1beta1.Condition
func HasKuadrantAuthorizer ¶ added in v0.4.0
func HasKuadrantAuthorizer(configWrapper ConfigWrapper, authorizer KuadrantAuthorizer) (bool, error)
HasKuadrantAuthorizer returns true if the IstioOperator has the Kuadrant ExtensionProvider
func MergeMapStringString ¶ added in v0.2.0
MergeMapStringString Merge desired into existing. Not Thread-Safe. Does it matter?
func RegisterKuadrantAuthorizer ¶ added in v0.4.0
func RegisterKuadrantAuthorizer(configWrapper ConfigWrapper, authorizer Authorizer) error
RegisterKuadrantAuthorizer adds the Kuadrant ExtensionProvider to the IstioOperator
func ToBase36Hash ¶ added in v0.7.0
func ToBase36HashLen ¶ added in v0.7.0
func UnMarshallLimitNamespace ¶ added in v0.2.0
UnMarshallLimitNamespace parses limit namespace with format "gwNS/gwName#domain"
func UnMarshallObjectKey ¶ added in v0.2.0
UnMarshallObjectKey takes a string input and converts it into an ObjectKey struct that can be used to access a specific Kubernetes object. The input string is expected to be in the format "namespace/name". If the input string does not contain a NamespaceSeparator (typically '/') or has too few components, this function returns an error.
func UnregisterKuadrantAuthorizer ¶ added in v0.4.0
func UnregisterKuadrantAuthorizer(configWrapper ConfigWrapper, authorizer Authorizer) error
UnregisterKuadrantAuthorizer removes the Kuadrant ExtensionProvider from the IstioOperator
Types ¶
type Authorizer ¶ added in v0.4.0
type Authorizer interface {
GetExtensionProvider() *istiomeshv1alpha1.MeshConfig_ExtensionProvider
}
type ConfigWrapper ¶ added in v0.4.0
type ConfigWrapper interface { GetConfigObject() client.Object GetMeshConfig() (*istiomeshv1alpha1.MeshConfig, error) SetMeshConfig(*istiomeshv1alpha1.MeshConfig) error }
type DecodeCallback ¶
type KuadrantAuthorizer ¶ added in v0.4.0
type KuadrantAuthorizer struct {
// contains filtered or unexported fields
}
func NewKuadrantAuthorizer ¶ added in v0.4.0
func NewKuadrantAuthorizer(namespace string) *KuadrantAuthorizer
NewKuadrantAuthorizer Creates a new KuadrantAuthorizer
func (*KuadrantAuthorizer) GetExtensionProvider ¶ added in v0.4.0
func (k *KuadrantAuthorizer) GetExtensionProvider() *istiomeshv1alpha1.MeshConfig_ExtensionProvider
GetExtensionProvider Returns the Istio MeshConfig ExtensionProvider for Kuadrant