diff --git a/assets/canary/daemonset.yaml b/assets/canary/daemonset.yaml index 4ac15f122d..62ce2d7122 100644 --- a/assets/canary/daemonset.yaml +++ b/assets/canary/daemonset.yaml @@ -36,8 +36,7 @@ spec: nodeSelector: kubernetes.io/os: linux tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/infra + - key: node-role.kubernetes.io/infra operator: Exists updateStrategy: type: RollingUpdate diff --git a/pkg/manifests/bindata.go b/pkg/manifests/bindata.go index 0aa2368ab9..8246ed7310 100644 --- a/pkg/manifests/bindata.go +++ b/pkg/manifests/bindata.go @@ -1,6 +1,6 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: -// assets/canary/daemonset.yaml (1.434kB) +// assets/canary/daemonset.yaml (1.405kB) // assets/canary/namespace.yaml (212B) // assets/canary/route.yaml (456B) // assets/canary/service.yaml (331B) @@ -106,7 +106,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _assetsCanaryDaemonsetYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x54\xc1\x6e\x1b\x47\x0c\xbd\xeb\x2b\x08\x19\x45\x5a\xa0\x52\x94\x1e\x0a\x63\x6e\x81\xed\xa2\x06\x1c\x45\x88\x9c\x5e\x8a\x1e\xe8\xd9\xb7\xd2\x40\xb3\xc3\x29\x87\x23\x5b\x28\xfa\xef\xc5\xae\xa4\x48\x72\xd3\x22\xa7\x9d\x25\xf9\x1e\x39\x8f\xe4\x5c\xd1\xaf\x88\x51\xe8\x63\x46\x2a\xeb\xd0\x1a\xdd\xa7\x95\xa2\x14\xba\xe1\xc4\xba\xa3\x86\xd1\x49\x2a\xb0\xd1\x15\x2d\x33\x7c\x68\x83\xa7\x2d\xc7\x8a\x42\xac\xa0\x02\x23\x36\xd2\x9a\x2c\x74\x18\x6d\x42\x6a\x1c\xdd\x0e\xa0\x25\x6c\xc4\x39\xfc\x06\x2d\x41\x92\x23\xce\xb9\xbc\xdd\xbe\x1b\x5d\x51\xe2\x0e\xc4\xa9\x19\x0e\x25\xb3\xc7\x57\xb8\xa6\xa3\x92\xe1\xdd\x88\x28\xab\x0c\x35\xdd\x82\x9b\x18\x12\x96\xf0\x92\x9a\xe2\xe8\xe7\xd9\x6c\x44\x64\xe8\x72\x64\x43\x1f\x4a\xd4\xc1\xb8\x61\xe3\xfd\x1f\x11\xa7\x24\xc6\x16\x24\x95\xa3\x89\xc8\x58\x57\xb0\xe9\xb3\xe8\x26\x0a\x37\x53\x39\x5e\x7f\x1a\xe4\x6d\xc7\x89\x57\xe8\x90\xcc\xd1\x9b\xbf\xc6\x68\x5b\x78\x1b\x3b\x1a\x2f\x14\x2d\x54\xd1\xdc\x56\x0d\x69\xb5\xf4\x6b\x34\x35\x86\xb4\x1a\xff\xfd\x66\xa0\x3e\x16\x3c\x9c\xe1\xab\x06\xdb\xdd\x48\x32\xbc\xd8\x29\xb7\xd6\xf4\xbe\xcc\x25\x7d\x12\x31\x47\xa6\x15\x5f\x5c\x05\xde\x4b\x97\x17\x2a\x6d\x88\x38\x41\x88\x6c\x97\xe1\xe8\xd3\x5e\x99\x5b\xb4\x5c\xa3\x1d\xdc\x59\x83\x0c\x89\x22\x97\x32\xe7\x0e\x8e\xca\xae\x18\xba\x89\x8f\xb5\x18\x74\xe2\x35\x58\xf0\x1c\x0f\x00\x2f\xc9\x38\x24\xe8\x99\x20\x93\xa1\x15\x8e\x0a\x74\x8b\xc9\x1a\x1c\x6d\xed\xd7\xf0\x9b\x89\x1f\xe6\xe0\xac\x94\xff\xbc\xd8\xa0\x76\x8c\xf2\xbc\xd0\xb0\x0d\x11\x2b\xdc\x15\xcf\x71\xd0\xde\x51\xcb\xb1\xe0\x22\xd6\x73\xe6\xa7\x10\x83\x05\x94\x4b\x16\xa2\x46\x25\x3b\xfa\x7d\xfc\xfe\xe1\x61\xfc\xc7\x99\xef\x8a\xee\x3b\x5e\xed\x87\xc7\x4b\xd7\xf5\xdf\xaf\x8c\xe1\x09\x10\xfa\xf0\x45\x8d\x71\x21\x31\xf8\x9d\xa3\xfb\x76\x2e\xb6\x50\x14\x24\x3b\x17\x18\xda\x85\x34\xd4\xfa\x01\xa5\xf4\xa0\x03\xe0\x17\x8e\xf1\x89\xfd\xe6\x51\x1e\x64\x55\x3e\xa6\x3b\x55\xd1\x33\x64\x16\xb5\x8b\xfa\x27\x27\x85\x17\xa2\xe6\xe8\x7a\x76\x3d\xbb\xb8\x5f\x56\x31\xf1\x12\x1d\x3d\xde\x2c\xfe\x17\x79\x7d\x7d\xfd\x4d\x48\x45\x91\xaa\xfe\xb5\x90\x8a\x3f\x2b\x8a\xfd\x4b\x5e\x9f\xab\xa3\x77\xb3\xee\x95\xb9\x43\x27\xba\x73\xf4\xd3\xec\x43\x38\xb8\x92\x34\x58\x22\xc2\x9b\xe8\x89\x65\x53\x9f\xa0\x09\x86\xd2\x2f\x8c\x14\x47\x31\xa4\xfa\x72\xf0\x9b\x44\xe8\xeb\x95\x9b\xd0\x7e\x91\x1c\xcd\xe5\xb0\x39\xe7\x7d\xda\x60\xe7\x86\x64\x13\x95\x88\xe9\x65\x82\x90\x5a\xe5\xb3\x60\xc9\x3d\xbf\xa8\xa3\xbb\x97\x50\xac\x8c\x88\x6a\x6e\xd8\xb0\x34\x65\xc3\x6a\xb7\x4f\x7b\x58\x1a\x89\xfd\x8e\x7e\x1e\x02\x06\xbb\x9e\x5b\x8e\x15\x5e\xd1\x5c\x0c\x8e\x1e\xd7\x38\x3c\x7a\x43\x33\xfa\x58\x28\xa9\xd4\xd4\x14\xb2\x35\x28\x43\x3d\x92\xf5\x53\x58\xf3\x17\xf0\xf7\x35\xc5\xb0\xc1\x10\xd1\x20\x47\xd9\xf5\x0f\xc8\x19\xc5\x8f\xf4\xbc\x0e\x7e\x7d\x64\x6a\xe4\x39\xfd\x30\x3d\xc0\x3b\x7e\xf9\x9c\x78\xcb\x21\xf2\x53\x44\xdf\x99\xef\x46\xff\x04\x00\x00\xff\xff\x13\xdc\x4e\x79\x9a\x05\x00\x00") +var _assetsCanaryDaemonsetYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x54\xc1\x6e\x1b\x37\x10\xbd\xeb\x2b\x06\x12\x8a\xb4\x40\xa5\x28\x3d\x14\x02\x6f\x81\xed\xa2\x06\x1c\x47\x88\x9c\x5e\x8a\x1e\xc6\xdc\xb7\x12\x21\x2e\x87\x1d\x0e\x65\x0b\x45\xff\xbd\xd8\xb5\x14\x49\x6e\x5a\xe4\x24\x6a\x66\xde\xe3\x9b\xb7\x33\x9c\xd0\xaf\x88\x51\xe8\x63\x46\x2a\x9b\xd0\x1a\xdd\xa6\xb5\xa2\x14\xba\xe2\xc4\xba\xa7\x86\xd1\x49\x2a\xb0\xd1\x84\x56\x19\x3e\xb4\xc1\xd3\x8e\x63\x45\x21\x56\x50\x81\x11\x1b\x69\x4d\x16\x3a\x8c\xb6\x21\x35\x8e\xae\x07\xd0\x0a\x36\xe2\x1c\x7e\x83\x96\x20\xc9\x11\xe7\x5c\xde\xee\xde\x8d\x26\x94\xb8\x03\x71\x6a\x86\x43\xc9\xec\xf1\x15\xae\xd9\xa8\x64\x78\x37\x22\xca\x2a\x83\xa6\x6b\x70\x13\x43\xc2\x0a\x5e\x52\x53\x1c\xfd\x3c\x9f\x8f\x88\x0c\x5d\x8e\x6c\xe8\x4b\x89\x3a\x18\x37\x6c\xfc\xf2\x8f\x88\x53\x12\x63\x0b\x92\xca\x31\x44\x64\xac\x6b\xd8\xec\x49\x74\x1b\x85\x9b\x99\x1c\xdb\x9f\x05\x79\xdb\x71\xe2\x35\x3a\x24\x73\xf4\xe6\xaf\x31\xda\x16\xde\xc6\x8e\xc6\x4b\x45\x0b\x55\x34\xd7\x55\x43\x5a\xaf\xfc\x06\x4d\x8d\x21\xad\xc7\x7f\xbf\x19\xa8\x8f\x82\x87\x33\x7c\xd5\x60\xfb\x2b\x49\x86\x67\x3b\xdd\xad\x35\xbd\x2f\xf7\x92\x3e\x89\x98\x23\xd3\x8a\x2f\xa9\x02\xef\xa5\xcb\x4b\x95\x36\x44\x9c\x20\x44\xb6\xcf\x70\xf4\xe9\xc5\x99\x6b\xb4\x5c\xa3\x1d\xd2\x59\x83\x0c\x17\x45\x2e\xe5\x9e\x3b\x38\x2a\xfb\x62\xe8\xa6\x3e\xd6\x62\xd0\xa9\xd7\x60\xc1\x73\x3c\x00\xbc\x24\xe3\x90\xa0\x67\x86\x4c\x87\x4f\xe1\xa8\x40\x77\x98\x6e\xc0\xd1\x36\x7e\x03\xbf\x9d\xfa\x61\x0e\xce\xa4\xfc\x67\x63\x83\xdb\x31\xca\xd3\x52\xc3\x2e\x44\xac\x71\x53\x3c\xc7\xc1\x7b\x47\x2d\xc7\x82\x8b\x5a\xcf\x99\x1f\x43\x0c\x16\x50\x2e\x59\x88\x1a\x95\xec\xe8\xf7\xf1\xfb\xbb\xbb\xf1\x1f\x67\xb9\x09\xdd\x76\xbc\x7e\x19\x1e\x2f\x5d\xd7\xff\x7e\x65\x0c\x4f\x80\xd0\x97\x2f\x6b\x8c\x4b\x89\xc1\xef\x1d\xdd\xb6\xf7\x62\x4b\x45\x41\xb2\x73\x83\xa1\x5d\x48\x83\xd6\x0f\x28\xa5\x07\x1d\x00\xbf\x70\x8c\x8f\xec\xb7\x0f\x72\x27\xeb\xf2\x31\xdd\xa8\x8a\x9e\x21\xb3\xa8\x5d\xe8\x9f\x9e\x1c\x5e\x8a\x9a\xa3\xc5\x7c\x31\xbf\xe8\x2f\xab\x98\x78\x89\x8e\x1e\xae\x96\xff\x8b\x5c\x2c\x16\xdf\x84\x54\x14\xa9\xea\x5f\x1b\xa9\xf8\xb3\xa2\xd8\xbf\xec\xf5\xb9\x3a\x7a\x37\xef\x5e\x85\x3b\x74\xa2\x7b\x47\x3f\xcd\x3f\x84\x43\x2a\x49\x83\x15\x22\xbc\x89\x9e\x58\xb6\xf5\x11\x9a\x60\x28\xfd\xc2\x48\x71\x14\x43\xaa\xcf\x87\xbc\x49\x84\xbe\x5e\xb9\x29\x6d\xb1\x77\x03\xdf\x54\x25\x62\x76\xc9\x11\x52\xab\x7c\x26\x47\x72\x4f\x21\xea\xe8\xe6\x39\x14\x2b\x23\xa2\x9a\x1b\x36\xac\x4c\xd9\xb0\xde\xbf\x30\x1f\xf6\x42\x62\xbf\x86\x9f\x87\x82\x21\xae\xe7\x91\xa3\x88\x09\xdd\x8b\xc1\xd1\xc3\x06\x87\x77\x6d\xf0\xbb\xaf\x85\x92\x4a\x4d\x4d\x21\xdb\x80\x32\xd4\x23\x59\x3f\x68\x35\x7f\x01\x7f\x5f\x53\x0c\x5b\x0c\x15\x0d\x72\x94\x7d\xff\x46\x9c\x51\xfc\x48\x4f\x9b\xe0\x37\x47\xa6\x46\x9e\xd2\x0f\xb3\x03\xbc\xe3\xe7\xcf\x89\x77\x1c\x22\x3f\x46\xf4\xe6\x7f\x37\xfa\x27\x00\x00\xff\xff\x5d\xcb\x44\xf7\x7d\x05\x00\x00") func assetsCanaryDaemonsetYamlBytes() ([]byte, error) { return bindataRead( @@ -121,8 +121,8 @@ func assetsCanaryDaemonsetYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "assets/canary/daemonset.yaml", size: 1434, mode: os.FileMode(420), modTime: time.Unix(1, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x4d, 0x7a, 0xc7, 0x86, 0xc1, 0x6e, 0x66, 0x19, 0xd1, 0x10, 0xbf, 0x2c, 0xe0, 0x3f, 0x3c, 0x4f, 0x19, 0xfe, 0xe7, 0xf1, 0x52, 0x6c, 0x3c, 0x66, 0xaf, 0x30, 0xa4, 0xba, 0x63, 0x47, 0xd6, 0x62}} + info := bindataFileInfo{name: "assets/canary/daemonset.yaml", size: 1405, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0x3b, 0x87, 0xec, 0xf5, 0x35, 0xf6, 0xd8, 0xa9, 0x2d, 0xaf, 0xd8, 0xb3, 0x98, 0x54, 0x95, 0xf, 0xf2, 0xd4, 0x42, 0x5, 0xbe, 0xcd, 0x47, 0xee, 0xea, 0xd0, 0x1e, 0xbf, 0x18, 0xac, 0xed}} return a, nil } diff --git a/pkg/operator/controller/canary/daemonset_test.go b/pkg/operator/controller/canary/daemonset_test.go index 53a9cb14df..1225ff86d2 100644 --- a/pkg/operator/controller/canary/daemonset_test.go +++ b/pkg/operator/controller/canary/daemonset_test.go @@ -78,7 +78,6 @@ func TestDesiredCanaryDaemonSet(t *testing.T) { { Key: "node-role.kubernetes.io/infra", Operator: "Exists", - Effect: "NoSchedule", }, } if !cmp.Equal(tolerations, expectedTolerations) { @@ -121,6 +120,13 @@ func TestCanaryDaemonsetChanged(t *testing.T) { }, expect: true, }, + { + description: "if pod template toleration effect changes", + mutate: func(ds *appsv1.DaemonSet) { + ds.Spec.Template.Spec.Tolerations[0].Effect = "NoExecute" + }, + expect: true, + }, { description: "if canary server image changes", mutate: func(ds *appsv1.DaemonSet) {