Unverified Commit 5ea6c176 authored by Kinara Shah's avatar Kinara Shah Committed by GitHub
Browse files

Merge pull request #29741 from kinarashah/24rc2

[2.4] update rke and ui tag
parents 6ab3cb45 9581fd62
Showing with 72 additions and 11 deletions
+72 -11
......@@ -84,11 +84,11 @@ require (
github.com/rancher/norman v0.0.0-20200806175025-f974dbfb2734
github.com/rancher/rdns-server v0.0.0-20180802070304-bf662911db6a
github.com/rancher/remotedialer v0.2.6-0.20200401224317-04cc22157b83
github.com/rancher/rke v1.1.11-rc1
github.com/rancher/rke v1.1.11-rc2
github.com/rancher/security-scan v0.1.7-0.20200222041501-f7377f127168
github.com/rancher/steve v0.0.0-20200522224200-dc9f969673f8
github.com/rancher/system-upgrade-controller v0.4.1-0.20200326220202-4655d4a551bd
github.com/rancher/types v0.0.0-20200918184036-e1dd38de6b4a
github.com/rancher/types v0.0.0-20201022171446-1df760cc0093
github.com/rancher/wrangler v0.5.4-0.20200604212251-fc9dde4243fc
github.com/rancher/wrangler-api v0.5.1-0.20200326194427-c13310506d04
github.com/robfig/cron v1.1.0
......
......@@ -869,6 +869,8 @@ github.com/rancher/remotedialer v0.2.6-0.20200401224317-04cc22157b83/go.mod h1:d
github.com/rancher/rke v1.1.5-rc3/go.mod h1:Vs49ny2u80SAQwbsCf0RUjixT2aTOj6rZWwQKcpE37c=
github.com/rancher/rke v1.1.11-rc1 h1:dI3GVGyQh30y0EgnGA5I8U7bTkkip6T+ccg5GKRG6cE=
github.com/rancher/rke v1.1.11-rc1/go.mod h1:ixdG4yOKf6yJxmj/wqHJniMHOgParBzS1cQ9u3Mq4no=
github.com/rancher/rke v1.1.11-rc2 h1:OS0OJ+U/DMJur1pcQWSFLs5Uw0bwFYugdv0Rl7QhBiI=
github.com/rancher/rke v1.1.11-rc2/go.mod h1:f/nPJmOVauewn5o8tPbGBVmaQpLmghYqksmzsmBOltI=
github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde h1:+gd9up4jLeFeuNC5bHn7qfRXZO9WKtBe8b4vhucg9lg=
github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde/go.mod h1:Bp1IBnlwVB1EqRfSKecoPyf+1Wjh8zykMjlq4vJJhxY=
github.com/rancher/security-scan v0.1.7-0.20200222041501-f7377f127168 h1:SIshhsz0O71FYyyDmjUmbFGvmgp4ASm8J1zmhMK/UG0=
......@@ -880,6 +882,8 @@ github.com/rancher/system-upgrade-controller v0.4.1-0.20200326220202-4655d4a551b
github.com/rancher/types v0.0.0-20200723224053-ae84b42a4797/go.mod h1:HX+ryuo/4a4OtbjPzaCvXWL7nAk5sQN5dP9XQl6iH78=
github.com/rancher/types v0.0.0-20200918184036-e1dd38de6b4a h1:yQR8pa4MhvRWXyLTLVTsW8N8cO6/JcvNWmO9JjMcmqk=
github.com/rancher/types v0.0.0-20200918184036-e1dd38de6b4a/go.mod h1:HX+ryuo/4a4OtbjPzaCvXWL7nAk5sQN5dP9XQl6iH78=
github.com/rancher/types v0.0.0-20201022171446-1df760cc0093 h1:VlEMx5Oj7JFJy0nhqXbN7lStq0O6DhkI0z4MmLa0AXE=
github.com/rancher/types v0.0.0-20201022171446-1df760cc0093/go.mod h1:HX+ryuo/4a4OtbjPzaCvXWL7nAk5sQN5dP9XQl6iH78=
github.com/rancher/wrangler v0.1.4/go.mod h1:EYP7cqpg42YqElaCm+U9ieSrGQKAXxUH5xsr+XGpWyE=
github.com/rancher/wrangler v0.5.4-0.20200326191509-4054411d9736/go.mod h1:L4HtjPeX8iqLgsxfJgz+JjKMcX2q3qbRXSeTlC/CSd4=
github.com/rancher/wrangler v0.5.4-0.20200520040055-b8d49179cfc8/go.mod h1:L4HtjPeX8iqLgsxfJgz+JjKMcX2q3qbRXSeTlC/CSd4=
......
......@@ -103,7 +103,7 @@ RUN curl -sLf ${!TINI_URL} > /usr/bin/tini && \
mkdir -p /var/lib/rancher-data/driver-metadata
ENV CATTLE_UI_PATH /usr/share/rancher/ui
ENV CATTLE_UI_VERSION 2.4.9-rc1
ENV CATTLE_UI_VERSION 2.4.9-rc2
ENV CATTLE_CLI_VERSION v2.4.7-rc1
# Please update the api-ui-version in pkg/settings/settings.go when updating the version here.
......
......@@ -62,6 +62,9 @@ type ingressOptions struct {
AlpineImage string
IngressImage string
IngressBackend string
HTTPPort int
HTTPSPort int
NetworkMode string
UpdateStrategy *appsv1.DaemonSetUpdateStrategy
}
......@@ -565,6 +568,9 @@ func (c *Cluster) deployIngress(ctx context.Context, data map[string]interface{}
ExtraEnvs: c.Ingress.ExtraEnvs,
ExtraVolumes: c.Ingress.ExtraVolumes,
ExtraVolumeMounts: c.Ingress.ExtraVolumeMounts,
HTTPPort: c.Ingress.HTTPPort,
HTTPSPort: c.Ingress.HTTPSPort,
NetworkMode: c.Ingress.NetworkMode,
UpdateStrategy: &appsv1.DaemonSetUpdateStrategy{
Type: c.Ingress.UpdateStrategy.Strategy,
RollingUpdate: c.Ingress.UpdateStrategy.RollingUpdate,
......
......@@ -514,6 +514,9 @@ func parseIngressConfig(clusterFile string, rkeConfig *v3.RancherKubernetesEngin
if err := parseIngressExtraVolumeMounts(ingressMap, rkeConfig); err != nil {
return err
}
if err := parseIngressDefaults(ingressMap, rkeConfig); err != nil {
return err
}
return nil
}
......@@ -598,6 +601,21 @@ func parseIngressExtraVolumeMounts(ingressMap map[string]interface{}, rkeConfig
return nil
}
func parseIngressDefaults(ingressMap map[string]interface{}, rkeConfig *v3.RancherKubernetesEngineConfig) error {
// Setting up default behaviour so as to not catch out
// existing users who use new version of RKE
if _, ok := ingressMap["network_mode"]; !ok {
rkeConfig.Ingress.NetworkMode = DefaultNetworkMode
}
if _, ok := ingressMap["http_port"]; !ok {
rkeConfig.Ingress.HTTPPort = DefaultHTTPPort
}
if _, ok := ingressMap["https_port"]; !ok {
rkeConfig.Ingress.HTTPSPort = DefaultHTTPSPort
}
return nil
}
func parseNodeDrainInput(clusterFile string, rkeConfig *v3.RancherKubernetesEngineConfig) error {
// setting some defaults here because for these fields there's no way of differentiating between user provided null value vs golang setting it to null during unmarshal
if rkeConfig.UpgradeStrategy == nil || rkeConfig.UpgradeStrategy.DrainInput == nil {
......
......@@ -89,6 +89,9 @@ const (
DefaultMaxUnavailableControlplane = "1"
DefaultNodeDrainTimeout = 120
DefaultNodeDrainGracePeriod = -1
DefaultHTTPPort = 80
DefaultHTTPSPort = 443
DefaultNetworkMode = "hostNetwork"
)
var (
......
......@@ -177,6 +177,24 @@ func validateIngressOptions(c *Cluster) error {
return fmt.Errorf("DNSPolicy %s was not a valid DNS Policy", c.Ingress.DNSPolicy)
}
if c.Ingress.NetworkMode == "hostPort" {
if !(c.Ingress.HTTPPort >= 0 && c.Ingress.HTTPPort <= 65535) {
return fmt.Errorf("https port is invalid. Needs to be within 0 to 65535")
}
if !(c.Ingress.HTTPPort >= 0 && c.Ingress.HTTPPort <= 65535) {
return fmt.Errorf("http port is invalid. Needs to be within 0 to 65535")
}
if c.Ingress.HTTPPort != 0 && c.Ingress.HTTPSPort != 0 &&
(c.Ingress.HTTPPort == c.Ingress.HTTPSPort) {
return fmt.Errorf("http and https ports need to be different")
}
}
if !(c.Ingress.NetworkMode == "" ||
c.Ingress.NetworkMode == "hostNetwork" || c.Ingress.NetworkMode == "hostPort" ||
c.Ingress.NetworkMode == "none") {
return fmt.Errorf("NetworkMode %s was not a valid network mode", c.Ingress.NetworkMode)
}
return nil
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -438,6 +438,12 @@ type IngressConfig struct {
ExtraVolumeMounts []ExtraVolumeMount `yaml:"extra_volume_mounts" json:"extraVolumeMounts,omitempty" norman:"type=array[json]"`
// nginx daemonset upgrade strategy
UpdateStrategy *DaemonSetUpdateStrategy `yaml:"update_strategy" json:"updateStrategy,omitempty"`
// Http port for ingress controller daemonset
HTTPPort int `yaml:"http_port" json:"httpPort,omitempty"`
// Https port for ingress controller daemonset
HTTPSPort int `yaml:"https_port" json:"httpsPort,omitempty"`
// NetworkMode selector for ingress controller pods. Default is HostNetwork
NetworkMode string `yaml:"network_mode" json:"networkMode,omitempty"`
}
type ExtraEnv struct {
......
......@@ -7,6 +7,9 @@ const (
IngressConfigFieldExtraEnvs = "extraEnvs"
IngressConfigFieldExtraVolumeMounts = "extraVolumeMounts"
IngressConfigFieldExtraVolumes = "extraVolumes"
IngressConfigFieldHTTPPort = "httpPort"
IngressConfigFieldHTTPSPort = "httpsPort"
IngressConfigFieldNetworkMode = "networkMode"
IngressConfigFieldNodeSelector = "nodeSelector"
IngressConfigFieldOptions = "options"
IngressConfigFieldProvider = "provider"
......@@ -19,6 +22,9 @@ type IngressConfig struct {
ExtraEnvs []interface{} `json:"extraEnvs,omitempty" yaml:"extraEnvs,omitempty"`
ExtraVolumeMounts []interface{} `json:"extraVolumeMounts,omitempty" yaml:"extraVolumeMounts,omitempty"`
ExtraVolumes []interface{} `json:"extraVolumes,omitempty" yaml:"extraVolumes,omitempty"`
HTTPPort int64 `json:"httpPort,omitempty" yaml:"httpPort,omitempty"`
HTTPSPort int64 `json:"httpsPort,omitempty" yaml:"httpsPort,omitempty"`
NetworkMode string `json:"networkMode,omitempty" yaml:"networkMode,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`
Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"`
Provider string `json:"provider,omitempty" yaml:"provider,omitempty"`
......
......@@ -327,14 +327,14 @@ github.com/opencontainers/go-digest
# github.com/opencontainers/image-spec v1.0.1
github.com/opencontainers/image-spec/specs-go
github.com/opencontainers/image-spec/specs-go/v1
# github.com/opencontainers/runc v1.0.0-rc10
github.com/opencontainers/runc/libcontainer/system
github.com/opencontainers/runc/libcontainer/user
# github.com/oracle/oci-go-sdk v18.0.0+incompatible
github.com/oracle/oci-go-sdk/common
github.com/oracle/oci-go-sdk/containerengine
github.com/oracle/oci-go-sdk/core
github.com/oracle/oci-go-sdk/identity
# github.com/opencontainers/runc v1.0.0-rc10
github.com/opencontainers/runc/libcontainer/system
github.com/opencontainers/runc/libcontainer/user
# github.com/pborman/uuid v1.2.0
github.com/pborman/uuid
# github.com/pelletier/go-toml v1.2.0
......@@ -443,7 +443,7 @@ github.com/rancher/rdns-server/model
# github.com/rancher/remotedialer v0.2.6-0.20200401224317-04cc22157b83
github.com/rancher/remotedialer
github.com/rancher/remotedialer/metrics
# github.com/rancher/rke v1.1.11-rc1
# github.com/rancher/rke v1.1.11-rc2
github.com/rancher/rke/addons
github.com/rancher/rke/authz
github.com/rancher/rke/cloudprovider
......@@ -510,7 +510,7 @@ github.com/rancher/system-upgrade-controller/pkg/apis/upgrade.cattle.io/v1
github.com/rancher/system-upgrade-controller/pkg/condition
github.com/rancher/system-upgrade-controller/pkg/generated/clientset/versioned/scheme
github.com/rancher/system-upgrade-controller/pkg/generated/clientset/versioned/typed/upgrade.cattle.io/v1
# github.com/rancher/types v0.0.0-20200918184036-e1dd38de6b4a
# github.com/rancher/types v0.0.0-20201022171446-1df760cc0093
github.com/rancher/types/apis/apiregistration.k8s.io/v1
github.com/rancher/types/apis/apps/v1
github.com/rancher/types/apis/autoscaling/v2beta2
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment