Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Under no circumstances can this string change. It is for eternity. ProviderName = "cloudscale" AccessToken = "CLOUDSCALE_ACCESS_TOKEN" ApiUrl = "CLOUDSCALE_API_URL" ApiTimeout = "CLOUDSCALE_API_TIMEOUT" DefaultTimeout = time.Duration(20) * time.Second )
View Source
const ( // LoadBalancerUUID uniquely identifes the loadbalancer. This annotation // should not be provided by the customer, unless the adoption of an // existing load balancer is desired. // // In all other cases, this value is set by the CCM after creating the // load balancer, to ensure that we track it with a proper ID and not // a name that might change without our knowledge. LoadBalancerUUID = "k8s.cloudscale.ch/loadbalancer-uuid" // LoadBalancerConfigVersion is set by the CCM when it first handles a // service. It exists to allow future CCM changes and should not be // tampered with. Once set, it is not changed, unless there is an upgrade // path applied by the CCM. LoadBalancerConfigVersion = "k8s.cloudscale.ch/loadbalancer-config-version" // LoadBalancerName names the loadbalancer on creation, and renames it // later. Note that if the LoadBalancerUUID annotation exists, it takes // precedence over the name to match the load balancer. // // This annotation can be changed without downtime on an esablished // service, but it is not recommended. LoadBalancerName = "k8s.cloudscale.ch/loadbalancer-name" // LoadBalancerFlavor denotes the flavor used by the balancer. There is // currently only one flavor, lb-standard. // // This can currently not be changed and will cause an error if attempted. LoadBalancerFlavor = "k8s.cloudscale.ch/loadbalancer-flavor" // LoadBalancerZone defines the zone in which the load balancer is running. // This defaults to the zone of the Nodes (if there is only one). // // This can not be changed once the service is created. LoadBalancerZone = "k8s.cloudscale.ch/loadbalancer-zone" // LoadBalancerVIPAddresses defines the virtual IP addresses through which // incoming traffic is received. this defaults to an automatically assigned // public IPv4 and IPv6 address. // // If you want to use a specific private subnet instead, to load balance // inside your cluster, you have to specify the subnet the loadbalancer // should bind to, and optionally what IP address it should use (if you // don't want an automatically assigned one). // // The value of this option is a list of JSON objects, as documented here: // // https://www.cloudscale.ch/en/api/v1#vip_addresses-attribute-specification // // By default, an empty list is set (to get a public address pair). // // This can currently not be changed and will cause an error if attempted, // as the loadbalancer would have to be recreated, causing potential // downtime, and a release of any address it held. // // To change the address it is recommended to create a new service // resources instead. LoadBalancerVIPAddresses = "k8s.cloudscale.ch/loadbalancer-vip-addresses" // LoadBalancerFloatingIPs assigns the given Floating IPs to the // load balancer. The expected value is a list of addresses of the // Floating IPs in CIDR notation. For example: // // ["5.102.150.123/32", "2a06:c01::123/128"] // // If any Floating IP address is assigned to multiple services via this // annotation, the CCM will refuse to update the associated services, as // this is considered a serious configuration issue that has to first be // resolved by the operator. // // While the service being handled needs to have a parseable Floating IP // config, the services it is compared to for conflict detection do not. // // Such services are skipped during conflict detection with the goal // of limiting the impact of config parse errors to the service being // processed. // // Floating IPs already assigned to the loadbalancer, but no longer // present in the annotations, stay on the loadbalancer until another // service requests them. This is due to the fact that it is not possible // to unassign Floating IPs to point to nowhere. // // The Floating IPs are only assigned to the LoadBalancer once it has // been fully created. LoadBalancerFloatingIPs = "k8s.cloudscale.ch/loadbalancer-floating-ips" // LoadBalancerPoolAlgorithm defines the load balancing algorithm used // by the loadbalancer. See the API documentation for more information: // // https://www.cloudscale.ch/en/api/v1#pool-algorithms // // Defaults to `round_robin`. // // Changing this algorithm will on an established service causes downtime, // as all pools have to be recreated. LoadBalancerPoolAlgorithm = "k8s.cloudscale.ch/loadbalancer-pool-algorithm" // LoadBalancerPoolProtocol defines the protocol for all the pools of the // service. We are technically able to have different protocols for // different ports in a service, but as our options apart from `tcp` are // currently `proxy` and `proxyv2`, we go with Kubernetes's recommendation // to apply these protocols to all incoming connections the same way: // // https://kubernetes.io/docs/reference/networking/service-protocols/#protocol-proxy-special // // Supported protocols: // // https://www.cloudscale.ch/en/api/v1#pool-protocols // // An alternative approach might be to use the spec.ports.appService on the // service, with custom strings, should anyone require such a feature. // // Changing the pool protocol on an established service causes downtime, // as all pools have to be recreated. LoadBalancerPoolProtocol = "k8s.cloudscale.ch/loadbalancer-pool-protocol" // LoadBalancerHealthMonitorDelayS is the delay between two successive // checks, in seconds. Defaults to 2. // // Changing this annotation on an active service may lead to new // connections timing out while the monitor is updated. LoadBalancerHealthMonitorDelayS = "k8s.cloudscale.ch/loadbalancer-health-monitor-delay-s" // LoadBalancerHealthMonitorTimeoutS is the maximum time allowed for an // individual check, in seconds. Defaults to 1. // // Changing this annotation on an active service may lead to new // connections timing out while the monitor is updated. LoadBalancerHealthMonitorTimeoutS = "k8s.cloudscale.ch/loadbalancer-health-monitor-timeout-s" // LoadBalancerHealthMonitorDownThreshold is the number of the checks that // need to succeed before a pool member is considered up. Defaults to 2. LoadBalancerHealthMonitorUpThreshold = "k8s.cloudscale.ch/loadbalancer-health-monitor-up-threshold" // LoadBalancerHealthMonitorDownThreshold is the number of the checks that // need to fail before a pool member is considered down. Defaults to 3. // // Changing this annotation on an active service may lead to new // connections timing out while the monitor is updated. LoadBalancerHealthMonitorDownThreshold = "k8s.cloudscale.ch/loadbalancer-health-monitor-down-threshold" // LoadBalancerHealthMonitorType defines the approach the monitor takes. // (ping, tcp, http, https, tls-hello). // // See https://www.cloudscale.ch/en/api/v1#health-monitor-types // // Changing this annotation on an active service may lead to new // connections timing out while the monitor is recreated. LoadBalancerHealthMonitorType = "k8s.cloudscale.ch/loadbalancer-health-monitor-type" // LoadBalancerHealthMonitorHTTP configures details about the HTTP check. // // See https://www.cloudscale.ch/en/api/v1#http-attribute-specification // // Changing this annotation on an active service may lead to new // connections timing out while the monitor is updated. LoadBalancerHealthMonitorHTTP = "k8s.cloudscale.ch/loadbalancer-health-monitor-http" // LoadBalancerListenerProtocol defines the protocol used by the listening // port on the loadbalancer. Currently, only tcp is supported. // // See https://www.cloudscale.ch/en/api/v1#listener-protocols // // Changing this annotation on an established service may cause downtime // as the listeners are recreated. LoadBalancerListenerProtocol = "k8s.cloudscale.ch/loadbalancer-listener-protocol" // LoadBalancerListenerAllowedCIDRs is a JSON list of IP addresses that // should be allowed to access the load balancer. For example: // // * `[]` means that anyone is allowed to connect (default). // * `["1.1.1.1", "8.8.8.8"]` only the given addresses are allowed. // // Changing this annotation on an established service is considered safe. LoadBalancerListenerAllowedCIDRs = "k8s.cloudscale.ch/loadbalancer-listener-allowed-cidrs" // LoadBalancerListenerTimeoutClientDataMS denotes the milliseconds until // inactive client connections are dropped. // // Changing this annotation on an established service is considered safe. LoadBalancerListenerTimeoutClientDataMS = "k8s.cloudscale.ch/loadbalancer-timeout-client-data-ms" // LoadBalancerListenerTimeoutMemberConnectMS denotes the milliseconds // it should maximally take to connect to a pool member, before the // attempt is aborted. // // Changing this annotation on an established service is considered safe. LoadBalancerListenerTimeoutMemberConnectMS = "k8s.cloudscale.ch/loadbalancer-timeout-member-connect-ms" // LoadBalancerListenerTimeoutMemberDataMS denotes the milliseconds until // an inactive connection to a pool member is dropped. // // Changing this annotation on an established service is considered safe. LoadBalancerListenerTimeoutMemberDataMS = "k8s.cloudscale.ch/loadbalancer-timeout-member-data-ms" // LoadBalancerSubnetLimit is a JSON list of subnet UUIDs that the // loadbalancer should use. By default, all subnets of a node are used: // // * `[]` means that anyone is allowed to connect (default). // * `["0769b7cf-199b-4d42-9fbd-9ab3d11d08da"]` only bind to this subnet. // // If set, the limit causes nodes that do not have a matching subnet // to be ignored. If no nodes with matching subnets are found, an // error is returned. // // This is an advanced feature, useful if you have nodes that are in // multiple private subnets. LoadBalancerListenerAllowedSubnets = "k8s.cloudscale.ch/loadbalancer-listener-allowed-subnets" )
Annotations used by the loadbalancer integration of cloudscale_ccm. Those are pretty much set in stone, once they are in a release, so do not change them, unless you know what you are doing.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.