Documentation
¶
Index ¶
- func ContainsString(list []string, target string) bool
- func ConvertRefConfigsV1ToV2(refConfig *dpv1alpha2.RefConfig) *dpv1alpha2.RefConfig
- func FilterAIProviderByNamespaces(namespaces []string) func(object *dpv1alpha4.AIProvider) bool
- func FilterAIRatelimitPolicyByNamespaces(namespaces []string) func(object *dpv1alpha3.AIRateLimitPolicy) bool
- func FilterAPIByNamespaces(namespaces []string) func(object *dpv1alpha3.API) bool
- func FilterAPIPolicyByNamespaces(namespaces []string) func(object *dpv1alpha4.APIPolicy) bool
- func FilterAuthenticationByNamespaces(namespaces []string) func(object *dpv1alpha2.Authentication) bool
- func FilterBackendByNamespaces(namespaces []string) func(object *dpv1alpha2.Backend) bool
- func FilterBackendJWTByNamespaces(namespaces []string) func(object *dpv1alpha1.BackendJWT) bool
- func FilterByNamespaces(namespaces []string) func(object k8client.Object) bool
- func FilterConfigMapByNamespaces(namespaces []string) func(object *corev1.ConfigMap) bool
- func FilterGQLRouteByNamespaces(namespaces []string) func(object *dpv1alpha2.GQLRoute) bool
- func FilterGRPCRouteByNamespaces(namespaces []string) func(object *gwapiv1.GRPCRoute) bool
- func FilterGatewayByNamespaces(namespaces []string) func(object *gwapiv1.Gateway) bool
- func FilterHTTPRouteByNamespaces(namespaces []string) func(object *gwapiv1.HTTPRoute) bool
- func FilterInterceptorServiceByNamespaces(namespaces []string) func(object *dpv1alpha1.InterceptorService) bool
- func FilterRateLimitPolicyByNamespaces(namespaces []string) func(object *dpv1alpha3.RateLimitPolicy) bool
- func FilterScopeByNamespaces(namespaces []string) func(object *dpv1alpha1.Scope) bool
- func FilterSecretByNamespaces(namespaces []string) func(object *corev1.Secret) bool
- func FilterTokenIssuerByNamespaces(namespaces []string) func(object *dpv1alpha1.TokenIssuer) bool
- func GetAIProvider(ctx context.Context, client k8client.Client, namespace string, ...) *dpv1alpha4.AIProvider
- func GetBackend(ctx context.Context, client k8client.Client, namespace string, ...) *dpv1alpha2.Backend
- func GetBackendJWT(ctx context.Context, client k8client.Client, ...) *dpv1alpha1.BackendJWT
- func GetDefaultHostNameForBackend(backend gwapiv1.HTTPBackendRef, defaultNamespace string) string
- func GetInterceptorService(ctx context.Context, client k8client.Client, namespace string, ...) *dpv1alpha1.InterceptorService
- func GetNamespace(namespace *gwapiv1.Namespace, defaultNamespace string) string
- func GetOperatorPodNamespace() string
- func GetPtrSlice[T any](inputSlice []T) []*T
- func GetResolvedBackend(ctx context.Context, client k8client.Client, ...) *dpv1alpha2.ResolvedBackend
- func GetResolvedBackendFromService(k8sService *corev1.Service, svcPort int) (*dpv1alpha2.ResolvedBackend, error)
- func GetResolvedMutualSSL(ctx context.Context, client k8client.Client, ...) error
- func GetService(ctx context.Context, client k8client.Client, namespace, serviceName string) (*corev1.Service, error)
- func GetSubscriptionToAPIIndexID(name string, version string) string
- func GroupPtr(name string) *gwapiv1.Group
- func KindPtr(name string) *gwapiv1.Kind
- func NamespacedName(obj k8client.Object) types.NamespacedName
- func PathMatchTypePtr(pType gwapiv1.PathMatchType) *gwapiv1.PathMatchType
- func ResolveAllmTLSCertificates(ctx context.Context, mutualSSL *dpv1alpha2.MutualSSLConfig, ...) ([]string, error)
- func ResolveAndAddBackendToMapping(ctx context.Context, client k8client.Client, ...)
- func ResolveCertificate(ctx context.Context, client k8client.Client, namespace string, ...) (string, error)
- func ResolveRef(ctx context.Context, client k8client.Client, api *dpv1alpha3.API, ...) error
- func RetrieveAPIList(k8sclient k8client.Client) ([]dpv1alpha3.API, error)
- func RetrieveNamespaceListOptions(namespaces []string) k8client.ListOptions
- func SelectPolicy[T any](policyUpOverride, policyUpDefault, policyDownOverride, policyDownDefault **T) *T
- func StringPtr(val string) *string
- func TieBreaker[T metav1.Object](k8sObjects []T) *T
- func UpdateCR(ctx context.Context, client k8client.Client, child metav1.Object) error
- func ValidateAndRetrieveNamespace(namespace *gwapiv1.Namespace, defaultNamespace string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
ContainsString checks whether a list contains a specific string. It returns true if the string is found in the list, otherwise false.
func ConvertRefConfigsV1ToV2 ¶
func ConvertRefConfigsV1ToV2(refConfig *dpv1alpha2.RefConfig) *dpv1alpha2.RefConfig
ConvertRefConfigsV1ToV2 converts RefConfig v2 to v1
func FilterAIProviderByNamespaces ¶
func FilterAIProviderByNamespaces(namespaces []string) func(object *dpv1alpha4.AIProvider) bool
FilterAIProviderByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterAIRatelimitPolicyByNamespaces ¶
func FilterAIRatelimitPolicyByNamespaces(namespaces []string) func(object *dpv1alpha3.AIRateLimitPolicy) bool
FilterAIRatelimitPolicyByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterAPIByNamespaces ¶
func FilterAPIByNamespaces(namespaces []string) func(object *dpv1alpha3.API) bool
FilterAPIByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterAPIPolicyByNamespaces ¶
func FilterAPIPolicyByNamespaces(namespaces []string) func(object *dpv1alpha4.APIPolicy) bool
FilterAPIPolicyByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterAuthenticationByNamespaces ¶
func FilterAuthenticationByNamespaces(namespaces []string) func(object *dpv1alpha2.Authentication) bool
FilterAuthenticationByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterBackendByNamespaces ¶
func FilterBackendByNamespaces(namespaces []string) func(object *dpv1alpha2.Backend) bool
FilterBackendByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterBackendJWTByNamespaces ¶
func FilterBackendJWTByNamespaces(namespaces []string) func(object *dpv1alpha1.BackendJWT) bool
FilterBackendJWTByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterByNamespaces ¶
FilterByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterConfigMapByNamespaces ¶
FilterConfigMapByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterGQLRouteByNamespaces ¶
func FilterGQLRouteByNamespaces(namespaces []string) func(object *dpv1alpha2.GQLRoute) bool
FilterGQLRouteByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterGRPCRouteByNamespaces ¶
FilterGRPCRouteByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterGatewayByNamespaces ¶
FilterGatewayByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterHTTPRouteByNamespaces ¶
FilterHTTPRouteBByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterInterceptorServiceByNamespaces ¶
func FilterInterceptorServiceByNamespaces(namespaces []string) func(object *dpv1alpha1.InterceptorService) bool
FilterInterceptorServiceByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterRateLimitPolicyByNamespaces ¶
func FilterRateLimitPolicyByNamespaces(namespaces []string) func(object *dpv1alpha3.RateLimitPolicy) bool
FilterRateLimitPolicyByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterScopeByNamespaces ¶
func FilterScopeByNamespaces(namespaces []string) func(object *dpv1alpha1.Scope) bool
FilterScopeByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterSecretByNamespaces ¶
FilterSecretByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func FilterTokenIssuerByNamespaces ¶
func FilterTokenIssuerByNamespaces(namespaces []string) func(object *dpv1alpha1.TokenIssuer) bool
FilterTokenIssuerByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func GetAIProvider ¶
func GetAIProvider(ctx context.Context, client k8client.Client, namespace string, aiProviderReference string, api *dpv1alpha3.API) *dpv1alpha4.AIProvider
GetAIProvider reads AIProvider when aiProviderReference is given
func GetBackend ¶
func GetBackend(ctx context.Context, client k8client.Client, namespace string, backendReference string, api *dpv1alpha3.API) *dpv1alpha2.Backend
GetBackend reads Backend when backendReference is given
func GetBackendJWT ¶
func GetBackendJWT(ctx context.Context, client k8client.Client, namespace, backendJWTReference string, api *dpv1alpha3.API) *dpv1alpha1.BackendJWT
GetBackendJWT reads BackendJWT when backendJWTReference is given
func GetDefaultHostNameForBackend ¶
func GetDefaultHostNameForBackend(backend gwapiv1.HTTPBackendRef, defaultNamespace string) string
GetDefaultHostNameForBackend returns the host in <backend.name>.<namespace> format
func GetInterceptorService ¶
func GetInterceptorService(ctx context.Context, client k8client.Client, namespace string, interceptorReference *dpv1alpha4.InterceptorReference, api *dpv1alpha3.API) *dpv1alpha1.InterceptorService
GetInterceptorService reads InterceptorService when interceptorReference is given
func GetNamespace ¶
GetNamespace reads namespace with a default value
func GetOperatorPodNamespace ¶
func GetOperatorPodNamespace() string
GetOperatorPodNamespace returns the namesapce of the operator pod
func GetPtrSlice ¶
func GetPtrSlice[T any](inputSlice []T) []*T
GetPtrSlice returns a slice which is also a slice containing pointers to the elements in the input slice.
func GetResolvedBackend ¶
func GetResolvedBackend(ctx context.Context, client k8client.Client, backendNamespacedName types.NamespacedName, api *dpv1alpha3.API) *dpv1alpha2.ResolvedBackend
GetResolvedBackend resolves backend TLS configurations.
func GetResolvedBackendFromService ¶
func GetResolvedBackendFromService(k8sService *corev1.Service, svcPort int) (*dpv1alpha2.ResolvedBackend, error)
GetResolvedBackendFromService converts a Kubernetes Service to a Resolved Backend.
func GetResolvedMutualSSL ¶
func GetResolvedMutualSSL(ctx context.Context, client k8client.Client, authentication dpv1alpha2.Authentication, resolvedMutualSSL *dpv1alpha2.MutualSSL) error
GetResolvedMutualSSL resolves mTLS related security configurations.
func GetService ¶
func GetService(ctx context.Context, client k8client.Client, namespace, serviceName string) (*corev1.Service, error)
GetService retrieves the Service object and returns its details.
func GetSubscriptionToAPIIndexID ¶
GetSubscriptionToAPIIndexID returns the id which can be used to list subscriptions related to a api.
func NamespacedName ¶
func NamespacedName(obj k8client.Object) types.NamespacedName
NamespacedName generates namespaced name for Kubernetes objects
func PathMatchTypePtr ¶
func PathMatchTypePtr(pType gwapiv1.PathMatchType) *gwapiv1.PathMatchType
PathMatchTypePtr returns a pointer to created v1beta1.PathMatchType object
func ResolveAllmTLSCertificates ¶
func ResolveAllmTLSCertificates(ctx context.Context, mutualSSL *dpv1alpha2.MutualSSLConfig, client k8client.Client, namespace string) ([]string, error)
ResolveAllmTLSCertificates resolves all mTLS certificates
func ResolveAndAddBackendToMapping ¶
func ResolveAndAddBackendToMapping(ctx context.Context, client k8client.Client, backendMapping map[string]*dpv1alpha2.ResolvedBackend, backendRef dpv1alpha1.BackendReference, interceptorServiceNamespace string, api *dpv1alpha3.API)
ResolveAndAddBackendToMapping resolves backend from reference and adds it to the backendMapping.
func ResolveCertificate ¶
func ResolveCertificate(ctx context.Context, client k8client.Client, namespace string, certificateInline *string, configMapRef *dpv1alpha2.RefConfig, secretRef *dpv1alpha2.RefConfig) (string, error)
ResolveCertificate reads the certificate from TLSConfig, first checks the certificateInline field, if no value then load the certificate from secretRef using util function called getSecretValue
func ResolveRef ¶
func ResolveRef(ctx context.Context, client k8client.Client, api *dpv1alpha3.API, namespacedName types.NamespacedName, isReplace bool, obj k8client.Object, opts ...k8client.GetOption) error
ResolveRef this function will return k8client object and update owner
func RetrieveAPIList ¶
func RetrieveAPIList(k8sclient k8client.Client) ([]dpv1alpha3.API, error)
RetrieveAPIList retrieves API list from the given kubernetes client
func RetrieveNamespaceListOptions ¶
func RetrieveNamespaceListOptions(namespaces []string) k8client.ListOptions
RetrieveNamespaceListOptions retrieve namespace list options for the given namespaces
func SelectPolicy ¶
func SelectPolicy[T any](policyUpOverride, policyUpDefault, policyDownOverride, policyDownDefault **T) *T
SelectPolicy selects the policy based on the policy override and default values
func TieBreaker ¶
TieBreaker breaks ties when multiple objects are present in a case only single object is expected. tie breaking logic is explained in https://gateway-api.sigs.k8s.io/geps/gep-713/?h=multiple+targetrefs#conflict-resolution
Types ¶
This section is empty.