Documentation
¶
Overview ¶
Package resources holds simple functions for synthesizing child resources from a Route resource and any relevant Route controller configuration.
Index ¶
- Variables
- func IsClusterLocalService(svc *corev1.Service) bool
- func MakeACMEIngressPaths(acmeChallenges []netv1alpha1.HTTP01Challenge, domains sets.Set[string]) ([]netv1alpha1.HTTPIngressPath, []string)
- func MakeCertificate(owner kmeta.OwnerRefableAccessor, ownerLabelKey string, dnsName string, ...) *networkingv1alpha1.Certificate
- func MakeCertificates(route *v1.Route, domainTagMap map[string]string, certClass string, ...) []*networkingv1alpha1.Certificate
- func MakeClusterLocalCertificate(route *v1.Route, tag string, domains sets.Set[string], certClass string) *networkingv1alpha1.Certificate
- func MakeIngress(ctx context.Context, r *servingv1.Route, tc *traffic.Config, ...) (*netv1alpha1.Ingress, error)
- func MakeIngressTLS(cert *netv1alpha1.Certificate, hostNames []string) netv1alpha1.IngressTLS
- func MakeIngressWithRollout(ctx context.Context, r *servingv1.Route, tc *traffic.Config, ...) (*netv1alpha1.Ingress, error)
- func MakeK8sPlaceholderService(ctx context.Context, route *v1.Route, tagName string) (*corev1.Service, error)
- type ServicePair
Constants ¶
This section is empty.
Variables ¶
var ExcludedAnnotations = sets.New[string]( corev1.LastAppliedConfigAnnotation, netapi.CertificateClassAnnotationAltKey, netapi.IngressClassAnnotationAltKey, )
ExcludedAnnotations is the set of annotations that should not propagate to the Ingress or Certificate Resources
Functions ¶
func IsClusterLocalService ¶ added in v0.8.0
IsClusterLocalService returns whether a service is cluster local.
func MakeACMEIngressPaths ¶ added in v0.20.0
func MakeACMEIngressPaths(acmeChallenges []netv1alpha1.HTTP01Challenge, domains sets.Set[string]) ([]netv1alpha1.HTTPIngressPath, []string)
MakeACMEIngressPaths returns a set of netv1alpha1.HTTPIngressPath that can be used to perform ACME challenges.
func MakeCertificate ¶
func MakeCertificate(owner kmeta.OwnerRefableAccessor, ownerLabelKey string, dnsName string, certName string, certClass string, baseDomain string) *networkingv1alpha1.Certificate
MakeCertificate creates a Certificate, inheriting the certClass annotations from the owner, as well as the namespaces. If owner does not have a certClass, use the provided `certClass` parameter. baseDomain is the top level domain for the cert. It should be a suffix of dnsName.
func MakeCertificates ¶ added in v0.7.0
func MakeCertificates(route *v1.Route, domainTagMap map[string]string, certClass string, domain string) []*networkingv1alpha1.Certificate
MakeCertificates creates an array of Certificate for the Route to request TLS certificates. domainTagMap is an one-to-one mapping between domain and tag, for major domain (tag-less), the value is an empty string domain is the base domain to be used for the route. It should be a suffix of the domains in domainTagMap Returns one certificate for each domain
func MakeClusterLocalCertificate ¶ added in v0.41.0
func MakeClusterLocalCertificate(route *v1.Route, tag string, domains sets.Set[string], certClass string) *networkingv1alpha1.Certificate
MakeClusterLocalCertificate creates a Knative Certificate for cluster-local-domain-tls.
func MakeIngress ¶ added in v0.8.0
func MakeIngress( ctx context.Context, r *servingv1.Route, tc *traffic.Config, tls []netv1alpha1.IngressTLS, ingressClass string, acmeChallenges ...netv1alpha1.HTTP01Challenge, ) (*netv1alpha1.Ingress, error)
MakeIngress creates Ingress to set up routing rules. Such Ingress specifies which Hosts that it applies to, as well as the routing rules.
func MakeIngressTLS ¶ added in v0.7.0
func MakeIngressTLS(cert *netv1alpha1.Certificate, hostNames []string) netv1alpha1.IngressTLS
MakeIngressTLS creates IngressTLS to configure the ingress TLS.
func MakeIngressWithRollout ¶ added in v0.20.0
func MakeIngressWithRollout( ctx context.Context, r *servingv1.Route, tc *traffic.Config, ro *traffic.Rollout, tls []netv1alpha1.IngressTLS, ingressClass string, acmeChallenges ...netv1alpha1.HTTP01Challenge, ) (*netv1alpha1.Ingress, error)
MakeIngressWithRollout builds a KIngress object from the given parameters. When building the ingress the builder will take into the account the desired rollout state to split the traffic.
Types ¶
type ServicePair ¶ added in v0.26.0
func MakeK8sService ¶
func MakeK8sService(ctx context.Context, route *v1.Route, tagName string, ingress *netv1alpha1.Ingress, isPrivate bool) (*ServicePair, error)
MakeK8sService creates a Service that redirect to the loadbalancer specified in Ingress status. It's owned by the provided v1.Route.
Directories
¶
Path | Synopsis |
---|---|
Package labels holds simple functions for working with ObjectMeta labels.
|
Package labels holds simple functions for working with ObjectMeta labels. |
Package names holds simple functions for synthesizing resource names.
|
Package names holds simple functions for synthesizing resource names. |