diff --git a/cluster/addons.go b/cluster/addons.go index 6ff06f94..e45b7304 100644 --- a/cluster/addons.go +++ b/cluster/addons.go @@ -43,6 +43,11 @@ const ( KubeAPIAuthAppName = "kube-api-auth" CattleClusterAgentAppName = "cattle-cluster-agent" + CoreDNSPriorityClassNameKey = "coredns_priority_class_name" + CoreDNSAutoscalerPriorityClassNameKey = "coredns_autoscaler_priority_class_name" + KubeDNSPriorityClassNameKey = "kube_dns_priority_class_name" + KubeDNSAutoscalerPriorityClassNameKey = "kube_dns_autoscaler_priority_class_name" + CoreDNSProvider = "coredns" KubeDNSProvider = "kube-dns" Nodelocal = "nodelocal" @@ -55,75 +60,83 @@ const ( var DNSProviders = []string{KubeDNSProvider, CoreDNSProvider} type ingressOptions struct { - RBACConfig string - Options map[string]string - NodeSelector map[string]string - ExtraArgs map[string]string - ExtraEnvs []v3.ExtraEnv - ExtraVolumes []v3.ExtraVolume - ExtraVolumeMounts []v3.ExtraVolumeMount - DNSPolicy string - AlpineImage string - IngressImage string - IngressBackend string - HTTPPort int - HTTPSPort int - NetworkMode string - DefaultBackend bool - UpdateStrategy *appsv1.DaemonSetUpdateStrategy - Tolerations []v1.Toleration + RBACConfig string + Options map[string]string + NodeSelector map[string]string + ExtraArgs map[string]string + ExtraEnvs []v3.ExtraEnv + ExtraVolumes []v3.ExtraVolume + ExtraVolumeMounts []v3.ExtraVolumeMount + DNSPolicy string + AlpineImage string + IngressImage string + IngressBackend string + HTTPPort int + HTTPSPort int + NetworkMode string + DefaultBackend bool + UpdateStrategy *appsv1.DaemonSetUpdateStrategy + Tolerations []v1.Toleration + NginxIngressControllerPriorityClassName string + DefaultHTTPBackendPriorityClassName string } type MetricsServerOptions struct { - RBACConfig string - Options map[string]string - NodeSelector map[string]string - MetricsServerImage string - Version string - UpdateStrategy *appsv1.DeploymentStrategy - Replicas *int32 - Tolerations []v1.Toleration + RBACConfig string + Options map[string]string + NodeSelector map[string]string + MetricsServerImage string + Version string + UpdateStrategy *appsv1.DeploymentStrategy + Replicas *int32 + Tolerations []v1.Toleration + MetricsServerPriorityClassName string } type CoreDNSOptions struct { - RBACConfig string - CoreDNSImage string - CoreDNSAutoScalerImage string - ClusterDomain string - ClusterDNSServer string - ReverseCIDRs []string - UpstreamNameservers []string - NodeSelector map[string]string - UpdateStrategy *appsv1.DeploymentStrategy - LinearAutoscalerParams string - Tolerations []v1.Toleration + RBACConfig string + CoreDNSImage string + CoreDNSAutoScalerImage string + ClusterDomain string + ClusterDNSServer string + ReverseCIDRs []string + UpstreamNameservers []string + NodeSelector map[string]string + UpdateStrategy *appsv1.DeploymentStrategy + LinearAutoscalerParams string + Tolerations []v1.Toleration + CoreDNSPriorityClassName string + CoreDNSAutoscalerPriorityClassName string } type KubeDNSOptions struct { - RBACConfig string - KubeDNSImage string - DNSMasqImage string - KubeDNSAutoScalerImage string - KubeDNSSidecarImage string - ClusterDomain string - ClusterDNSServer string - ReverseCIDRs []string - UpstreamNameservers []string - StubDomains map[string][]string - NodeSelector map[string]string - UpdateStrategy *appsv1.DeploymentStrategy - LinearAutoscalerParams string - Tolerations []v1.Toleration + RBACConfig string + KubeDNSImage string + DNSMasqImage string + KubeDNSAutoScalerImage string + KubeDNSSidecarImage string + ClusterDomain string + ClusterDNSServer string + ReverseCIDRs []string + UpstreamNameservers []string + StubDomains map[string][]string + NodeSelector map[string]string + UpdateStrategy *appsv1.DeploymentStrategy + LinearAutoscalerParams string + Tolerations []v1.Toleration + KubeDNSPriorityClassName string + KubeDNSAutoscalerPriorityClassName string } type NodelocalOptions struct { - RBACConfig string - NodelocalImage string - ClusterDomain string - ClusterDNSServer string - IPAddress string - NodeSelector map[string]string - UpdateStrategy *appsv1.DaemonSetUpdateStrategy + RBACConfig string + NodelocalImage string + ClusterDomain string + ClusterDNSServer string + IPAddress string + NodeSelector map[string]string + UpdateStrategy *appsv1.DaemonSetUpdateStrategy + NodeLocalDNSPriorityClassName string } type addonError struct { @@ -331,7 +344,9 @@ func (c *Cluster) deployKubeDNS(ctx context.Context, data map[string]interface{} Type: c.DNS.UpdateStrategy.Strategy, RollingUpdate: c.DNS.UpdateStrategy.RollingUpdate, }, - Tolerations: c.DNS.Tolerations, + Tolerations: c.DNS.Tolerations, + KubeDNSPriorityClassName: c.DNS.Options[KubeDNSPriorityClassNameKey], + KubeDNSAutoscalerPriorityClassName: c.DNS.Options[KubeDNSAutoscalerPriorityClassNameKey], } linearModeBytes, err := json.Marshal(c.DNS.LinearAutoscalerParams) if err != nil { @@ -368,7 +383,9 @@ func (c *Cluster) deployCoreDNS(ctx context.Context, data map[string]interface{} Type: c.DNS.UpdateStrategy.Strategy, RollingUpdate: c.DNS.UpdateStrategy.RollingUpdate, }, - Tolerations: c.DNS.Tolerations, + Tolerations: c.DNS.Tolerations, + CoreDNSPriorityClassName: c.DNS.Options[CoreDNSPriorityClassNameKey], + CoreDNSAutoscalerPriorityClassName: c.DNS.Options[CoreDNSAutoscalerPriorityClassNameKey], } linearModeBytes, err := json.Marshal(c.DNS.LinearAutoscalerParams) if err != nil { @@ -422,8 +439,9 @@ func (c *Cluster) deployMetricServer(ctx context.Context, data map[string]interf Type: c.Monitoring.UpdateStrategy.Strategy, RollingUpdate: c.Monitoring.UpdateStrategy.RollingUpdate, }, - Replicas: c.Monitoring.Replicas, - Tolerations: c.Monitoring.Tolerations, + Replicas: c.Monitoring.Replicas, + Tolerations: c.Monitoring.Tolerations, + MetricsServerPriorityClassName: c.Monitoring.MetricsServerPriorityClassName, } tmplt, err := templates.GetVersionedTemplates(kdm.MetricsServer, data, c.Version) if err != nil { @@ -587,7 +605,9 @@ func (c *Cluster) deployIngress(ctx context.Context, data map[string]interface{} Type: c.Ingress.UpdateStrategy.Strategy, RollingUpdate: c.Ingress.UpdateStrategy.RollingUpdate, }, - Tolerations: c.Ingress.Tolerations, + Tolerations: c.Ingress.Tolerations, + NginxIngressControllerPriorityClassName: c.Ingress.NginxIngressControllerPriorityClassName, + DefaultHTTPBackendPriorityClassName: c.Ingress.DefaultHTTPBackendPriorityClassName, } // since nginx ingress controller 0.16.0, it can be run as non-root and doesn't require privileged anymore. // So we can use securityContext instead of setting privileges via initContainer. @@ -716,12 +736,13 @@ func (c *Cluster) deployDNS(ctx context.Context, data map[string]interface{}) er func (c *Cluster) deployNodelocal(ctx context.Context, data map[string]interface{}) error { log.Infof(ctx, "[dns] Setting up %s", Nodelocal) NodelocalConfig := NodelocalOptions{ - NodelocalImage: c.SystemImages.Nodelocal, - RBACConfig: c.Authorization.Mode, - ClusterDomain: c.ClusterDomain, - ClusterDNSServer: c.ClusterDNSServer, - IPAddress: c.DNS.Nodelocal.IPAddress, - NodeSelector: c.DNS.Nodelocal.NodeSelector, + NodelocalImage: c.SystemImages.Nodelocal, + RBACConfig: c.Authorization.Mode, + ClusterDomain: c.ClusterDomain, + ClusterDNSServer: c.ClusterDNSServer, + IPAddress: c.DNS.Nodelocal.IPAddress, + NodeSelector: c.DNS.Nodelocal.NodeSelector, + NodeLocalDNSPriorityClassName: c.DNS.Nodelocal.NodeLocalDNSPriorityClassName, } if c.DNS.Nodelocal.UpdateStrategy != nil { NodelocalConfig.UpdateStrategy = &appsv1.DaemonSetUpdateStrategy{ diff --git a/cluster/defaults.go b/cluster/defaults.go index 6dc0ea31..db2d2c1d 100644 --- a/cluster/defaults.go +++ b/cluster/defaults.go @@ -557,6 +557,10 @@ func (c *Cluster) setClusterDNSDefaults() error { } c.DNS.Provider = ClusterDNSProvider logrus.Debugf("DNS provider set to [%s]", ClusterDNSProvider) + if c.DNS.Options == nil { + // don't break if the user didn't define options + c.DNS.Options = make(map[string]string) + } return nil } diff --git a/cluster/network.go b/cluster/network.go index 6329f1b7..27ce0145 100644 --- a/cluster/network.go +++ b/cluster/network.go @@ -53,13 +53,16 @@ const ( // FlannelBackendPort must be 4789 if using VxLan mode in the cluster with Windows nodes FlannelBackendPort = "flannel_backend_port" // FlannelBackendVxLanNetworkIdentify should be greater than or equal to 4096 if using VxLan mode in the cluster with Windows nodes - FlannelBackendVxLanNetworkIdentify = "flannel_backend_vni" + FlannelBackendVxLanNetworkIdentify = "flannel_backend_vni" + KubeFlannelPriorityClassNameKeyName = "kube_flannel_priority_class_name" - CalicoNetworkPlugin = "calico" - CalicoNodeLabel = "calico-node" - CalicoControllerLabel = "calico-kube-controllers" - CalicoCloudProvider = "calico_cloud_provider" - CalicoFlexVolPluginDirectory = "calico_flex_volume_plugin_dir" + CalicoNetworkPlugin = "calico" + CalicoNodeLabel = "calico-node" + CalicoControllerLabel = "calico-kube-controllers" + CalicoCloudProvider = "calico_cloud_provider" + CalicoFlexVolPluginDirectory = "calico_flex_volume_plugin_dir" + CalicoNodePriorityClassNameKeyName = "calico_node_priority_class_name" + CalicoKubeControllersPriorityClassNameKeyName = "calico_kube_controllers_priority_class_name" CanalNetworkPlugin = "canal" CanalIface = "canal_iface" @@ -69,9 +72,11 @@ const ( // CanalFlannelBackendVxLanNetworkIdentify should be greater than or equal to 4096 if using Flannel VxLan mode in the cluster with Windows nodes CanalFlannelBackendVxLanNetworkIdentify = "canal_flannel_backend_vni" CanalFlexVolPluginDirectory = "canal_flex_volume_plugin_dir" + CanalPriorityClassNameKeyName = "canal_priority_class_name" - WeaveNetworkPlugin = "weave" - WeaveNetworkAppName = "weave-net" + WeaveNetworkPlugin = "weave" + WeaveNetworkAppName = "weave-net" + WeaveNetPriorityClassNameKeyName = "weave_net_priority_class_name" AciNetworkPlugin = "aci" AciOVSMemoryLimit = "aci_ovs_memory_limit" @@ -168,97 +173,102 @@ const ( Calicoctl = "Calicoctl" - FlannelInterface = "FlannelInterface" - FlannelBackend = "FlannelBackend" - CanalInterface = "CanalInterface" - FlexVolPluginDir = "FlexVolPluginDir" - WeavePassword = "WeavePassword" - MTU = "MTU" - RBACConfig = "RBACConfig" - ClusterVersion = "ClusterVersion" - SystemIdentifier = "SystemIdentifier" - ApicHosts = "ApicHosts" - Token = "Token" - ApicUserName = "ApicUserName" - ApicUserKey = "ApicUserKey" - ApicUserCrt = "ApicUserCrt" - ApicRefreshTime = "ApicRefreshTime" - VmmDomain = "VmmDomain" - VmmController = "VmmController" - EncapType = "EncapType" - McastRangeStart = "McastRangeStart" - McastRangeEnd = "McastRangeEnd" - AEP = "AEP" - VRFName = "VRFName" - VRFTenant = "VRFTenant" - L3Out = "L3Out" - L3OutExternalNetworks = "L3OutExternalNetworks" - DynamicExternalSubnet = "DynamicExternalSubnet" - StaticExternalSubnet = "StaticExternalSubnet" - ServiceGraphSubnet = "ServiceGraphSubnet" - KubeAPIVlan = "KubeAPIVlan" - ServiceVlan = "ServiceVlan" - InfraVlan = "InfraVlan" - ImagePullPolicy = "ImagePullPolicy" - ImagePullSecret = "ImagePullSecret" - Tenant = "Tenant" - ServiceMonitorInterval = "ServiceMonitorInterval" - PBRTrackingNonSnat = "PBRTrackingNonSnat" - InstallIstio = "InstallIstio" - IstioProfile = "IstioProfile" - DropLogEnable = "DropLogEnable" - ControllerLogLevel = "ControllerLogLevel" - HostAgentLogLevel = "HostAgentLogLevel" - OpflexAgentLogLevel = "OpflexAgentLogLevel" - AciCniDeployContainer = "AciCniDeployContainer" - AciHostContainer = "AciHostContainer" - AciOpflexContainer = "AciOpflexContainer" - AciMcastContainer = "AciMcastContainer" - AciOpenvSwitchContainer = "AciOpenvSwitchContainer" - AciControllerContainer = "AciControllerContainer" - AciGbpServerContainer = "AciGbpServerContainer" - AciOpflexServerContainer = "AciOpflexServerContainer" - StaticServiceIPStart = "StaticServiceIPStart" - StaticServiceIPEnd = "StaticServiceIPEnd" - PodGateway = "PodGateway" - PodIPStart = "PodIPStart" - PodIPEnd = "PodIPEnd" - NodeServiceIPStart = "NodeServiceIPStart" - NodeServiceIPEnd = "NodeServiceIPEnd" - ServiceIPStart = "ServiceIPStart" - ServiceIPEnd = "ServiceIPEnd" - UseAciCniPriorityClass = "UseAciCniPriorityClass" - NoPriorityClass = "NoPriorityClass" - MaxNodesSvcGraph = "MaxNodesSvcGraph" - SnatContractScope = "SnatContractScope" - PodSubnetChunkSize = "PodSubnetChunkSize" - EnableEndpointSlice = "EnableEndpointSlice" - SnatNamespace = "SnatNamespace" - EpRegistry = "EpRegistry" - OpflexMode = "OpflexMode" - SnatPortRangeStart = "SnatPortRangeStart" - SnatPortRangeEnd = "SnatPortRangeEnd" - SnatPortsPerNode = "SnatPortsPerNode" - OpflexClientSSL = "OpflexClientSSL" - UsePrivilegedContainer = "UsePrivilegedContainer" - UseHostNetnsVolume = "UseHostNetnsVolume" - UseOpflexServerVolume = "UseOpflexServerVolume" - KafkaBrokers = "KafkaBrokers" - KafkaClientCrt = "KafkaClientCrt" - KafkaClientKey = "KafkaClientKey" - SubnetDomainName = "SubnetDomainName" - CApic = "CApic" - UseAciAnywhereCRD = "UseAciAnywhereCRD" - OverlayVRFName = "OverlayVRFName" - GbpPodSubnet = "GbpPodSubnet" - RunGbpContainer = "RunGbpContainer" - RunOpflexServerContainer = "RunOpflexServerContainer" - OpflexServerPort = "OpflexServerPort" - OVSMemoryLimit = "OVSMemoryLimit" - NodeSubnet = "NodeSubnet" - NodeSelector = "NodeSelector" - UpdateStrategy = "UpdateStrategy" - Tolerations = "Tolerations" + FlannelInterface = "FlannelInterface" + FlannelBackend = "FlannelBackend" + KubeFlannelPriorityClassName = "KubeFlannelPriorityClassName" + CalicoNodePriorityClassName = "CalicoNodePriorityClassName" + CalicoKubeControllersPriorityClassName = "CalicoKubeControllersPriorityClassName" + CanalInterface = "CanalInterface" + CanalPriorityClassName = "CanalPriorityClassName" + FlexVolPluginDir = "FlexVolPluginDir" + WeavePassword = "WeavePassword" + WeaveNetPriorityClassName = "WeaveNetPriorityClassName" + MTU = "MTU" + RBACConfig = "RBACConfig" + ClusterVersion = "ClusterVersion" + SystemIdentifier = "SystemIdentifier" + ApicHosts = "ApicHosts" + Token = "Token" + ApicUserName = "ApicUserName" + ApicUserKey = "ApicUserKey" + ApicUserCrt = "ApicUserCrt" + ApicRefreshTime = "ApicRefreshTime" + VmmDomain = "VmmDomain" + VmmController = "VmmController" + EncapType = "EncapType" + McastRangeStart = "McastRangeStart" + McastRangeEnd = "McastRangeEnd" + AEP = "AEP" + VRFName = "VRFName" + VRFTenant = "VRFTenant" + L3Out = "L3Out" + L3OutExternalNetworks = "L3OutExternalNetworks" + DynamicExternalSubnet = "DynamicExternalSubnet" + StaticExternalSubnet = "StaticExternalSubnet" + ServiceGraphSubnet = "ServiceGraphSubnet" + KubeAPIVlan = "KubeAPIVlan" + ServiceVlan = "ServiceVlan" + InfraVlan = "InfraVlan" + ImagePullPolicy = "ImagePullPolicy" + ImagePullSecret = "ImagePullSecret" + Tenant = "Tenant" + ServiceMonitorInterval = "ServiceMonitorInterval" + PBRTrackingNonSnat = "PBRTrackingNonSnat" + InstallIstio = "InstallIstio" + IstioProfile = "IstioProfile" + DropLogEnable = "DropLogEnable" + ControllerLogLevel = "ControllerLogLevel" + HostAgentLogLevel = "HostAgentLogLevel" + OpflexAgentLogLevel = "OpflexAgentLogLevel" + AciCniDeployContainer = "AciCniDeployContainer" + AciHostContainer = "AciHostContainer" + AciOpflexContainer = "AciOpflexContainer" + AciMcastContainer = "AciMcastContainer" + AciOpenvSwitchContainer = "AciOpenvSwitchContainer" + AciControllerContainer = "AciControllerContainer" + AciGbpServerContainer = "AciGbpServerContainer" + AciOpflexServerContainer = "AciOpflexServerContainer" + StaticServiceIPStart = "StaticServiceIPStart" + StaticServiceIPEnd = "StaticServiceIPEnd" + PodGateway = "PodGateway" + PodIPStart = "PodIPStart" + PodIPEnd = "PodIPEnd" + NodeServiceIPStart = "NodeServiceIPStart" + NodeServiceIPEnd = "NodeServiceIPEnd" + ServiceIPStart = "ServiceIPStart" + ServiceIPEnd = "ServiceIPEnd" + UseAciCniPriorityClass = "UseAciCniPriorityClass" + NoPriorityClass = "NoPriorityClass" + MaxNodesSvcGraph = "MaxNodesSvcGraph" + SnatContractScope = "SnatContractScope" + PodSubnetChunkSize = "PodSubnetChunkSize" + EnableEndpointSlice = "EnableEndpointSlice" + SnatNamespace = "SnatNamespace" + EpRegistry = "EpRegistry" + OpflexMode = "OpflexMode" + SnatPortRangeStart = "SnatPortRangeStart" + SnatPortRangeEnd = "SnatPortRangeEnd" + SnatPortsPerNode = "SnatPortsPerNode" + OpflexClientSSL = "OpflexClientSSL" + UsePrivilegedContainer = "UsePrivilegedContainer" + UseHostNetnsVolume = "UseHostNetnsVolume" + UseOpflexServerVolume = "UseOpflexServerVolume" + KafkaBrokers = "KafkaBrokers" + KafkaClientCrt = "KafkaClientCrt" + KafkaClientKey = "KafkaClientKey" + SubnetDomainName = "SubnetDomainName" + CApic = "CApic" + UseAciAnywhereCRD = "UseAciAnywhereCRD" + OverlayVRFName = "OverlayVRFName" + GbpPodSubnet = "GbpPodSubnet" + RunGbpContainer = "RunGbpContainer" + RunOpflexServerContainer = "RunOpflexServerContainer" + OpflexServerPort = "OpflexServerPort" + OVSMemoryLimit = "OVSMemoryLimit" + NodeSubnet = "NodeSubnet" + NodeSelector = "NodeSelector" + UpdateStrategy = "UpdateStrategy" + Tolerations = "Tolerations" ) var EtcdPortList = []string{ @@ -328,6 +338,7 @@ func (c *Cluster) doFlannelDeploy(ctx context.Context, data map[string]interface Type: c.Network.UpdateStrategy.Strategy, RollingUpdate: c.Network.UpdateStrategy.RollingUpdate, }, + KubeFlannelPriorityClassName: c.Network.Options[KubeFlannelPriorityClassNameKeyName], } pluginYaml, err := c.getNetworkPluginManifest(flannelConfig, data) if err != nil { @@ -355,8 +366,10 @@ func (c *Cluster) doCalicoDeploy(ctx context.Context, data map[string]interface{ Type: c.Network.UpdateStrategy.Strategy, RollingUpdate: c.Network.UpdateStrategy.RollingUpdate, }, - FlexVolPluginDir: c.Network.Options[CalicoFlexVolPluginDirectory], - Tolerations: c.Network.Tolerations, + Tolerations: c.Network.Tolerations, + FlexVolPluginDir: c.Network.Options[CalicoFlexVolPluginDirectory], + CalicoNodePriorityClassName: c.Network.Options[CalicoNodePriorityClassNameKeyName], + CalicoKubeControllersPriorityClassName: c.Network.Options[CalicoKubeControllersPriorityClassNameKeyName], } pluginYaml, err := c.getNetworkPluginManifest(calicoConfig, data) if err != nil { @@ -401,8 +414,10 @@ func (c *Cluster) doCanalDeploy(ctx context.Context, data map[string]interface{} Type: c.Network.UpdateStrategy.Strategy, RollingUpdate: c.Network.UpdateStrategy.RollingUpdate, }, - FlexVolPluginDir: c.Network.Options[CanalFlexVolPluginDirectory], - Tolerations: c.Network.Tolerations, + Tolerations: c.Network.Tolerations, + FlexVolPluginDir: c.Network.Options[CanalFlexVolPluginDirectory], + CanalPriorityClassName: c.Network.Options[CanalPriorityClassNameKeyName], + CalicoKubeControllersPriorityClassName: c.Network.Options[CalicoKubeControllersPriorityClassNameKeyName], } pluginYaml, err := c.getNetworkPluginManifest(canalConfig, data) if err != nil { @@ -425,6 +440,7 @@ func (c *Cluster) doWeaveDeploy(ctx context.Context, data map[string]interface{} Type: c.Network.UpdateStrategy.Strategy, RollingUpdate: c.Network.UpdateStrategy.RollingUpdate, }, + WeaveNetPriorityClassName: c.Network.Options[WeaveNetPriorityClassNameKeyName], } pluginYaml, err := c.getNetworkPluginManifest(weaveConfig, data) if err != nil { diff --git a/types/rke_types.go b/types/rke_types.go index 27ebb6b9..8c27a119 100644 --- a/types/rke_types.go +++ b/types/rke_types.go @@ -421,7 +421,8 @@ type AuthzConfig struct { type IngressConfig struct { // Ingress controller type used by kubernetes Provider string `yaml:"provider" json:"provider,omitempty" norman:"default=nginx"` - // Ingress controller options + // These options are NOT for configuring Ingress's addon template. + // They are used for its ConfigMap options specifically. Options map[string]string `yaml:"options" json:"options,omitempty"` // NodeSelector key pair NodeSelector map[string]string `yaml:"node_selector" json:"nodeSelector,omitempty"` @@ -447,6 +448,10 @@ type IngressConfig struct { Tolerations []v1.Toleration `yaml:"tolerations" json:"tolerations,omitempty"` // Enable or disable nginx default-http-backend DefaultBackend *bool `yaml:"default_backend" json:"defaultBackend,omitempty" norman:"default=true"` + // Priority class name for Nginx-Ingress's "default-http-backend" deployment + DefaultHTTPBackendPriorityClassName string `yaml:"default_http_backend_priority_class_name" json:"defaultHttpBackendPriorityClassName,omitempty"` + // Priority class name for Nginx-Ingress's "nginx-ingress-controller" daemonset + NginxIngressControllerPriorityClassName string `yaml:"nginx_ingress_controller_priority_class_name" json:"nginxIngressControllerPriorityClassName,omitempty"` } type ExtraEnv struct { @@ -895,7 +900,8 @@ type GlobalAwsOpts struct { type MonitoringConfig struct { // Monitoring server provider Provider string `yaml:"provider" json:"provider,omitempty" norman:"default=metrics-server"` - // Metrics server options + // These options are NOT for configuring the Metrics-Server's addon template. + // They are used to pass command args to the metric-server's deployment containers specifically. Options map[string]string `yaml:"options" json:"options,omitempty"` // NodeSelector key pair NodeSelector map[string]string `yaml:"node_selector" json:"nodeSelector,omitempty"` @@ -905,6 +911,8 @@ type MonitoringConfig struct { Replicas *int32 `yaml:"replicas" json:"replicas,omitempty" norman:"default=1"` // Tolerations for Deployments Tolerations []v1.Toleration `yaml:"tolerations" json:"tolerations,omitempty"` + // Priority class name for Metrics-Server's "metrics-server" deployment + MetricsServerPriorityClassName string `yaml:"metrics_server_priority_class_name" json:"metricsServerPriorityClassName,omitempty"` } type RestoreConfig struct { @@ -921,6 +929,8 @@ type RotateCertificates struct { type DNSConfig struct { // DNS provider Provider string `yaml:"provider" json:"provider,omitempty"` + // DNS config options + Options map[string]string `yaml:"options" json:"options,omitempty"` // Upstream nameservers UpstreamNameservers []string `yaml:"upstreamnameservers" json:"upstreamnameservers,omitempty"` // ReverseCIDRs @@ -930,7 +940,7 @@ type DNSConfig struct { // NodeSelector key pair NodeSelector map[string]string `yaml:"node_selector" json:"nodeSelector,omitempty"` // Nodelocal DNS - Nodelocal *Nodelocal `yaml:"nodelocal" json:"nodelocal,omitempy"` + Nodelocal *Nodelocal `yaml:"nodelocal" json:"nodelocal,omitempty"` // Update strategy UpdateStrategy *DeploymentStrategy `yaml:"update_strategy" json:"updateStrategy,omitempty"` // Autoscaler fields to determine number of dns replicas @@ -941,11 +951,13 @@ type DNSConfig struct { type Nodelocal struct { // link-local IP for nodelocal DNS - IPAddress string `yaml:"ip_address" json:"ipAddress,omitempy"` + IPAddress string `yaml:"ip_address" json:"ipAddress,omitempty"` // Nodelocal DNS daemonset upgrade strategy UpdateStrategy *DaemonSetUpdateStrategy `yaml:"update_strategy" json:"updateStrategy,omitempty"` // NodeSelector key pair NodeSelector map[string]string `yaml:"node_selector" json:"nodeSelector,omitempty"` + // Priority class name for NodeLocal's "node-local-dns" daemonset + NodeLocalDNSPriorityClassName string `yaml:"node_local_dns_priority_class_name" json:"nodeLocalDnsPriorityClassName,omitempty"` } // LinearAutoscalerParams contains fields expected by the cluster-proportional-autoscaler https://github.com/kubernetes-incubator/cluster-proportional-autoscaler/blob/0c61e63fc81449abdd52315aa27179a17e5d1580/pkg/autoscaler/controller/linearcontroller/linear_controller.go#L50