Documentation
¶
Index ¶
- Constants
- Variables
- func AddComponentLabel(originalLabels map[string]string, componentName string) map[string]string
- func GetOwnerRefs(owner client.Object, controller bool) []metav1.OwnerReference
- func GetTopLevelLabels() map[string]string
- func HasTopLevelLabels(objLabels map[string]string) bool
- func Namespace(conf *config.Config, nsName string) *corev1.Namespace
- func WithPreferSystemNodes(spec *corev1.PodSpec) *corev1.PodSpec
- type ExternalDnsConfig
- type IdentityType
- type InputExternalDNSConfig
- type NginxIngressConfig
- type NginxIngressVersion
- type NginxResources
- type Provider
- type ResourceType
- type ServiceConfig
Constants ¶
const (
IngressControllerComponentName = "ingress-controller"
)
Variables ¶
var (
LatestNginxVersion = nginxVersionsAscending[len(nginxVersionsAscending)-1]
)
var OldExternalDnsGks []schema.GroupKind
OldExternalDnsGks is a slice of GroupKinds that were previously used by ExternalDns. If the manifests used by app routing's external dns removes a GroupKind be sure to add it here to clean it up
Functions ¶
func AddComponentLabel ¶ added in v0.2.2
func GetOwnerRefs ¶ added in v0.1.0
func GetOwnerRefs(owner client.Object, controller bool) []metav1.OwnerReference
GetOwnerRefs returns the owner references for the given object
func GetTopLevelLabels ¶ added in v0.0.3
GetTopLevelLabels returns labels that every resource App Routing manages have
func HasTopLevelLabels ¶ added in v0.0.6
HasTopLevelLabels returns true if the given labels match the top level labels
Types ¶
type ExternalDnsConfig ¶ added in v0.0.2
type ExternalDnsConfig struct {
// contains filtered or unexported fields
}
ExternalDnsConfig contains externaldns resources based on input configuration
func NewExternalDNSConfig ¶ added in v0.2.5
func NewExternalDNSConfig(conf *config.Config, inputConfig InputExternalDNSConfig) (*ExternalDnsConfig, error)
func (*ExternalDnsConfig) DnsZoneResourceIds ¶ added in v0.2.5
func (e *ExternalDnsConfig) DnsZoneResourceIds() []string
func (*ExternalDnsConfig) Labels ¶ added in v0.2.5
func (e *ExternalDnsConfig) Labels() map[string]string
func (*ExternalDnsConfig) Resources ¶ added in v0.2.5
func (e *ExternalDnsConfig) Resources() []client.Object
type IdentityType ¶ added in v0.2.5
type IdentityType int
const ( IdentityTypeMSI IdentityType = iota IdentityTypeWorkloadIdentity )
type InputExternalDNSConfig ¶ added in v0.2.5
type InputExternalDNSConfig struct {
TenantId, ClientId, InputServiceAccount, Namespace, InputResourceName string
// Provider is specified when an InputConfig is coming from the MC External DNS Reconciler, since no zones may be provided for the clean case
Provider *Provider
// IdentityType can either be MSI or WorkloadIdentity
IdentityType IdentityType
// ResourceTypes refer to the resource types that ExternalDNS should look for to configure DNS. These can include Gateway and/or Ingress
ResourceTypes map[ResourceType]struct{}
// DnsZoneresourceIDs contains the DNS zones that ExternalDNS will use to configure DNS
DnsZoneresourceIDs []string
// Filters contains various filters that ExternalDNS will use to filter resources it scans for DNS configuration
Filters *v1alpha1.ExternalDNSFilters
// IsNamespaced is true if the ExternalDNS deployment should only scan for resources in the resource namespace, and false if it should scan all namespaces
IsNamespaced bool
}
InputExternalDNSConfig is the input configuration to generate ExternalDNSConfigs from the CRD or MC-level configuration
type NginxIngressConfig ¶ added in v0.0.2
type NginxIngressConfig struct {
Version *NginxIngressVersion
ControllerClass string // controller class which is equivalent to controller field of IngressClass
ResourceName string // name given to all resources
IcName string // IngressClass name
ServiceConfig *ServiceConfig // service config that specifies details about the LB, defaults if nil
ForceSSLRedirect bool // flag to sets all redirects to HTTPS if there is a default TLS certificate (requires DefaultSSLCertificate)
HTTPDisabled bool // flag to disable HTTP server
DefaultSSLCertificate string // namespace/name used to create SSL certificate for the default HTTPS server (catch-all)
DefaultBackendService string // namespace/name used to determine default backend service for / and /healthz endpoints
CustomHTTPErrors string // error codes passed to the configmap to configure nginx to send traffic with the specified headers to its defaultbackend service in case of error
MinReplicas int32
MaxReplicas int32
// TargetCPUUtilizationPercentage is the target average CPU utilization of the Ingress Controller
TargetCPUUtilizationPercentage int32
// Log format is the log format used by the Nginx Ingress Controller
// https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/
LogFormat string
EnableSSLPassthrough bool
}
NginxIngressConfig defines configuration options for required resources for an Ingress
func (*NginxIngressConfig) PodLabels ¶ added in v0.0.2
func (n *NginxIngressConfig) PodLabels() map[string]string
type NginxIngressVersion ¶ added in v0.2.5
type NginxIngressVersion struct {
// contains filtered or unexported fields
}
type NginxResources ¶ added in v0.1.0
type NginxResources struct {
Namespace *corev1.Namespace
IngressClass *netv1.IngressClass
ServiceAccount *corev1.ServiceAccount
ClusterRole *rbacv1.ClusterRole
Role *rbacv1.Role
ClusterRoleBinding *rbacv1.ClusterRoleBinding
RoleBinding *rbacv1.RoleBinding
Service *corev1.Service
PromService *corev1.Service
Deployment *appsv1.Deployment
ConfigMap *corev1.ConfigMap
HorizontalPodAutoscaler *autov1.HorizontalPodAutoscaler
PodDisruptionBudget *policyv1.PodDisruptionBudget
}
NginxResources is a struct that represents the Kubernetes resources that are created for the Nginx Ingress Controller. When these resources are acted upon by client-go, the fields here are updated since they are pointers to the actual resources.
func GetNginxResources ¶ added in v0.1.0
func GetNginxResources(conf *config.Config, ingressConfig *NginxIngressConfig) *NginxResources
func (*NginxResources) Objects ¶ added in v0.1.0
func (n *NginxResources) Objects() []client.Object
type ResourceType ¶ added in v0.2.5
type ResourceType int
const ( ResourceTypeIngress ResourceType = iota ResourceTypeGateway )
func (ResourceType) String ¶ added in v0.2.5
func (rt ResourceType) String() string
type ServiceConfig ¶ added in v0.0.2
ServiceConfig defines configuration options for required resources for a Service that goes with an Ingress