Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Add expectation of default NetworkingDaemonSet settings.
Browse files Browse the repository at this point in the history
Finish making default images constants

Add expectation of default NetworkingDaemonSet settings.
  • Loading branch information
davidmccormick committed Mar 22, 2018
1 parent 6eab075 commit de5fc2e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
16 changes: 11 additions & 5 deletions core/controlplane/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ const (

credentialsDir = "credentials"
userDataDir = "userdata"

NdsDefaultCalicoNodeImageTag = "v3.0.3"
NdsDefaultCalicoCniImageTag = "v2.0.1"
NdsDefaultFlannelImageTag = "v0.9.1"
NdsDefaultFlannelCniImageTag = "v0.3.0"
NdsDefaultTyphaImageTag = "v0.6.2"
)

func NewDefaultCluster() *Cluster {
Expand Down Expand Up @@ -117,11 +123,11 @@ func NewDefaultCluster() *Cluster {
NetworkingDaemonSets: NetworkingDaemonSets{
Enabled: false,
Typha: false,
CalicoNodeImage: model.Image{Repo: "quay.io/calico/node", Tag: "v3.0.3", RktPullDocker: false},
CalicoCniImage: model.Image{Repo: "quay.io/calico/cni", Tag: "v2.0.1", RktPullDocker: false},
FlannelImage: model.Image{Repo: "quay.io/coreos/flannel", Tag: "v0.9.1", RktPullDocker: false},
FlannelCniImage: model.Image{Repo: "quay.io/coreos/flannel-cni", Tag: "v0.3.0", RktPullDocker: false},
TyphaImage: model.Image{Repo: "quay.io/calico/typha", Tag: "v0.6.2", RktPullDocker: false},
CalicoNodeImage: model.Image{Repo: "quay.io/calico/node", Tag: NdsDefaultCalicoNodeImageTag, RktPullDocker: false},
CalicoCniImage: model.Image{Repo: "quay.io/calico/cni", Tag: NdsDefaultCalicoCniImageTag, RktPullDocker: false},
FlannelImage: model.Image{Repo: "quay.io/coreos/flannel", Tag: NdsDefaultFlannelImageTag, RktPullDocker: false},
FlannelCniImage: model.Image{Repo: "quay.io/coreos/flannel-cni", Tag: NdsDefaultFlannelCniImageTag, RktPullDocker: false},
TyphaImage: model.Image{Repo: "quay.io/calico/typha", Tag: NdsDefaultTyphaImageTag, RktPullDocker: false},
},
}

Expand Down
19 changes: 14 additions & 5 deletions test/integration/maincluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ func TestMainClusterConfig(t *testing.T) {
Enabled: false,
DrainTimeout: 5,
},
NetworkingDaemonSets: controlplane_config.NetworkingDaemonSets{
Enabled: false,
Typha: false,
CalicoNodeImage: model.Image{Repo: "quay.io/calico/node", Tag: controlplane_config.NdsDefaultCalicoNodeImageTag, RktPullDocker: false},
CalicoCniImage: model.Image{Repo: "quay.io/calico/cni", Tag: controlplane_config.NdsDefaultCalicoCniImageTag, RktPullDocker: false},
FlannelImage: model.Image{Repo: "quay.io/coreos/flannel", Tag: controlplane_config.NdsDefaultFlannelImageTag, RktPullDocker: false},
FlannelCniImage: model.Image{Repo: "quay.io/coreos/flannel-cni", Tag: controlplane_config.NdsDefaultFlannelCniImageTag, RktPullDocker: false},
TyphaImage: model.Image{Repo: "quay.io/calico/typha", Tag: controlplane_config.NdsDefaultTyphaImageTag, RktPullDocker: false},
},
}

actual := c.Experimental
Expand Down Expand Up @@ -1379,11 +1388,11 @@ worker:
NetworkingDaemonSets: controlplane_config.NetworkingDaemonSets{
Enabled: false,
Typha: false,
CalicoNodeImage: model.Image{Repo: "quay.io/calico/node", Tag: "v3.0.3", RktPullDocker: false},
CalicoCniImage: model.Image{Repo: "quay.io/calico/cni", Tag: "v2.0.1", RktPullDocker: false},
FlannelImage: model.Image{Repo: "quay.io/coreos/flannel", Tag: "v0.9.1", RktPullDocker: false},
FlannelCniImage: model.Image{Repo: "quay.io/coreos/flannel-cni", Tag: "v0.3.0", RktPullDocker: false},
TyphaImage: model.Image{Repo: "quay.io/calico/typha", Tag: "v0.6.2", RktPullDocker: false},
CalicoNodeImage: model.Image{Repo: "quay.io/calico/node", Tag: controlplane_config.NdsDefaultCalicoNodeImageTag, RktPullDocker: false},
CalicoCniImage: model.Image{Repo: "quay.io/calico/cni", Tag: controlplane_config.NdsDefaultCalicoCniImageTag, RktPullDocker: false},
FlannelImage: model.Image{Repo: "quay.io/coreos/flannel", Tag: controlplane_config.NdsDefaultFlannelImageTag, RktPullDocker: false},
FlannelCniImage: model.Image{Repo: "quay.io/coreos/flannel-cni", Tag: controlplane_config.NdsDefaultFlannelCniImageTag, RktPullDocker: false},
TyphaImage: model.Image{Repo: "quay.io/calico/typha", Tag: controlplane_config.NdsDefaultTyphaImageTag, RktPullDocker: false},
},
}

Expand Down

0 comments on commit de5fc2e

Please sign in to comment.