From 10a0a98f89ae341268797a6d1397b76ae735c3d5 Mon Sep 17 00:00:00 2001 From: mmelko Date: Thu, 22 Oct 2020 13:49:16 +0200 Subject: [PATCH] Create pod trait that adds PodDisruptionBudget for every integration --- deploy/operator-role-kubernetes.yaml | 11 +++ deploy/operator-role-olm.yaml | 11 +++ deploy/operator-role-openshift.yaml | 11 +++ deploy/resources.go | 12 +-- pkg/trait/pod.go | 107 +++++++++++++++++++++++ pkg/trait/pod_test.go | 121 +++++++++++++++++++++++++++ pkg/trait/trait_register.go | 1 + 7 files changed, 268 insertions(+), 6 deletions(-) create mode 100644 pkg/trait/pod.go create mode 100644 pkg/trait/pod_test.go diff --git a/deploy/operator-role-kubernetes.yaml b/deploy/operator-role-kubernetes.yaml index 26c4c48c7a..12dd505414 100644 --- a/deploy/operator-role-kubernetes.yaml +++ b/deploy/operator-role-kubernetes.yaml @@ -47,6 +47,17 @@ rules: - patch - update - watch +- apiGroups: + - "policy" + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - update + - list + - patch - apiGroups: - rbac.authorization.k8s.io resources: diff --git a/deploy/operator-role-olm.yaml b/deploy/operator-role-olm.yaml index 53fa59fd1e..2b8428b156 100644 --- a/deploy/operator-role-olm.yaml +++ b/deploy/operator-role-olm.yaml @@ -47,6 +47,17 @@ rules: - patch - update - watch +- apiGroups: + - "policy" + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - update + - patch + - list - apiGroups: - rbac.authorization.k8s.io resources: diff --git a/deploy/operator-role-openshift.yaml b/deploy/operator-role-openshift.yaml index 31696bce68..d2462e7695 100644 --- a/deploy/operator-role-openshift.yaml +++ b/deploy/operator-role-openshift.yaml @@ -47,6 +47,17 @@ rules: - patch - update - watch +- apiGroups: + - "policy" + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - update + - list + - patch - apiGroups: - rbac.authorization.k8s.io resources: diff --git a/deploy/resources.go b/deploy/resources.go index 162979f9f4..1d55b96449 100644 --- a/deploy/resources.go +++ b/deploy/resources.go @@ -217,9 +217,9 @@ var assets = func() http.FileSystem { "/operator-role-kubernetes.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-role-kubernetes.yaml", modTime: time.Time{}, - uncompressedSize: 2244, + uncompressedSize: 2377, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x54\xc1\x6e\x1b\x37\x10\xbd\xf3\x2b\x1e\xb4\x97\xa4\xb0\xe4\xb6\xa7\x42\x3d\xa9\x8e\xdd\x0a\x0d\x24\xc0\xab\x34\xc8\x91\xe2\x8e\x56\x53\x73\x39\x2c\xc9\x95\xec\x7e\x7d\x41\xee\x2a\x91\xa3\x04\xe8\x21\x88\xf7\xa2\x21\x77\xf6\xcd\x9b\xf7\x46\x53\x61\xfa\xed\x1e\x55\xe1\x2d\x1b\x72\x91\x1a\x24\x41\xda\x13\x16\x5e\x9b\x3d\xa1\x96\x5d\x3a\xea\x40\xb8\x93\xde\x35\x3a\xb1\x38\xbc\x5a\xd4\x77\xaf\xd1\xbb\x86\x02\xc4\x11\x24\xa0\x93\x40\xaa\x82\x11\x97\x02\x6f\xfb\x24\x01\x76\x00\x84\x6e\x03\x51\x47\x2e\xc5\x19\x50\x13\x15\xf4\xd5\x7a\xb3\xbc\xb9\xc5\x8e\x2d\xa1\xe1\x38\x7c\x44\x0d\x8e\x9c\xf6\xaa\x42\xda\x73\xc4\x51\xc2\x03\x76\x12\xa0\x9b\x86\x73\x61\x6d\xc1\x6e\x27\xa1\x1b\x68\x04\x6a\x75\x68\xd8\xb5\x30\xe2\x9f\x02\xb7\xfb\x04\x39\x3a\x0a\x71\xcf\x7e\xa6\x2a\x6c\x72\x1b\xf5\xdd\x89\x49\x1c\x60\x4b\xcd\x24\xf8\x20\xfd\xd8\xc3\x59\xbb\xa3\x0a\x57\xf8\x8b\x42\xcc\x45\x7e\x9e\xfd\xa8\x2a\xbc\xca\x29\x93\xf1\xe5\xe4\xf5\xaf\x78\x92\x1e\x9d\x7e\x82\x93\x84\x3e\xd2\x19\x32\x3d\x1a\xf2\x09\xec\x60\xa4\xf3\x96\xb5\x33\xf4\xa9\xad\x8f\x15\x66\x28\x04\x32\x86\x6c\x93\x66\x07\x5d\xda\x80\xec\xce\xd3\xa0\x93\xaa\x54\x85\xf2\xec\x53\xf2\xf3\xeb\xeb\xe3\xf1\x38\xd3\x85\xee\x4c\x42\x7b\x7d\xea\xee\xfa\xed\xf2\xe6\x76\x55\xdf\x4e\x0b\x65\x55\xe1\x9d\xb3\x14\x23\x02\xfd\xd3\x73\xa0\x06\xdb\x27\x68\xef\x2d\x1b\xbd\xb5\x04\xab\x8f\xd9\xb8\xe2\x4e\x31\x9d\x1d\x8e\x81\x13\xbb\xf6\x0a\x71\x74\x5d\x55\xcf\xdc\xf9\x24\xd7\x89\x1e\xc7\x67\x09\xe2\xa0\x1d\x26\x8b\x1a\xcb\x7a\x82\xdf\x16\xf5\xb2\xbe\x52\x15\xde\x2f\x37\x7f\xac\xdf\x6d\xf0\x7e\x71\x7f\xbf\x58\x6d\x96\xb7\x35\xd6\xf7\xb8\x59\xaf\xde\x2c\x37\xcb\xf5\xaa\xc6\xfa\x0e\x8b\xd5\x07\xfc\xb9\x5c\xbd\xb9\x02\x71\xda\x53\x00\x3d\xfa\x90\xf9\x4b\x00\x67\x21\xa9\xc9\x9e\x9e\x06\xe8\x44\x20\xcf\x47\x3e\x47\x4f\x86\x77\x6c\x60\xb5\x6b\x7b\xdd\x12\x5a\x39\x50\x70\x79\x3c\x3c\x85\x8e\x63\xb6\x33\x42\xbb\x46\x55\xb0\xdc\x71\x2a\x53\x14\x2f\x9b\xca\x65\xbe\xe5\x7f\x4b\x3d\xb0\x6b\xe6\xb8\x17\x4b\x4a\x7b\x1e\x27\x6b\x8e\xb0\xd5\x66\xa6\xfb\xb4\x97\xc0\xff\x16\x32\xb3\x87\x5f\xe2\x8c\xe5\xfa\xf0\x93\xea\x28\xe9\x46\x27\x3d\x57\x80\xd3\x1d\xcd\x61\x74\x47\x76\xfa\x30\x15\x4f\x41\x27\x09\x0a\xb0\x7a\x4b\x36\xe6\x14\x64\x6b\xe7\x98\x8c\x49\x13\x15\x7a\x4b\x71\xae\xa6\xd0\x9e\x7f\x0f\xd2\xfb\x92\x36\x1d\x50\xce\xc6\x47\x01\x81\xa2\xf4\xc1\xd0\x98\x31\xf9\x61\xa2\x80\x03\x85\xed\xd9\xc5\x05\xce\x64\x72\xf9\xa5\x97\x26\x96\x20\x52\x38\xb0\xa1\xe1\x40\xae\xf1\xc2\x2e\x0d\x27\x9f\xbb\x8f\x89\x5c\x3a\x88\xed\x3b\x32\x56\x73\x37\xbc\x32\xe2\x76\xdc\x76\xda\x9f\x40\x4c\xa0\xf4\x0c\x50\x1b\x23\xfd\x80\x74\xc6\xcf\x04\xd2\x89\x4a\xd8\x90\xa5\x67\xa1\x11\x6b\xc9\x64\x6d\xcb\x65\x4b\xa9\xfc\x5a\x8e\x43\xe0\x75\x32\xfb\x12\xf5\xbe\x39\xa1\x1c\xcb\xe5\x45\xcb\x5f\xf5\xeb\x52\x89\x20\x76\xec\x3e\x47\x5b\x76\x79\x4d\xbd\x10\xed\x2f\x39\x45\x07\xba\x90\xf1\xa2\xc8\x57\xf0\xb4\x2f\x06\x7d\x86\xd8\x90\xb7\xf2\xd4\xd1\xc9\xe7\x40\x65\xd3\xc4\x8f\x0e\x26\x9d\x68\xd7\xdb\xf1\xe2\x05\x74\xd8\x8e\xb9\x9f\x11\x37\x41\xdc\xdf\xb2\x7d\x21\x52\xa3\x98\x3a\x8d\x2b\xf4\x9e\xf2\x32\x2d\xe0\x71\x0e\xd7\x5b\xfb\x05\xa9\x35\x75\xe2\x2e\x85\xfc\xbf\x06\xd2\x63\x22\x57\xb6\xe1\x25\x36\xbb\x36\x2f\x5d\xfa\x3e\x72\xfc\x17\x00\x00\xff\xff\xc5\x56\x8d\x6d\xc4\x08\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x54\xc1\x72\xdb\x36\x10\xbd\xf3\x2b\xde\x88\x97\xa4\x63\xc9\x6d\x4f\x1d\xf5\xa4\x26\x76\xab\x69\x46\x9a\x31\x95\x66\x72\x04\xc1\x15\xb5\x35\x88\x45\x01\x50\xb2\xfa\xf5\x1d\x40\x54\x22\x9b\xce\x8c\x0f\x9e\x86\x17\x2d\xc0\xe5\xdb\xb7\xef\xad\xb6\xc4\xf4\xf5\x9e\xa2\xc4\x07\xd6\x64\x03\x35\x88\x82\xb8\x23\x2c\x9c\xd2\x3b\x42\x25\xdb\x78\x50\x9e\x70\x2b\xbd\x6d\x54\x64\xb1\x78\xb3\xa8\x6e\xdf\xa2\xb7\x0d\x79\x88\x25\x88\x47\x27\x9e\x8a\x12\x5a\x6c\xf4\x5c\xf7\x51\x3c\xcc\x09\x10\xaa\xf5\x44\x1d\xd9\x18\x66\x40\x45\x94\xd1\x57\xeb\xcd\xf2\xdd\x0d\xb6\x6c\x08\x0d\x87\xd3\x47\xd4\xe0\xc0\x71\x57\x94\x88\x3b\x0e\x38\x88\xbf\xc7\x56\x3c\x54\xd3\x70\x2a\xac\x0c\xd8\x6e\xc5\x77\x27\x1a\x9e\x5a\xe5\x1b\xb6\x2d\xb4\xb8\xa3\xe7\x76\x17\x21\x07\x4b\x3e\xec\xd8\xcd\x8a\x12\x9b\xd4\x46\x75\x7b\x66\x12\x4e\xb0\xb9\x66\x14\x7c\x96\x7e\xe8\xe1\xa2\xdd\x41\x85\x2b\xfc\x45\x3e\xa4\x22\x3f\xcf\x7e\x2c\x4a\xbc\x49\x29\x93\xe1\xe5\xe4\xed\xaf\x38\x4a\x8f\x4e\x1d\x61\x25\xa2\x0f\x74\x81\x4c\x0f\x9a\x5c\x04\x5b\x68\xe9\x9c\x61\x65\x35\x7d\x6d\xeb\x4b\x85\x19\x32\x81\x84\x21\x75\x54\x6c\xa1\x72\x1b\x90\xed\x65\x1a\x54\x2c\xca\xa2\x44\x7e\x76\x31\xba\xf9\xf5\xf5\xe1\x70\x98\xa9\x4c\x77\x26\xbe\xbd\x3e\x77\x77\xfd\x61\xf9\xee\x66\x55\xdd\x4c\x33\xe5\xa2\xc4\x47\x6b\x28\x04\x78\xfa\xa7\x67\x4f\x0d\xea\x23\x94\x73\x86\xb5\xaa\x0d\xc1\xa8\x43\x32\x2e\xbb\x93\x4d\x67\x8b\x83\xe7\xc8\xb6\xbd\x42\x18\x5c\x2f\xca\x47\xee\x7c\x95\xeb\x4c\x8f\xc3\xa3\x04\xb1\x50\x16\x93\x45\x85\x65\x35\xc1\x6f\x8b\x6a\x59\x5d\x15\x25\x3e\x2d\x37\x7f\xac\x3f\x6e\xf0\x69\x71\x77\xb7\x58\x6d\x96\x37\x15\xd6\x77\x78\xb7\x5e\xbd\x5f\x6e\x96\xeb\x55\x85\xf5\x2d\x16\xab\xcf\xf8\x73\xb9\x7a\x7f\x05\xe2\xb8\x23\x0f\x7a\x70\x3e\xf1\x17\x0f\x4e\x42\x52\x93\x3c\x3d\x0f\xd0\x99\x40\x9a\x8f\x74\x0e\x8e\x34\x6f\x59\xc3\x28\xdb\xf6\xaa\x25\xb4\xb2\x27\x6f\xd3\x78\x38\xf2\x1d\x87\x64\x67\x80\xb2\x4d\x51\xc2\x70\xc7\x31\x4f\x51\x18\x37\x95\xca\xbc\xe6\x7f\xab\xb8\x67\xdb\xcc\x71\x27\x86\x0a\xe5\x78\x98\xac\x39\x7c\xad\xf4\x4c\xf5\x71\x27\x9e\xff\xcd\x64\x66\xf7\xbf\x84\x19\xcb\xf5\xfe\xa7\xa2\xa3\xa8\x1a\x15\xd5\xbc\x00\xac\xea\x68\x0e\xad\x3a\x32\xd3\xfb\xa9\x38\xf2\x2a\x8a\x2f\x00\xa3\x6a\x32\x21\xa5\x20\x59\x3b\xc7\x64\x48\x9a\x14\xbe\x37\x14\xe6\xc5\x14\xca\xf1\xef\x5e\x7a\x97\xd3\xa6\x27\x94\x8b\xf1\x29\x00\x4f\x41\x7a\xaf\x69\xc8\x98\xfc\x30\x29\x80\x3d\xf9\xfa\xe2\x62\x84\x33\x99\x8c\xbf\x74\xd2\x84\x1c\x04\xf2\x7b\xd6\x74\x3a\x90\x6d\x9c\xb0\x8d\xa7\x93\x4b\xdd\x87\x48\x36\xee\xc5\xf4\x1d\x69\xa3\xb8\x3b\xbd\xd2\x62\xb7\xdc\x76\xca\x9d\x41\xb4\xa7\xf8\x08\x50\x69\x2d\xfd\x09\xe9\x82\x9f\xf6\xa4\x22\xe5\xb0\x21\x43\x8f\x42\x2d\xc6\x90\x4e\xda\xe6\xcb\x96\x62\xfe\x35\x1c\x4e\x81\x53\x51\xef\x72\xd4\xbb\xe6\x8c\x72\xc8\x97\xe3\x96\x9d\x18\xd6\xc7\xe7\x1b\x6f\x38\xf8\xde\xa5\x42\x75\xdf\xb4\xf4\x32\x8e\x67\x3a\x17\xb5\x9f\x30\x1b\x91\xf8\xe6\xd0\x8c\x59\x79\x31\x83\x05\x29\xaa\xd9\xa6\x5d\xf9\xbd\xb4\x7b\x46\x35\xda\xd3\xc8\xcb\x51\x91\x6f\xe0\x29\x97\xa7\xe4\x09\x62\x43\xce\xc8\xb1\xa3\xf3\xb0\x79\xca\xeb\x2e\x7c\x19\xa3\xa8\x22\x6d\x7b\x13\x5e\xe8\xcf\xeb\xeb\x50\x0f\xb9\x4f\x88\x6b\x2f\xf6\x6f\xa9\xbf\x13\xa9\x41\x4c\x15\x87\x3d\x7e\x47\x69\xa3\x67\xf0\x30\x87\xed\x8d\x79\x46\x6a\x45\x9d\xd8\xb1\x90\x2f\x35\x90\x1e\x22\xd9\xbc\x92\xc7\xd8\x6c\xdb\xb4\xf9\xe9\xff\x91\xe3\xbf\x00\x00\x00\xff\xff\xf4\x80\xfa\x34\x49\x09\x00\x00"), }, "/operator-role-olm-cluster.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-role-olm-cluster.yaml", @@ -231,16 +231,16 @@ var assets = func() http.FileSystem { "/operator-role-olm.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-role-olm.yaml", modTime: time.Time{}, - uncompressedSize: 3958, + uncompressedSize: 4091, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x56\x41\x8f\xdb\x36\x13\xbd\xeb\x57\x0c\xec\x4b\xf2\x61\x2d\x7f\xed\xa9\x70\x4f\x6e\xb2\xdb\x1a\x0d\xbc\xc0\x7a\xd3\x20\xc7\x31\x35\x96\xa6\x26\x39\x2c\x49\xd9\x71\x7e\x7d\x41\x4a\x4e\xe4\x68\xb7\x49\x81\x00\xae\x2f\xa6\x86\xa3\x99\x37\xef\x0d\x47\x9c\xc2\xec\xfb\xfd\x8a\x29\xbc\x61\x45\x36\x50\x05\x51\x20\x36\x04\x4b\x87\xaa\x21\xd8\xc8\x2e\x1e\xd1\x13\xdc\x49\x6b\x2b\x8c\x2c\x16\x5e\x2c\x37\x77\x2f\xa1\xb5\x15\x79\x10\x4b\x20\x1e\x8c\x78\x2a\xa6\xa0\xc4\x46\xcf\xdb\x36\x8a\x07\xdd\x05\x04\xac\x3d\x91\x21\x1b\x43\x09\xb0\x21\xca\xd1\xd7\xf7\x8f\xab\x57\xb7\xb0\x63\x4d\x50\x71\xe8\x5e\xa2\x0a\x8e\x1c\x9b\x62\x0a\xb1\xe1\x00\x47\xf1\x7b\xd8\x89\x07\xac\x2a\x4e\x89\x51\x03\xdb\x9d\x78\xd3\xc1\xf0\x54\xa3\xaf\xd8\xd6\xa0\xc4\x9d\x3c\xd7\x4d\x04\x39\x5a\xf2\xa1\x61\x57\x16\x53\x78\x4c\x65\x6c\xee\xce\x48\x42\x17\x36\xe7\x8c\x02\xef\xa5\xed\x6b\x18\x94\xdb\xb3\x70\x03\x7f\x90\x0f\x29\xc9\x8f\xe5\xff\x8b\x29\xbc\x48\x2e\x93\x7e\x73\xf2\xf2\x67\x38\x49\x0b\x06\x4f\x60\x25\x42\x1b\x68\x10\x99\x3e\x28\x72\x11\xd8\x82\x12\xe3\x34\xa3\x55\xf4\xb9\xac\x4f\x19\x4a\xc8\x00\x52\x0c\xd9\x46\x64\x0b\x98\xcb\x00\xd9\x0d\xdd\x00\x63\x31\x2d\xa6\x90\x7f\x4d\x8c\x6e\x31\x9f\x1f\x8f\xc7\x12\x33\xdc\x52\x7c\x3d\x3f\x57\x37\x7f\xb3\x7a\x75\xbb\xde\xdc\xce\x32\xe4\x62\x0a\x6f\xad\xa6\x10\xc0\xd3\x5f\x2d\x7b\xaa\x60\x7b\x02\x74\x4e\xb3\xc2\xad\x26\xd0\x78\x4c\xc2\x65\x75\xb2\xe8\x6c\xe1\xe8\x39\xb2\xad\x6f\x20\xf4\xaa\x17\xd3\x0b\x75\x3e\xd3\x75\x86\xc7\xe1\xc2\x41\x2c\xa0\x85\xc9\x72\x03\xab\xcd\x04\x7e\x59\x6e\x56\x9b\x9b\x62\x0a\xef\x56\x8f\xbf\xdd\xbf\x7d\x84\x77\xcb\x87\x87\xe5\xfa\x71\x75\xbb\x81\xfb\x07\x78\x75\xbf\x7e\xbd\x7a\x5c\xdd\xaf\x37\x70\x7f\x07\xcb\xf5\x7b\xf8\x7d\xb5\x7e\x7d\x03\xc4\xb1\x21\x0f\xf4\xc1\xf9\x84\x5f\x3c\x70\x22\x92\xaa\xa4\xe9\xb9\x81\xce\x00\x52\x7f\xa4\xe7\xe0\x48\xf1\x8e\x15\x68\xb4\x75\x8b\x35\x41\x2d\x07\xf2\x36\xb5\x87\x23\x6f\x38\x24\x39\x03\xa0\xad\x8a\x29\x68\x36\x1c\x73\x17\x85\x71\x51\x29\xcd\xf7\x3c\x5b\xc5\x9e\x6d\xb5\x80\x07\xd1\x54\xa0\xe3\xbe\xb3\x16\xe0\xb7\xa8\x4a\x6c\x63\x23\x9e\x3f\x66\x30\xe5\xfe\xa7\x50\xb2\xcc\x0f\x3f\x14\x86\x22\x56\x18\x71\x51\x00\x58\x34\xb4\x00\x85\x86\xf4\x6c\x3f\x13\x47\x1e\xa3\xf8\x02\x40\xe3\x96\x74\x48\x2e\x90\xa4\x5d\xc0\xa4\x77\x9a\x14\xbe\xd5\x14\x16\xc5\x0c\xd0\xf1\xaf\x5e\x5a\x97\xdd\x66\x5d\x94\x41\xfb\x14\x00\x9e\x82\xb4\x5e\x51\xef\x31\xf9\xdf\xa4\x00\x38\x90\xdf\x0e\x0c\xa3\x38\x93\xc9\xf8\x4d\x27\x55\xc8\x8b\x40\xfe\xc0\x8a\xba\x07\xb2\x95\x13\xb6\xb1\x7b\x72\xa9\xfa\x10\xc9\xc6\x83\xe8\xd6\x90\xd2\xc8\xa6\xdb\x52\x62\x77\x5c\x1b\x74\xe7\x20\xca\x53\xbc\x08\x88\x4a\x49\xdb\x45\x1a\xe0\x53\x9e\x30\x52\x5e\x56\xa4\xe9\x62\xa9\x44\x6b\x52\x89\xdb\x6c\xac\x29\xe6\x7f\xcd\xa1\x5b\x38\x8c\xaa\xc9\xab\xd6\x55\xe7\x28\xc7\x6c\x1c\x95\xfc\xac\x5e\x63\x26\xbc\xe8\xbe\xfa\xb4\xda\xb2\x4d\x63\xea\x4a\xb0\x9f\x52\x8a\x0e\xf4\x4f\x34\x7e\x0e\x3f\xca\xfc\x4c\x12\x74\x59\xb5\x2f\xd2\x54\xe4\xb4\x9c\x0c\x9d\xc5\xf7\x94\xc7\x4f\xf8\x24\x6b\xc4\x48\xbb\x56\xf7\x86\x2b\x90\xb3\xed\x7d\xbf\x00\xae\xbc\xd8\x3f\x65\x7b\x25\x50\x3d\x99\x18\xfb\xb9\xfa\x40\x69\xc2\xe6\xe0\x61\x01\xb6\xd5\xfa\x09\xaa\x91\x8c\xd8\x31\x91\xdf\x2a\x20\x7d\x88\x64\xf3\x88\x1c\xc7\x66\x5b\xa7\x49\x4c\xd7\x6c\xe0\x19\x4c\xb6\x2d\xeb\xaa\x14\x47\x36\x34\xbc\x8b\x25\xcb\x13\x9d\x9d\x9d\xba\x49\x12\x46\x86\xf9\x91\xb6\x8d\xc8\x7e\xb0\x73\xe5\x9a\xd8\x60\x4d\x5f\xab\x29\x3b\x85\xe8\x09\x4d\xb7\xfc\xd2\x6a\xd0\xb9\x7e\xc0\x5c\xd8\xc7\x86\xf9\x70\xaa\x0e\x36\x22\x5e\x75\x3c\xf5\x62\x5c\x10\xf1\x6f\x4f\xc0\x85\xd0\x6c\x43\x44\x1b\xf9\x9c\xfc\xb9\xcd\x2d\x5b\xf4\xa7\x41\x3b\xcc\x95\x16\x4b\x4f\x52\xf1\xac\x88\x5e\xda\xf8\x55\x11\xb3\xd3\x75\x39\x1e\xe3\x7c\x0e\xe6\x5c\xb5\x21\x8a\x99\x35\x92\xb3\x7d\x03\x17\xf9\x0b\x6d\xeb\x72\x6f\x31\xf2\x81\xca\x8a\x0e\xe3\xe0\x83\x7b\xc1\x15\x58\xc8\x1f\xbd\x31\xc6\x19\x18\x0a\x01\xeb\xaf\xa2\x1f\x5d\x8c\xfe\x83\x17\x0f\xa5\xdb\x10\xc9\x9f\xef\x1f\x03\xb0\xe9\x12\x32\xf0\x5f\xa3\xf9\xa4\xca\x29\x44\x32\x8b\x3c\x0d\x66\xf9\x14\x90\x1f\x83\x30\x62\x39\x8a\x4f\x2c\x29\xf1\x24\xa1\x54\x62\x9e\x95\xb8\xf7\xbe\x56\xbf\xef\x71\xb7\xc7\x32\xcd\x0c\xf3\x91\x9f\x3e\x8f\x51\x1c\xab\x6e\x0e\x66\xef\x6f\xfb\x6e\xfe\x1d\x00\x00\xff\xff\x14\x7a\xdf\x6c\x76\x0f\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x56\x51\x8f\xdb\x36\x0c\x7e\xf7\xaf\x20\x92\x97\x76\xb8\x38\xdb\x9e\x86\xec\x29\x6b\xef\xb6\x60\x45\x0e\xb8\x5c\x57\xf4\x91\x96\x19\x9b\x8b\x2c\x6a\x92\x9c\x34\xfd\xf5\x83\x64\xa7\xe7\xd4\x77\xeb\x15\x38\x2c\x79\x89\x4c\xd1\xe4\xc7\xef\xa3\x68\x4d\x61\xf6\x72\xbf\x6c\x0a\xef\x58\x91\xf1\x54\x42\x10\x08\x35\xc1\xd2\xa2\xaa\x09\x36\xb2\x0d\x07\x74\x04\x37\xd2\x9a\x12\x03\x8b\x81\x57\xcb\xcd\xcd\x6b\x68\x4d\x49\x0e\xc4\x10\x88\x83\x46\x1c\x65\x53\x50\x62\x82\xe3\xa2\x0d\xe2\x40\x77\x01\x01\x2b\x47\xd4\x90\x09\x3e\x07\xd8\x10\xa5\xe8\xeb\xdb\xfb\xd5\x9b\x6b\xd8\xb2\x26\x28\xd9\x77\x2f\x51\x09\x07\x0e\x75\x36\x85\x50\xb3\x87\x83\xb8\x1d\x6c\xc5\x01\x96\x25\xc7\xc4\xa8\x81\xcd\x56\x5c\xd3\xc1\x70\x54\xa1\x2b\xd9\x54\xa0\xc4\x1e\x1d\x57\x75\x00\x39\x18\x72\xbe\x66\x9b\x67\x53\xb8\x8f\x65\x6c\x6e\x4e\x48\x7c\x17\x36\xe5\x0c\x02\x1f\xa5\xed\x6b\x18\x94\xdb\xb3\x70\x05\x7f\x91\xf3\x31\xc9\xcf\xf9\x8f\xd9\x14\x5e\x45\x97\x49\xbf\x39\x79\xfd\x2b\x1c\xa5\x85\x06\x8f\x60\x24\x40\xeb\x69\x10\x99\x3e\x29\xb2\x01\xd8\x80\x92\xc6\x6a\x46\xa3\xe8\xa1\xac\x2f\x19\x72\x48\x00\x62\x0c\x29\x02\xb2\x01\x4c\x65\x80\x6c\x87\x6e\x80\x21\x9b\x66\x53\x48\xbf\x3a\x04\xbb\x98\xcf\x0f\x87\x43\x8e\x09\x6e\x2e\xae\x9a\x9f\xaa\x9b\xbf\x5b\xbd\xb9\x5e\x6f\xae\x67\x09\x72\x36\x85\xf7\x46\x93\xf7\xe0\xe8\x9f\x96\x1d\x95\x50\x1c\x01\xad\xd5\xac\xb0\xd0\x04\x1a\x0f\x51\xb8\xa4\x4e\x12\x9d\x0d\x1c\x1c\x07\x36\xd5\x15\xf8\x5e\xf5\x6c\x7a\xa6\xce\x03\x5d\x27\x78\xec\xcf\x1c\xc4\x00\x1a\x98\x2c\x37\xb0\xda\x4c\xe0\xb7\xe5\x66\xb5\xb9\xca\xa6\xf0\x61\x75\xff\xc7\xed\xfb\x7b\xf8\xb0\xbc\xbb\x5b\xae\xef\x57\xd7\x1b\xb8\xbd\x83\x37\xb7\xeb\xb7\xab\xfb\xd5\xed\x7a\x03\xb7\x37\xb0\x5c\x7f\x84\x3f\x57\xeb\xb7\x57\x40\x1c\x6a\x72\x40\x9f\xac\x8b\xf8\xc5\x01\x47\x22\xa9\x8c\x9a\x9e\x1a\xe8\x04\x20\xf6\x47\x7c\xf6\x96\x14\x6f\x59\x81\x46\x53\xb5\x58\x11\x54\xb2\x27\x67\x62\x7b\x58\x72\x0d\xfb\x28\xa7\x07\x34\x65\x36\x05\xcd\x0d\x87\xd4\x45\x7e\x5c\x54\x4c\xf3\x92\x67\x2b\xdb\xb1\x29\x17\x70\x27\x9a\x32\xb4\xdc\x77\xd6\x02\x5c\x81\x2a\xc7\x36\xd4\xe2\xf8\x73\x02\x93\xef\x7e\xf1\x39\xcb\x7c\xff\x53\xd6\x50\xc0\x12\x03\x2e\x32\x00\x83\x0d\x2d\x40\x61\x43\x7a\xb6\x9b\x89\x25\x87\x41\x5c\x06\xa0\xb1\x20\xed\xa3\x0b\x44\x69\x17\x30\xe9\x9d\x26\x99\x6b\x35\xf9\x45\x36\x03\xb4\xfc\xbb\x93\xd6\x26\xb7\x59\x17\x65\xd0\x3e\x19\x80\x23\x2f\xad\x53\xd4\x7b\x4c\x7e\x98\x64\x00\x7b\x72\xc5\xc0\x30\x8a\x33\x99\x8c\xdf\xb4\x52\xfa\xb4\xf0\xe4\xf6\xac\xa8\x7b\x20\x53\x5a\x61\x13\xba\x27\x1b\xab\xf7\x81\x4c\xd8\x8b\x6e\x1b\x52\x1a\xb9\xe9\xb6\x94\x98\x2d\x57\x0d\xda\x53\x10\xe5\x28\x9c\x05\x44\xa5\xa4\xed\x22\x0d\xf0\x29\x47\x18\x28\x2d\x4b\xd2\x74\xb6\x54\xa2\x35\xa9\xc8\x6d\x32\x56\x14\xd2\xbf\x66\xdf\x2d\x2c\x06\x55\xa7\x55\x6b\xcb\x53\x94\x43\x32\x8e\x4b\xb6\xa2\x59\x1d\x1f\x2f\xbc\x64\xef\x5a\x1b\x13\x15\x6d\x59\xd1\xf3\x30\x9e\xe0\x0c\x72\x3f\x00\x4a\x18\x47\x20\x9e\x6c\x9a\x31\x2a\x27\xba\x97\x20\xae\x0a\x36\x71\x56\x5e\x8a\xbb\x47\x58\xa3\x3d\xfd\x97\x96\x0f\xe1\x47\x99\x9f\x48\x82\x36\xb5\xce\x57\x69\x4a\xb2\x5a\x8e\x0d\x9d\x3a\xd0\x51\x9a\x81\xfe\x4b\x6f\x05\x0c\xb4\x6d\xb5\x7f\xa6\x68\x2f\x4f\x4e\xd1\xfb\x7e\x05\x5c\x39\x31\x7f\x4b\x71\x21\x50\x3d\x99\x18\xfa\xe1\x7e\x47\x71\xcc\xa7\xe0\x7e\x01\xa6\xd5\xfa\x11\xaa\x91\x1a\x31\x63\x22\x9f\x2b\x20\x7d\x0a\x64\xd2\x9c\x1e\xc7\x66\x53\xc5\xcf\x01\x5d\xb2\x81\x67\x30\x29\x5a\xd6\x65\x2e\x96\x8c\xaf\x79\x1b\x72\x96\x47\x3a\x3b\x39\x75\xe3\xcc\x8f\x0c\xf3\x03\x15\xb5\xc8\x6e\xb0\x73\xe1\x9a\xb8\xc1\x8a\xbe\x55\x53\x72\xf2\xc1\x11\x36\xdd\xf2\x6b\x6b\x83\xd6\xf6\x03\xe6\xcc\x3e\x36\xcc\x87\xa3\x7d\xb0\x11\xf0\xa2\xe3\xa9\x17\xe3\x8c\x88\xef\x3d\x01\x67\x42\xb3\xf1\x01\x4d\xe0\x53\xf2\xa7\x36\x0b\x36\xe8\x8e\x83\x76\x98\x2b\x2d\x86\x1e\xa5\xe2\x49\x11\x9d\xb4\xe1\x9b\x22\x26\xa7\xcb\x72\x3c\xc6\xf9\x14\xcc\xb9\x6a\x7d\x90\x66\x56\x4b\xca\xf6\x0c\x2e\xd2\x35\xc1\x54\xf9\xce\x60\xe0\x3d\xe5\x25\xed\xc7\xc1\x07\x97\x93\x0b\xb0\x90\x3e\x7a\x63\x8c\x33\x68\xc8\x7b\xac\xbe\x89\x7e\x74\x3b\xfb\xbf\x80\x7f\xc7\xc5\x43\xe9\xd6\x07\x72\xa7\xfb\xc7\x00\x6c\xbc\x84\x0c\xfc\xd7\xd8\x7c\x51\xe5\xe8\x03\x35\x8b\x34\x0d\x66\xe9\x14\x90\x1b\x83\x68\xc4\x70\x10\x17\x59\x52\xe2\x48\x7c\xae\xa4\x79\x52\xe2\xde\xfb\x52\xfd\xbe\xc3\xed\x0e\xf3\x38\x33\x9a\xcf\xfc\xf8\x79\x0c\x62\x59\x75\x73\x30\x79\x3f\xef\xbb\xf9\x6f\x00\x00\x00\xff\xff\x46\x45\x13\xf8\xfb\x0f\x00\x00"), }, "/operator-role-openshift.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-role-openshift.yaml", modTime: time.Time{}, - uncompressedSize: 3022, + uncompressedSize: 3171, - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x54\x41\x8f\xdb\x46\x0f\xbd\xeb\x57\x10\xd2\x25\xf9\xb0\x96\xbf\xf6\x54\xb8\x27\x37\xd9\x6d\x8d\x06\x36\xb0\x72\x1a\xe4\x48\x8d\x68\x89\xdd\xd1\x70\x3a\x33\xb2\xe2\xfe\xfa\x42\x23\x39\xb1\xa3\x5d\xa4\x05\x02\xd8\x17\x53\x1c\xea\xf1\xf1\x3d\x6a\x32\x58\x7c\xbf\x5f\x92\xc1\x3b\x56\x64\x3c\x55\x10\x04\x42\x43\xb0\xb6\xa8\x1a\x82\x42\x0e\xa1\x47\x47\xf0\x20\x9d\xa9\x30\xb0\x18\x78\xb5\x2e\x1e\x5e\x43\x67\x2a\x72\x20\x86\x40\x1c\xb4\xe2\x28\xc9\x40\x89\x09\x8e\xcb\x2e\x88\x03\x3d\x02\x02\xd6\x8e\xa8\x25\x13\x7c\x0e\x50\x10\x45\xf4\xed\x6e\xbf\x79\x73\x0f\x07\xd6\x04\x15\xfb\xf1\x25\xaa\xa0\xe7\xd0\x24\x19\x84\x86\x3d\xf4\xe2\x9e\xe0\x20\x0e\xb0\xaa\x78\x68\x8c\x1a\xd8\x1c\xc4\xb5\x23\x0d\x47\x35\xba\x8a\x4d\x0d\x4a\xec\xc9\x71\xdd\x04\x90\xde\x90\xf3\x0d\xdb\x3c\xc9\x60\x3f\x8c\x51\x3c\x9c\x99\xf8\x11\x36\xf6\x0c\x02\x1f\xa5\x9b\x66\xb8\x18\x77\x52\xe1\x0e\xfe\x20\xe7\x87\x26\x3f\xe6\xff\x4f\x32\x78\x35\x94\xa4\xd3\x61\xfa\xfa\x67\x38\x49\x07\x2d\x9e\xc0\x48\x80\xce\xd3\x05\x32\x7d\x52\x64\x03\xb0\x01\x25\xad\xd5\x8c\x46\xd1\x97\xb1\x3e\x77\xc8\x21\x12\x18\x30\xa4\x0c\xc8\x06\x30\x8e\x01\x72\xb8\x2c\x03\x0c\x49\x96\x64\x10\x7f\x4d\x08\x76\xb5\x5c\xf6\x7d\x9f\x63\xa4\x9b\x8b\xab\x97\xe7\xe9\x96\xef\x36\x6f\xee\xb7\xc5\xfd\x22\x52\x4e\x32\x78\x6f\x34\x79\x0f\x8e\xfe\xea\xd8\x51\x05\xe5\x09\xd0\x5a\xcd\x0a\x4b\x4d\xa0\xb1\x1f\x8c\x8b\xee\x44\xd3\xd9\x40\xef\x38\xb0\xa9\xef\xc0\x4f\xae\x27\xd9\x95\x3b\x5f\xe4\x3a\xd3\x63\x7f\x55\x20\x06\xd0\x40\xba\x2e\x60\x53\xa4\xf0\xcb\xba\xd8\x14\x77\x49\x06\x1f\x36\xfb\xdf\x76\xef\xf7\xf0\x61\xfd\xf8\xb8\xde\xee\x37\xf7\x05\xec\x1e\xe1\xcd\x6e\xfb\x76\xb3\xdf\xec\xb6\x05\xec\x1e\x60\xbd\xfd\x08\xbf\x6f\xb6\x6f\xef\x80\x38\x34\xe4\x80\x3e\x59\x37\xf0\x17\x07\x3c\x08\x49\xd5\xe0\xe9\x79\x81\xce\x04\x86\xfd\x18\x9e\xbd\x25\xc5\x07\x56\xa0\xd1\xd4\x1d\xd6\x04\xb5\x1c\xc9\x99\x61\x3d\x2c\xb9\x96\xfd\x60\xa7\x07\x34\x55\x92\x81\xe6\x96\x43\xdc\x22\x3f\x1f\x6a\x68\xf3\x3d\xbf\xad\xe4\x89\x4d\xb5\x82\x47\xd1\x94\xa0\xe5\x69\xb3\x56\xe0\x4a\x54\x39\x76\xa1\x11\xc7\x7f\x47\x32\xf9\xd3\x4f\x3e\x67\x59\x1e\x7f\x48\x5a\x0a\x58\x61\xc0\x55\x02\x60\xb0\xa5\x15\x28\x6c\x49\x2f\x9e\x16\x62\xc9\x61\x10\x97\x00\x68\x2c\x49\xfb\xa1\x04\x06\x6b\x57\x90\x4e\x45\x69\xe2\x3a\x4d\x7e\x95\x2c\x00\x2d\xff\xea\xa4\xb3\xb1\x6c\x31\xa2\x5c\xac\x4f\x02\xe0\xc8\x4b\xe7\x14\x4d\x15\xe9\xff\xd2\x04\xe0\x48\xae\xbc\x48\xcc\x70\xd2\x74\xfe\xa6\x95\xca\xc7\xc0\x93\x3b\xb2\xa2\xf1\x81\x4c\x65\x85\x4d\x18\x9f\xec\x30\xbd\x0f\x64\xc2\x51\x74\xd7\x92\xd2\xc8\xed\x78\xa4\xc4\x1c\xb8\x6e\xd1\x9e\x41\x94\xa3\x70\x05\x88\x4a\x49\x37\x22\x5d\xf0\x53\x8e\x30\x50\x0c\x2b\xd2\x74\x15\x2a\xd1\x9a\xd4\xa0\x6d\x4c\xd6\x14\xe2\xbf\x66\x3f\x06\x16\x83\x6a\x62\xd4\xd9\xea\x8c\xd2\xc7\xe4\x6c\xe4\x17\xfd\x9a\x2b\xe1\x44\x4f\xd3\x0f\x51\xc9\x66\xb8\xa6\x6e\x44\xfb\x39\xa7\xe8\x48\x33\x19\x67\x4d\x5e\xc0\x43\x1b\x0d\xfa\x0a\xb1\x22\xab\xe5\xd4\xd2\xd9\x67\x47\xf1\xa6\xf1\x9f\x1d\x0c\x18\xe8\xd0\xe9\x29\x71\x03\x1d\xca\xa9\xf6\x2b\xe2\xca\x89\xf9\x53\xca\x1b\x91\x9a\xc4\xc4\x30\x5d\xa1\x8f\x34\x5c\xa6\x11\xdc\xaf\xc0\x74\x5a\x3f\x23\x35\x52\x2b\x66\x2e\xe4\xbf\x35\x30\x2e\xc4\x02\xd2\xb2\x63\x5d\xe5\x62\xc9\xf8\x86\x0f\x21\x67\x79\x66\x53\x62\xd1\xf8\x65\xfa\x59\x62\xd9\x53\xd9\x88\x3c\x5d\x9c\xdc\x72\xc9\x17\x90\x72\x8b\x35\x7d\x6b\xa6\x58\xe4\x83\x23\x6c\xc7\xf0\xeb\x6c\x8b\xd6\x4e\x1f\xec\x55\x7e\x9e\x58\x5e\xde\x52\x17\x07\x01\x6f\xfa\xb9\x4f\x66\x5c\x09\xf1\x5f\xd7\xec\xca\x68\x36\x3e\xa0\x09\x7c\x6e\xfe\xd2\x61\xc9\x06\xdd\xe9\x62\x1d\x96\x4a\x8b\xa1\x67\xa5\x78\xd1\x44\x27\x5d\xf8\xa6\x89\xb1\xe8\xb6\x1a\xcf\x79\xbe\x44\x73\xa9\x3a\x1f\xa4\x5d\x34\x12\xbb\xcd\x29\xff\x13\x00\x00\xff\xff\x6e\xa3\x9a\x29\xce\x0b\x00\x00"), + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x54\xc1\x8e\xdb\x36\x10\xbd\xeb\x2b\x06\xd2\x25\x29\xd6\x76\xdb\x53\xe1\x9e\xdc\xcd\x6e\x6b\x34\xb0\x81\xb5\xd3\x20\xc7\x11\x35\x96\xa6\x4b\x71\x58\x92\xb2\xe3\x7e\x7d\x41\x4a\xce\xda\xab\x5d\xa4\x01\x02\xd8\x17\x8f\x86\xa3\x37\x6f\xe6\x3d\xb1\x80\xc9\xf7\xfb\x65\x05\xbc\x67\x45\xc6\x53\x05\x41\x20\x34\x04\x0b\x8b\xaa\x21\xd8\xc8\x2e\x1c\xd0\x11\xdc\x4b\x67\x2a\x0c\x2c\x06\xde\x2c\x36\xf7\x6f\xa1\x33\x15\x39\x10\x43\x20\x0e\x5a\x71\x94\x15\xa0\xc4\x04\xc7\x65\x17\xc4\x81\xee\x01\x01\x6b\x47\xd4\x92\x09\x7e\x0a\xb0\x21\x4a\xe8\xab\xf5\x76\x79\x7b\x07\x3b\xd6\x04\x15\xfb\xfe\x25\xaa\xe0\xc0\xa1\xc9\x0a\x08\x0d\x7b\x38\x88\x7b\x84\x9d\x38\xc0\xaa\xe2\xd8\x18\x35\xb0\xd9\x89\x6b\x7b\x1a\x8e\x6a\x74\x15\x9b\x1a\x94\xd8\xa3\xe3\xba\x09\x20\x07\x43\xce\x37\x6c\xa7\x59\x01\xdb\x38\xc6\xe6\xfe\xc4\xc4\xf7\xb0\xa9\x67\x10\xf8\x24\xdd\x30\xc3\xd9\xb8\xc3\x16\x6e\xe0\x2f\x72\x3e\x36\xf9\x79\xfa\x63\x56\xc0\x9b\x58\x92\x0f\x87\xf9\xdb\x5f\xe1\x28\x1d\xb4\x78\x04\x23\x01\x3a\x4f\x67\xc8\xf4\x59\x91\x0d\xc0\x06\x94\xb4\x56\x33\x1a\x45\x4f\x63\x7d\xe9\x30\x85\x44\x20\x62\x48\x19\x90\x0d\x60\x1a\x03\x64\x77\x5e\x06\x18\xb2\x22\x2b\x20\xfd\x9a\x10\xec\x7c\x36\x3b\x1c\x0e\x53\x4c\x74\xa7\xe2\xea\xd9\x69\xba\xd9\xfb\xe5\xed\xdd\x6a\x73\x37\x49\x94\xb3\x02\x3e\x18\x4d\xde\x83\xa3\x7f\x3a\x76\x54\x41\x79\x04\xb4\x56\xb3\xc2\x52\x13\x68\x3c\x44\xe1\x92\x3a\x49\x74\x36\x70\x70\x1c\xd8\xd4\x37\xe0\x07\xd5\xb3\xe2\x42\x9d\xa7\x75\x9d\xe8\xb1\xbf\x28\x10\x03\x68\x20\x5f\x6c\x60\xb9\xc9\xe1\xb7\xc5\x66\xb9\xb9\xc9\x0a\xf8\xb8\xdc\xfe\xb1\xfe\xb0\x85\x8f\x8b\x87\x87\xc5\x6a\xbb\xbc\xdb\xc0\xfa\x01\x6e\xd7\xab\x77\xcb\xed\x72\xbd\xda\xc0\xfa\x1e\x16\xab\x4f\xf0\xe7\x72\xf5\xee\x06\x88\x43\x43\x0e\xe8\xb3\x75\x91\xbf\x38\xe0\xb8\x48\xaa\xa2\xa6\x27\x03\x9d\x08\x44\x7f\xc4\x67\x6f\x49\xf1\x8e\x15\x68\x34\x75\x87\x35\x41\x2d\x7b\x72\x26\xda\xc3\x92\x6b\xd9\x47\x39\x3d\xa0\xa9\xb2\x02\x34\xb7\x1c\x92\x8b\xfc\x78\xa8\xd8\xe6\x7b\x7e\x5b\xd9\x23\x9b\x6a\x0e\x0f\xa2\x29\x43\xcb\x83\xb3\xe6\xe0\x4a\x54\x53\xec\x42\x23\x8e\xff\x4d\x64\xa6\x8f\xbf\xf8\x29\xcb\x6c\xff\x53\xd6\x52\xc0\x0a\x03\xce\x33\x00\x83\x2d\xcd\x41\x61\x4b\x7a\xf2\x38\x11\x4b\x0e\x83\xb8\x0c\x40\x63\x49\xda\xc7\x12\x88\xd2\xce\x21\x1f\x8a\xf2\xcc\x75\x9a\xfc\x3c\x9b\x00\x5a\xfe\xdd\x49\x67\x53\xd9\xa4\x47\x39\xb3\x4f\x06\xe0\xc8\x4b\xe7\x14\x0d\x15\xf9\x0f\x79\x06\xb0\x27\x57\x9e\x25\x46\x38\x79\x3e\x7e\xd3\x4a\xe5\x53\xe0\xc9\xed\x59\x51\xff\x40\xa6\xb2\xc2\x26\xf4\x4f\x36\x4e\xef\x03\x99\xb0\x17\xdd\xb5\xa4\x34\x72\xdb\x1f\x29\x31\x3b\xae\x5b\xb4\x27\x10\xe5\x28\x5c\x00\xa2\x52\xd2\xf5\x48\x67\xfc\x94\x23\x0c\x94\xc2\x8a\x34\x5d\x84\x4a\xb4\x26\x15\x77\x9b\x92\x35\x85\xf4\xaf\xd9\xf7\x81\xc5\xa0\x9a\x14\x75\xb6\x3a\xa1\x1c\x52\xf2\xd9\xc8\x69\x68\x2b\x9a\xd5\x71\x34\xfa\x30\x7c\xc5\xde\x75\x36\x36\x2b\xbb\xaa\xa6\x4b\x9e\x17\x4c\x2f\xb8\x3e\x11\xbb\xe0\x71\xc6\xf3\x89\xe9\x48\x87\x57\x4d\x34\x96\xc7\x89\x1e\x24\x89\x51\xc9\x26\xde\x9d\x57\xd9\xe5\xcb\xf6\xa1\x3d\x8d\xb4\x1d\x35\x79\x05\x0f\x6d\x72\xcd\x33\xc4\x8a\xac\x96\x63\x4b\x27\xf3\x39\x4a\xd7\x9f\xff\x62\xab\x80\x81\x76\x9d\xf6\x74\x1d\x4f\x4d\xa0\x1c\x6a\x9f\x11\x57\x4e\xcc\xdf\x52\x5e\x89\xd4\xb0\x4c\x0c\xc3\xbd\xfe\x40\xf1\x86\x4f\xe0\x7e\x0e\xa6\xd3\xfa\x85\x55\x23\xb5\x62\xc6\x8b\xfc\xbf\x02\x26\x43\x4c\x20\x2f\x3b\xd6\xd5\x54\x2c\x19\xdf\xf0\x2e\x4c\x59\x5e\x70\x4a\x2a\xea\xaf\x0b\x3f\x4a\xcc\x0e\x54\x36\x22\x8f\x67\x27\xd7\x34\xf9\x04\x72\x6e\xb1\xa6\xaf\xcd\x94\x8a\x7c\x70\x84\x6d\x1f\x3e\xcf\xb6\x68\xed\xf0\xc1\x5e\xe4\xc7\x89\xd9\xf9\xd5\x79\x76\x10\xf0\xaa\x9f\xfb\x20\xc6\xc5\x22\xbe\xd5\x66\x17\x42\xb3\xf1\x01\x4d\xe0\x53\xf3\xd7\x0e\x4b\x36\xe8\x8e\x67\x76\x98\x29\x2d\x86\x5e\x5c\xc5\xab\x22\x3a\xe9\xc2\x57\x45\x4c\x45\xd7\xdd\xf1\x98\xe7\x6b\x34\x67\xaa\xf3\x41\xda\x49\x23\xa9\xdb\x98\xf2\x7f\x01\x00\x00\xff\xff\xcc\xb8\x28\xf3\x63\x0c\x00\x00"), }, "/operator-role-servicemonitors.yaml": &vfsgen۰CompressedFileInfo{ name: "operator-role-servicemonitors.yaml", diff --git a/pkg/trait/pod.go b/pkg/trait/pod.go new file mode 100644 index 0000000000..95abcd4c41 --- /dev/null +++ b/pkg/trait/pod.go @@ -0,0 +1,107 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package trait + +import ( + "fmt" + v1 "github.com/apache/camel-k/pkg/apis/camel/v1" + "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// The Pod trait allows to configure the PodDisruptionBudget resource. +// +// +camel-k:trait=pod +type podTrait struct { + BaseTrait `property:",squash"` + MaxUnavailable string `property:"max-unavailable" json:"maxUnavailable,omitempty"` + MinAvailable string `property:"min-available" json:"minAvailable,omitempty"` +} + +func newPodTrait() Trait { + return &podTrait{ + BaseTrait: NewBaseTrait("pod", 900), + } +} + +func (t *podTrait) Configure(e *Environment) (bool, error) { + if t.Enabled != nil && !*t.Enabled { + return false, nil + } + + return e.IntegrationInPhase( + v1.IntegrationPhaseDeploying, + v1.IntegrationPhaseRunning, + ), nil +} + +func (t *podTrait) Apply(e *Environment) error { + pdb, err := t.generatePodDisruptionBudget(e) + if err != nil { + return err + } + if pdb != nil { + e.Resources.Add(pdb) + } + + return nil +} + +func (t *podTrait) generatePodDisruptionBudget(e *Environment) (*v1beta1.PodDisruptionBudget, error) { + if t.MaxUnavailable == "" && t.MinAvailable == "" { + return nil, nil + } + if t.MaxUnavailable != "" && t.MinAvailable != "" { + return nil, fmt.Errorf("both minAvailable and maxUnavailable can't be set simultaneously") + } + if s, err := e.DetermineControllerStrategy(); err != nil { + return nil, fmt.Errorf("unable to determine the controller stratedy") + } else if s == ControllerStrategyCronJob { + return nil, fmt.Errorf("poddisruptionbudget isn't supported with cron-job controller strategy") + } + + integration := e.Integration + spec := v1beta1.PodDisruptionBudgetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: map[string]string{ + v1.IntegrationLabel: integration.Name, + }, + }, + } + + var min, max intstr.IntOrString + + if t.MaxUnavailable != "" { + max = intstr.Parse(t.MaxUnavailable) + spec.MaxUnavailable = &max + + } else { + min = intstr.Parse(t.MinAvailable) + spec.MinAvailable = &min + } + + return &v1beta1.PodDisruptionBudget{ + ObjectMeta: metav1.ObjectMeta{ + Name: integration.Name, + Namespace: integration.Namespace, + Labels: integration.Labels, + }, + Spec: spec, + }, nil +} diff --git a/pkg/trait/pod_test.go b/pkg/trait/pod_test.go new file mode 100644 index 0000000000..94e4a9e28c --- /dev/null +++ b/pkg/trait/pod_test.go @@ -0,0 +1,121 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package trait + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + v1 "github.com/apache/camel-k/pkg/apis/camel/v1" + "github.com/apache/camel-k/pkg/util/kubernetes" +) + +func TestConfigurePodTraitDoesSucceed(t *testing.T) { + podTrait, environment, _ := createPodTest() + configured, err := podTrait.Configure(environment) + + assert.True(t, configured) + assert.Nil(t, err) +} + +func TestPdbIsNotCreated(t *testing.T) { + podTrait, environment, _ := createPodTest() + err := podTrait.Apply(environment) + // no pdb params are set - do nothing + assert.Nil(t, err) + assert.Nil(t, findPdb(environment.Resources)) + + podTrait.MinAvailable = "1" + podTrait.MaxUnavailable = "2" + err = podTrait.Apply(environment) + assert.NotNil(t, err) + assert.Nil(t, findPdb(environment.Resources)) +} + +func TestPdbIsCreatedWithMaxUnavailable(t *testing.T) { + podTrait, environment, _ := createPodTest() + podTrait.MaxUnavailable = "1" + + pdb := refactorPdbIsCreated(podTrait, environment, t) + assert.Equal(t, int32(1), pdb.Spec.MaxUnavailable.IntVal) +} + +func TestPdbIsCreatedWithMinAvailable(t *testing.T) { + podTrait, environment, _ := createPodTest() + podTrait.MinAvailable = "2" + + pdb := refactorPdbIsCreated(podTrait, environment, t) + assert.Equal(t, int32(2), pdb.Spec.MinAvailable.IntVal) +} + +func refactorPdbIsCreated(podTrait *podTrait, environment *Environment, t *testing.T) *v1beta1.PodDisruptionBudget { + err := podTrait.Apply(environment) + assert.Nil(t, err) + pdb := findPdb(environment.Resources) + + assert.NotNil(t, pdb) + assert.Equal(t, environment.Integration.Name, pdb.Name) + assert.Equal(t, environment.Integration.Namespace, pdb.Namespace) + assert.Equal(t, environment.Integration.Labels, pdb.Labels) + return pdb +} + +func findPdb(resources *kubernetes.Collection) *v1beta1.PodDisruptionBudget { + for _, a := range resources.Items() { + // v1beta1 + if _, ok := a.(*v1beta1.PodDisruptionBudget); ok { + return a.(*v1beta1.PodDisruptionBudget) + } + } + return nil +} + +func createPodTest() (*podTrait, *Environment, *appsv1.Deployment) { + trait := newPodTrait().(*podTrait) + enabled := true + trait.Enabled = &enabled + + deployment := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "integration-name", + }, + Spec: appsv1.DeploymentSpec{ + Template: corev1.PodTemplateSpec{}, + }, + } + + environment := &Environment{ + Integration: &v1.Integration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "integration-name", + }, + Status: v1.IntegrationStatus{ + Phase: v1.IntegrationPhaseDeploying, + }, + }, + Resources: kubernetes.NewCollection(deployment), + } + + return trait, environment, deployment +} diff --git a/pkg/trait/trait_register.go b/pkg/trait/trait_register.go index 30c4356e5e..6de8cfac9f 100644 --- a/pkg/trait/trait_register.go +++ b/pkg/trait/trait_register.go @@ -46,4 +46,5 @@ func init() { AddToTraits(newIstioTrait) AddToTraits(newIngressTrait) AddToTraits(newOwnerTrait) + AddToTraits(newPodTrait) }