From 9c82fc3c56a7fd7676b955e272eadac582ff1833 Mon Sep 17 00:00:00 2001 From: Neo2308 Date: Wed, 22 May 2024 05:54:47 +0530 Subject: [PATCH] * Update kubebuilder to v3.14.2 * Use operator-lib v0.13.0 instead of commit. * Regenerated testdata. --- go.mod | 17 ++++---- go.sum | 40 +++++++++---------- .../default/manager_auth_proxy_patch.yaml | 2 +- .../config/manager/manager.yaml | 12 +----- .../config/prometheus/monitor.yaml | 6 +-- .../rbac/auth_proxy_client_clusterrole.yaml | 6 +-- .../config/rbac/auth_proxy_role.yaml | 6 +-- .../config/rbac/auth_proxy_role_binding.yaml | 6 +-- .../config/rbac/auth_proxy_service.yaml | 6 +-- .../config/rbac/foo_editor_role.yaml | 6 +-- .../config/rbac/foo_viewer_role.yaml | 6 +-- .../rbac/ignore_secret_editor_role.yaml | 8 +--- .../rbac/ignore_secret_viewer_role.yaml | 8 +--- .../config/rbac/kustomization.yaml | 12 ++++++ .../config/rbac/leader_election_role.yaml | 6 +-- .../rbac/leader_election_role_binding.yaml | 6 +-- .../config/rbac/memcached_editor_role.yaml | 6 +-- .../config/rbac/memcached_viewer_role.yaml | 6 +-- .../config/rbac/memfin_editor_role.yaml | 6 +-- .../config/rbac/memfin_viewer_role.yaml | 6 +-- .../config/rbac/role_binding.yaml | 6 +-- 21 files changed, 62 insertions(+), 121 deletions(-) diff --git a/go.mod b/go.mod index ee14591..062c661 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ require ( github.com/kr/text v0.2.0 github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1 github.com/onsi/ginkgo/v2 v2.17.1 - github.com/onsi/gomega v1.32.0 - github.com/operator-framework/operator-lib v0.12.1-0.20240430173419-b394e34ce702 + github.com/onsi/gomega v1.33.0 + github.com/operator-framework/operator-lib v0.13.0 github.com/operator-framework/operator-registry v1.39.0 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.6.1 @@ -26,7 +26,7 @@ require ( k8s.io/kubectl v0.29.3 k8s.io/utils v0.0.0-20240102154912-e7106e64919e sigs.k8s.io/controller-runtime v0.17.2 - sigs.k8s.io/kubebuilder/v3 v3.14.1 + sigs.k8s.io/kubebuilder/v3 v3.14.2 sigs.k8s.io/yaml v1.4.0 ) @@ -84,13 +84,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.19.0 // indirect + golang.org/x/tools v0.20.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 // indirect diff --git a/go.sum b/go.sum index 2a62805..1744889 100644 --- a/go.sum +++ b/go.sum @@ -192,8 +192,8 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= -github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= +github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= +github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc6 h1:XDqvyKsJEbRtATzkgItUqBA7QHk58yxX1Ov9HERHNqU= @@ -204,8 +204,8 @@ github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bl github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/operator-framework/api v0.23.0 h1:kHymOwcHBpBVujT49SKOCd4EVG7Odwj4wl3NbOR2LLA= github.com/operator-framework/api v0.23.0/go.mod h1:oKcFOz+Xc1UhMi2Pzcp6qsO7wjS4r+yP7EQprQBXrfM= -github.com/operator-framework/operator-lib v0.12.1-0.20240430173419-b394e34ce702 h1:3aD8l95+Bfp6y0speIxgF+6bLpoAbvF6XxpCHrbUh0o= -github.com/operator-framework/operator-lib v0.12.1-0.20240430173419-b394e34ce702/go.mod h1:RDs1wGdOKWSMCO+BYSbqmmKGnD5jOP7TVP+KvoX8jMg= +github.com/operator-framework/operator-lib v0.13.0 h1:+TWgJhbJqyNix9m1LmHK5gY/lb3CGqZX3Wvl7K0k+6I= +github.com/operator-framework/operator-lib v0.13.0/go.mod h1:RDs1wGdOKWSMCO+BYSbqmmKGnD5jOP7TVP+KvoX8jMg= github.com/operator-framework/operator-registry v1.39.0 h1:GiAlmA2h16sLpLjVIuURd2ANm7wYoUbssGCJbdGauYw= github.com/operator-framework/operator-registry v1.39.0/go.mod h1:PxN7myibIBIHeXTNu65tIJkCl1HuFDMU3NN6jrPHJLs= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= @@ -326,31 +326,31 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -359,12 +359,12 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -378,8 +378,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -439,8 +439,8 @@ sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeG sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kubebuilder/v3 v3.14.1 h1:ryXUkU2Hd7eJUWrWd635NGjQSHhBG0QvRAvo6ux7NhM= -sigs.k8s.io/kubebuilder/v3 v3.14.1/go.mod h1:1IbNoW5yuKy/kMXrBpDgKPvvxaj2TgBNDdwFXQlC6bk= +sigs.k8s.io/kubebuilder/v3 v3.14.2 h1:LMZW8Y5eItnP4kh9tpp4Gs2Gd5V3DgLgzbNnXfMAShY= +sigs.k8s.io/kubebuilder/v3 v3.14.2/go.mod h1:gEZM8SUkewOQnpRDiewh4gmbQ1FMkT/CDlMddOg053M= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/testdata/memcached-molecule-operator/config/default/manager_auth_proxy_patch.yaml b/testdata/memcached-molecule-operator/config/default/manager_auth_proxy_patch.yaml index ac3a174..9e7c9f5 100644 --- a/testdata/memcached-molecule-operator/config/default/manager_auth_proxy_patch.yaml +++ b/testdata/memcached-molecule-operator/config/default/manager_auth_proxy_patch.yaml @@ -15,7 +15,7 @@ spec: capabilities: drop: - "ALL" - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.16.0 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" diff --git a/testdata/memcached-molecule-operator/config/manager/manager.yaml b/testdata/memcached-molecule-operator/config/manager/manager.yaml index a1b9951..d4a0f23 100644 --- a/testdata/memcached-molecule-operator/config/manager/manager.yaml +++ b/testdata/memcached-molecule-operator/config/manager/manager.yaml @@ -3,11 +3,7 @@ kind: Namespace metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: namespace - app.kubernetes.io/instance: system - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: system --- @@ -18,11 +14,7 @@ metadata: namespace: system labels: control-plane: controller-manager - app.kubernetes.io/name: deployment - app.kubernetes.io/instance: controller-manager - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize spec: selector: diff --git a/testdata/memcached-molecule-operator/config/prometheus/monitor.yaml b/testdata/memcached-molecule-operator/config/prometheus/monitor.yaml index 938d3fd..ccd442c 100644 --- a/testdata/memcached-molecule-operator/config/prometheus/monitor.yaml +++ b/testdata/memcached-molecule-operator/config/prometheus/monitor.yaml @@ -4,11 +4,7 @@ kind: ServiceMonitor metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: servicemonitor - app.kubernetes.io/instance: controller-manager-metrics-monitor - app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system diff --git a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_client_clusterrole.yaml b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_client_clusterrole.yaml index 297d52d..5e3faab 100644 --- a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_client_clusterrole.yaml @@ -2,11 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: metrics-reader - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: metrics-reader rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role.yaml b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role.yaml index c52a577..65c57ef 100644 --- a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role.yaml @@ -2,11 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: proxy-role - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: proxy-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role_binding.yaml b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role_binding.yaml index 17100ed..d1334ea 100644 --- a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role_binding.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_role_binding.yaml @@ -2,11 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/instance: proxy-rolebinding - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: proxy-rolebinding roleRef: diff --git a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_service.yaml b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_service.yaml index e67cda4..8ef67ed 100644 --- a/testdata/memcached-molecule-operator/config/rbac/auth_proxy_service.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/auth_proxy_service.yaml @@ -3,11 +3,7 @@ kind: Service metadata: labels: control-plane: controller-manager - app.kubernetes.io/name: service - app.kubernetes.io/instance: controller-manager-metrics-service - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system diff --git a/testdata/memcached-molecule-operator/config/rbac/foo_editor_role.yaml b/testdata/memcached-molecule-operator/config/rbac/foo_editor_role.yaml index 5ec5b21..ec97d56 100644 --- a/testdata/memcached-molecule-operator/config/rbac/foo_editor_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/foo_editor_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: foo-editor-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: foo-editor-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/foo_viewer_role.yaml b/testdata/memcached-molecule-operator/config/rbac/foo_viewer_role.yaml index 5b8540d..e7c1448 100644 --- a/testdata/memcached-molecule-operator/config/rbac/foo_viewer_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/foo_viewer_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: foo-viewer-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: foo-viewer-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/ignore_secret_editor_role.yaml b/testdata/memcached-molecule-operator/config/rbac/ignore_secret_editor_role.yaml index c9c7f3c..9711c29 100644 --- a/testdata/memcached-molecule-operator/config/rbac/ignore_secret_editor_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/ignore_secret_editor_role.yaml @@ -3,13 +3,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: secret-editor-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize - name: secret-editor-role + name: ignore-secret-editor-role rules: - apiGroups: - ignore.example.com diff --git a/testdata/memcached-molecule-operator/config/rbac/ignore_secret_viewer_role.yaml b/testdata/memcached-molecule-operator/config/rbac/ignore_secret_viewer_role.yaml index 46a0bb4..f150ef7 100644 --- a/testdata/memcached-molecule-operator/config/rbac/ignore_secret_viewer_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/ignore_secret_viewer_role.yaml @@ -3,13 +3,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: secret-viewer-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize - name: secret-viewer-role + name: ignore-secret-viewer-role rules: - apiGroups: - ignore.example.com diff --git a/testdata/memcached-molecule-operator/config/rbac/kustomization.yaml b/testdata/memcached-molecule-operator/config/rbac/kustomization.yaml index 731832a..ef15b7b 100644 --- a/testdata/memcached-molecule-operator/config/rbac/kustomization.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/kustomization.yaml @@ -16,3 +16,15 @@ resources: - auth_proxy_role.yaml - auth_proxy_role_binding.yaml - auth_proxy_client_clusterrole.yaml +# For each CRD, "Editor" and "Viewer" roles are scaffolded by +# default, aiding admins in cluster management. Those roles are +# not used by the Project itself. You can comment the following lines +# if you do not want those helpers be installed with your Project. +- ignore_secret_editor_role.yaml +- ignore_secret_viewer_role.yaml +- memfin_editor_role.yaml +- memfin_viewer_role.yaml +- foo_editor_role.yaml +- foo_viewer_role.yaml +- memcached_editor_role.yaml +- memcached_viewer_role.yaml diff --git a/testdata/memcached-molecule-operator/config/rbac/leader_election_role.yaml b/testdata/memcached-molecule-operator/config/rbac/leader_election_role.yaml index 2b2bc6e..31de2ad 100644 --- a/testdata/memcached-molecule-operator/config/rbac/leader_election_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/leader_election_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - app.kubernetes.io/name: role - app.kubernetes.io/instance: leader-election-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/leader_election_role_binding.yaml b/testdata/memcached-molecule-operator/config/rbac/leader_election_role_binding.yaml index 396ceeb..5ad0858 100644 --- a/testdata/memcached-molecule-operator/config/rbac/leader_election_role_binding.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/leader_election_role_binding.yaml @@ -2,11 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - app.kubernetes.io/name: rolebinding - app.kubernetes.io/instance: leader-election-rolebinding - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/testdata/memcached-molecule-operator/config/rbac/memcached_editor_role.yaml b/testdata/memcached-molecule-operator/config/rbac/memcached_editor_role.yaml index 52d84bb..4cb329d 100644 --- a/testdata/memcached-molecule-operator/config/rbac/memcached_editor_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/memcached_editor_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: memcached-editor-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: memcached-editor-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/memcached_viewer_role.yaml b/testdata/memcached-molecule-operator/config/rbac/memcached_viewer_role.yaml index ff6215c..70478d3 100644 --- a/testdata/memcached-molecule-operator/config/rbac/memcached_viewer_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/memcached_viewer_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: memcached-viewer-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: memcached-viewer-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/memfin_editor_role.yaml b/testdata/memcached-molecule-operator/config/rbac/memfin_editor_role.yaml index 25e7ca4..e6e450a 100644 --- a/testdata/memcached-molecule-operator/config/rbac/memfin_editor_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/memfin_editor_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: memfin-editor-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: memfin-editor-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/memfin_viewer_role.yaml b/testdata/memcached-molecule-operator/config/rbac/memfin_viewer_role.yaml index 458e917..bd30890 100644 --- a/testdata/memcached-molecule-operator/config/rbac/memfin_viewer_role.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/memfin_viewer_role.yaml @@ -3,11 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: memfin-viewer-role - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: memfin-viewer-role rules: diff --git a/testdata/memcached-molecule-operator/config/rbac/role_binding.yaml b/testdata/memcached-molecule-operator/config/rbac/role_binding.yaml index 4a8a546..32da245 100644 --- a/testdata/memcached-molecule-operator/config/rbac/role_binding.yaml +++ b/testdata/memcached-molecule-operator/config/rbac/role_binding.yaml @@ -2,11 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/instance: manager-rolebinding - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: memcached-molecule-operator - app.kubernetes.io/part-of: memcached-molecule-operator + app.kubernetes.io/name: memcached-molecule-operator app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: