diff --git a/go.mod b/go.mod index 883bcdba6c7..989b9333ce2 100644 --- a/go.mod +++ b/go.mod @@ -25,9 +25,10 @@ require ( k8s.io/api v0.25.4 k8s.io/apimachinery v0.25.4 k8s.io/client-go v0.25.4 - k8s.io/code-generator v0.25.4 + k8s.io/code-generator v0.27.0-alpha.2 k8s.io/klog/v2 v2.80.1 k8s.io/kubectl v0.25.4 + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 ) require ( @@ -63,8 +64,8 @@ require ( github.com/gdamore/tcell/v2 v2.5.3 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/goccy/go-json v0.9.11 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -132,6 +133,7 @@ require ( github.com/rivo/tview v0.0.0-20220916081518-2e69b7385a37 // indirect github.com/rivo/uniseg v0.4.2 // indirect github.com/rjeczalik/notify v0.9.2 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rs/xid v1.4.0 // indirect github.com/secure-io/sio-go v0.3.1 // indirect github.com/shirou/gopsutil/v3 v3.22.9 // indirect @@ -150,14 +152,14 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/mod v0.6.0 // indirect + golang.org/x/mod v0.7.0 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.2.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect - golang.org/x/tools v0.2.0 // indirect + golang.org/x/tools v0.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 // indirect google.golang.org/grpc v1.50.1 // indirect @@ -168,10 +170,9 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.4 // indirect k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect - k8s.io/kube-openapi v0.0.0-20221110221610-a28e98eb7c70 // indirect + k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/controller-runtime v0.13.1 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index bebc27e0d2c..8bc0b2f7551 100644 --- a/go.sum +++ b/go.sum @@ -326,12 +326,10 @@ github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -516,8 +514,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -543,8 +542,6 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2 github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -642,8 +639,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= -github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= +github.com/onsi/ginkgo/v2 v2.7.0 h1:/XxtEV3I3Eif/HobnVx9YmJgk8ENdRsuUmM+fLCFNow= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= 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-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= @@ -713,6 +710,8 @@ github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -877,8 +876,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/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.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1151,8 +1150,8 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= 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= @@ -1377,6 +1376,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/h2non/filetype.v1 v1.0.5 h1:CC1jjJjoEhNVbMhXYalmGBhOBK2V70Q1N850wt/98/Y= gopkg.in/h2non/filetype.v1 v1.0.5/go.mod h1:M0yem4rwSX5lLVrkEuRRp2/NinFMD5vgJ4DlAhZcfNo= @@ -1417,15 +1417,15 @@ k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc= k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= k8s.io/client-go v0.25.4 h1:3RNRDffAkNU56M/a7gUfXaEzdhZlYhoW8dgViGy5fn8= k8s.io/client-go v0.25.4/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw= -k8s.io/code-generator v0.25.4 h1:tjQ7/+9eN7UOiU2DP+0v4ntTI4JZLi2c1N0WllpFhTc= -k8s.io/code-generator v0.25.4/go.mod h1:9F5fuVZOMWRme7MYj2YT3L9ropPWPokd9VRhVyD3+0w= +k8s.io/code-generator v0.27.0-alpha.2 h1:PqcXW1ysqxmtOd0Cbg3GehGKtOzIbK2RknKm1zD5pDw= +k8s.io/code-generator v0.27.0-alpha.2/go.mod h1:LvnFZav6jeXpNjGI5UdUhZWi//ylS1kj2X7o0DI6/BA= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221110221610-a28e98eb7c70 h1:zfqQc1V6/ZgGpvrOVvr62OjiqQX4lZjfznK34NQwkqw= -k8s.io/kube-openapi v0.0.0-20221110221610-a28e98eb7c70/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a h1:s6zvHjyDQX1NtVT88pvw2tddqhqY0Bz0Gbnn+yctsFU= +k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/kubectl v0.25.4 h1:O3OA1z4V1ZyvxCvScjq0pxAP7ABgznr8UvnVObgI6Dc= k8s.io/kubectl v0.25.4/go.mod h1:CKMrQ67Bn2YCP26tZStPQGq62zr9pvzEf65A0navm8k= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= diff --git a/kubectl-minio/go.mod b/kubectl-minio/go.mod index c355ac52c27..dc8bc3205e1 100644 --- a/kubectl-minio/go.mod +++ b/kubectl-minio/go.mod @@ -31,8 +31,8 @@ require ( github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect @@ -84,7 +84,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.starlark.net v0.0.0-20220817180228-f738f5508c12 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/mod v0.6.0 // indirect + golang.org/x/mod v0.7.0 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.2.0 // indirect golang.org/x/sync v0.1.0 // indirect @@ -92,14 +92,14 @@ require ( golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.2.0 // indirect + golang.org/x/tools v0.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/kube-openapi v0.0.0-20221110221610-a28e98eb7c70 // indirect + k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect diff --git a/kubectl-minio/go.sum b/kubectl-minio/go.sum index 94184029fc2..f4bb9c6c392 100644 --- a/kubectl-minio/go.sum +++ b/kubectl-minio/go.sum @@ -20,6 +20,7 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -47,12 +48,10 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -117,19 +116,18 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.1 h1:U33DW0aiEj633gHYw3LoDNfkDiYnE5Q8M/TKJn2f2jI= github.com/klauspost/cpuid/v2 v2.2.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= @@ -204,14 +202,16 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tinylib/msgp v1.1.7-0.20211026165309-e818a1881b0e h1:P5tyWbssToKowBPTA1/EzqPXwrZNc8ZeNPdjgpcDEoI= github.com/tinylib/msgp v1.1.7-0.20211026165309-e818a1881b0e/go.mod h1:g7jEyb18KPe65d9RRhGw+ThaJr5duyBH8eaFgBUor7Y= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= @@ -246,8 +246,8 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -324,8 +324,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= 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= @@ -361,9 +361,9 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -392,8 +392,8 @@ k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221110221610-a28e98eb7c70 h1:zfqQc1V6/ZgGpvrOVvr62OjiqQX4lZjfznK34NQwkqw= -k8s.io/kube-openapi v0.0.0-20221110221610-a28e98eb7c70/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a h1:s6zvHjyDQX1NtVT88pvw2tddqhqY0Bz0Gbnn+yctsFU= +k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= diff --git a/pkg/apis/minio.min.io/v2/types.go b/pkg/apis/minio.min.io/v2/types.go index 7f7b3ab7764..e2d08091c1e 100644 --- a/pkg/apis/minio.min.io/v2/types.go +++ b/pkg/apis/minio.min.io/v2/types.go @@ -20,16 +20,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// Tenant is a https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/[Kubernetes object] describing a MinIO Tenant. + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:defaulter-gen=true +// +kubebuilder:object:root=true +// +kubebuilder:object:generate=true // +kubebuilder:subresource:status // +kubebuilder:resource:scope=Namespaced,shortName=tenant,singular=tenant // +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.currentState" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:storageversion - -// Tenant is a https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/[Kubernetes object] describing a MinIO Tenant. + type Tenant struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/pkg/apis/minio.min.io/v2/zz_generated.deepcopy.go b/pkg/apis/minio.min.io/v2/zz_generated.deepcopy.go index 0bcdb1b5372..c5b6e7af966 100644 --- a/pkg/apis/minio.min.io/v2/zz_generated.deepcopy.go +++ b/pkg/apis/minio.min.io/v2/zz_generated.deepcopy.go @@ -115,6 +115,27 @@ func (in *CertificateStatus) DeepCopy() *CertificateStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomCertificateConfig) DeepCopyInto(out *CustomCertificateConfig) { + *out = *in + if in.Domains != nil { + in, out := &in.Domains, &out.Domains + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCertificateConfig. +func (in *CustomCertificateConfig) DeepCopy() *CustomCertificateConfig { + if in == nil { + return nil + } + out := new(CustomCertificateConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomCertificates) DeepCopyInto(out *CustomCertificates) { *out = *in @@ -154,7 +175,7 @@ func (in *CustomCertificates) DeepCopyInto(out *CustomCertificates) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCertificate. +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCertificates. func (in *CustomCertificates) DeepCopy() *CustomCertificates { if in == nil { return nil @@ -164,27 +185,6 @@ func (in *CustomCertificates) DeepCopy() *CustomCertificates { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomCertificateConfig) DeepCopyInto(out *CustomCertificateConfig) { - *out = *in - if in.Domains != nil { - in, out := &in.Domains, &out.Domains - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCertificateConfig. -func (in *CustomCertificateConfig) DeepCopy() *CustomCertificateConfig { - if in == nil { - return nil - } - out := new(CustomCertificateConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExposeServices) DeepCopyInto(out *ExposeServices) { *out = *in diff --git a/pkg/client/applyconfiguration/internal/internal.go b/pkg/client/applyconfiguration/internal/internal.go new file mode 100644 index 00000000000..f8947621d09 --- /dev/null +++ b/pkg/client/applyconfiguration/internal/internal.go @@ -0,0 +1,62 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package internal + +import ( + "fmt" + "sync" + + typed "sigs.k8s.io/structured-merge-diff/v4/typed" +) + +func Parser() *typed.Parser { + parserOnce.Do(func() { + var err error + parser, err = typed.NewParser(schemaYAML) + if err != nil { + panic(fmt.Sprintf("Failed to parse schema: %v", err)) + } + }) + return parser +} + +var parserOnce sync.Once +var parser *typed.Parser +var schemaYAML = typed.YAMLObject(`types: +- name: __untyped_atomic_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic +- name: __untyped_deduced_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +`) diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/auditconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/auditconfig.go new file mode 100644 index 00000000000..afe9ac04d50 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/auditconfig.go @@ -0,0 +1,39 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// AuditConfigApplyConfiguration represents an declarative configuration of the AuditConfig type for use +// with apply. +type AuditConfigApplyConfiguration struct { + DiskCapacityGB *int `json:"diskCapacityGB,omitempty"` +} + +// AuditConfigApplyConfiguration constructs an declarative configuration of the AuditConfig type for use with +// apply. +func AuditConfig() *AuditConfigApplyConfiguration { + return &AuditConfigApplyConfiguration{} +} + +// WithDiskCapacityGB sets the DiskCapacityGB field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DiskCapacityGB field is set to the value of the last call. +func (b *AuditConfigApplyConfiguration) WithDiskCapacityGB(value int) *AuditConfigApplyConfiguration { + b.DiskCapacityGB = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/bucket.go b/pkg/client/applyconfiguration/minio.min.io/v2/bucket.go new file mode 100644 index 00000000000..cec561d23bb --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/bucket.go @@ -0,0 +1,57 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// BucketApplyConfiguration represents an declarative configuration of the Bucket type for use +// with apply. +type BucketApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Region *string `json:"region,omitempty"` + ObjectLocking *bool `json:"objectLock,omitempty"` +} + +// BucketApplyConfiguration constructs an declarative configuration of the Bucket type for use with +// apply. +func Bucket() *BucketApplyConfiguration { + return &BucketApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *BucketApplyConfiguration) WithName(value string) *BucketApplyConfiguration { + b.Name = &value + return b +} + +// WithRegion sets the Region field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Region field is set to the value of the last call. +func (b *BucketApplyConfiguration) WithRegion(value string) *BucketApplyConfiguration { + b.Region = &value + return b +} + +// WithObjectLocking sets the ObjectLocking field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObjectLocking field is set to the value of the last call. +func (b *BucketApplyConfiguration) WithObjectLocking(value bool) *BucketApplyConfiguration { + b.ObjectLocking = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/certificateconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/certificateconfig.go new file mode 100644 index 00000000000..dfe17b043bb --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/certificateconfig.go @@ -0,0 +1,61 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// CertificateConfigApplyConfiguration represents an declarative configuration of the CertificateConfig type for use +// with apply. +type CertificateConfigApplyConfiguration struct { + CommonName *string `json:"commonName,omitempty"` + OrganizationName []string `json:"organizationName,omitempty"` + DNSNames []string `json:"dnsNames,omitempty"` +} + +// CertificateConfigApplyConfiguration constructs an declarative configuration of the CertificateConfig type for use with +// apply. +func CertificateConfig() *CertificateConfigApplyConfiguration { + return &CertificateConfigApplyConfiguration{} +} + +// WithCommonName sets the CommonName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CommonName field is set to the value of the last call. +func (b *CertificateConfigApplyConfiguration) WithCommonName(value string) *CertificateConfigApplyConfiguration { + b.CommonName = &value + return b +} + +// WithOrganizationName adds the given value to the OrganizationName field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OrganizationName field. +func (b *CertificateConfigApplyConfiguration) WithOrganizationName(values ...string) *CertificateConfigApplyConfiguration { + for i := range values { + b.OrganizationName = append(b.OrganizationName, values[i]) + } + return b +} + +// WithDNSNames adds the given value to the DNSNames field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the DNSNames field. +func (b *CertificateConfigApplyConfiguration) WithDNSNames(values ...string) *CertificateConfigApplyConfiguration { + for i := range values { + b.DNSNames = append(b.DNSNames, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/certificatestatus.go b/pkg/client/applyconfiguration/minio.min.io/v2/certificatestatus.go new file mode 100644 index 00000000000..e79c887ec57 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/certificatestatus.go @@ -0,0 +1,48 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// CertificateStatusApplyConfiguration represents an declarative configuration of the CertificateStatus type for use +// with apply. +type CertificateStatusApplyConfiguration struct { + AutoCertEnabled *bool `json:"autoCertEnabled,omitempty"` + CustomCertificates *CustomCertificatesApplyConfiguration `json:"customCertificates,omitempty"` +} + +// CertificateStatusApplyConfiguration constructs an declarative configuration of the CertificateStatus type for use with +// apply. +func CertificateStatus() *CertificateStatusApplyConfiguration { + return &CertificateStatusApplyConfiguration{} +} + +// WithAutoCertEnabled sets the AutoCertEnabled field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AutoCertEnabled field is set to the value of the last call. +func (b *CertificateStatusApplyConfiguration) WithAutoCertEnabled(value bool) *CertificateStatusApplyConfiguration { + b.AutoCertEnabled = &value + return b +} + +// WithCustomCertificates sets the CustomCertificates field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CustomCertificates field is set to the value of the last call. +func (b *CertificateStatusApplyConfiguration) WithCustomCertificates(value *CustomCertificatesApplyConfiguration) *CertificateStatusApplyConfiguration { + b.CustomCertificates = value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/customcertificateconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/customcertificateconfig.go new file mode 100644 index 00000000000..0e94e32b5aa --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/customcertificateconfig.go @@ -0,0 +1,77 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// CustomCertificateConfigApplyConfiguration represents an declarative configuration of the CustomCertificateConfig type for use +// with apply. +type CustomCertificateConfigApplyConfiguration struct { + CertName *string `json:"certName,omitempty"` + Domains []string `json:"domains,omitempty"` + Expiry *string `json:"expiry,omitempty"` + ExpiresIn *string `json:"expiresIn,omitempty"` + SerialNo *string `json:"serialNo,omitempty"` +} + +// CustomCertificateConfigApplyConfiguration constructs an declarative configuration of the CustomCertificateConfig type for use with +// apply. +func CustomCertificateConfig() *CustomCertificateConfigApplyConfiguration { + return &CustomCertificateConfigApplyConfiguration{} +} + +// WithCertName sets the CertName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CertName field is set to the value of the last call. +func (b *CustomCertificateConfigApplyConfiguration) WithCertName(value string) *CustomCertificateConfigApplyConfiguration { + b.CertName = &value + return b +} + +// WithDomains adds the given value to the Domains field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Domains field. +func (b *CustomCertificateConfigApplyConfiguration) WithDomains(values ...string) *CustomCertificateConfigApplyConfiguration { + for i := range values { + b.Domains = append(b.Domains, values[i]) + } + return b +} + +// WithExpiry sets the Expiry field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Expiry field is set to the value of the last call. +func (b *CustomCertificateConfigApplyConfiguration) WithExpiry(value string) *CustomCertificateConfigApplyConfiguration { + b.Expiry = &value + return b +} + +// WithExpiresIn sets the ExpiresIn field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ExpiresIn field is set to the value of the last call. +func (b *CustomCertificateConfigApplyConfiguration) WithExpiresIn(value string) *CustomCertificateConfigApplyConfiguration { + b.ExpiresIn = &value + return b +} + +// WithSerialNo sets the SerialNo field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SerialNo field is set to the value of the last call. +func (b *CustomCertificateConfigApplyConfiguration) WithSerialNo(value string) *CustomCertificateConfigApplyConfiguration { + b.SerialNo = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/customcertificates.go b/pkg/client/applyconfiguration/minio.min.io/v2/customcertificates.go new file mode 100644 index 00000000000..90158e022c7 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/customcertificates.go @@ -0,0 +1,76 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" +) + +// CustomCertificatesApplyConfiguration represents an declarative configuration of the CustomCertificates type for use +// with apply. +type CustomCertificatesApplyConfiguration struct { + Client []*v2.CustomCertificateConfig `json:"client,omitempty"` + Minio []*v2.CustomCertificateConfig `json:"minio,omitempty"` + MinioCAs []*v2.CustomCertificateConfig `json:"minioCAs,omitempty"` +} + +// CustomCertificatesApplyConfiguration constructs an declarative configuration of the CustomCertificates type for use with +// apply. +func CustomCertificates() *CustomCertificatesApplyConfiguration { + return &CustomCertificatesApplyConfiguration{} +} + +// WithClient adds the given value to the Client field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Client field. +func (b *CustomCertificatesApplyConfiguration) WithClient(values ...**v2.CustomCertificateConfig) *CustomCertificatesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithClient") + } + b.Client = append(b.Client, *values[i]) + } + return b +} + +// WithMinio adds the given value to the Minio field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Minio field. +func (b *CustomCertificatesApplyConfiguration) WithMinio(values ...**v2.CustomCertificateConfig) *CustomCertificatesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithMinio") + } + b.Minio = append(b.Minio, *values[i]) + } + return b +} + +// WithMinioCAs adds the given value to the MinioCAs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the MinioCAs field. +func (b *CustomCertificatesApplyConfiguration) WithMinioCAs(values ...**v2.CustomCertificateConfig) *CustomCertificatesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithMinioCAs") + } + b.MinioCAs = append(b.MinioCAs, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/exposeservices.go b/pkg/client/applyconfiguration/minio.min.io/v2/exposeservices.go new file mode 100644 index 00000000000..4e4005e13f4 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/exposeservices.go @@ -0,0 +1,48 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// ExposeServicesApplyConfiguration represents an declarative configuration of the ExposeServices type for use +// with apply. +type ExposeServicesApplyConfiguration struct { + MinIO *bool `json:"minio,omitempty"` + Console *bool `json:"console,omitempty"` +} + +// ExposeServicesApplyConfiguration constructs an declarative configuration of the ExposeServices type for use with +// apply. +func ExposeServices() *ExposeServicesApplyConfiguration { + return &ExposeServicesApplyConfiguration{} +} + +// WithMinIO sets the MinIO field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MinIO field is set to the value of the last call. +func (b *ExposeServicesApplyConfiguration) WithMinIO(value bool) *ExposeServicesApplyConfiguration { + b.MinIO = &value + return b +} + +// WithConsole sets the Console field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Console field is set to the value of the last call. +func (b *ExposeServicesApplyConfiguration) WithConsole(value bool) *ExposeServicesApplyConfiguration { + b.Console = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/features.go b/pkg/client/applyconfiguration/minio.min.io/v2/features.go new file mode 100644 index 00000000000..23caee16c14 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/features.go @@ -0,0 +1,48 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// FeaturesApplyConfiguration represents an declarative configuration of the Features type for use +// with apply. +type FeaturesApplyConfiguration struct { + BucketDNS *bool `json:"bucketDNS,omitempty"` + Domains *TenantDomainsApplyConfiguration `json:"domains,omitempty"` +} + +// FeaturesApplyConfiguration constructs an declarative configuration of the Features type for use with +// apply. +func Features() *FeaturesApplyConfiguration { + return &FeaturesApplyConfiguration{} +} + +// WithBucketDNS sets the BucketDNS field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BucketDNS field is set to the value of the last call. +func (b *FeaturesApplyConfiguration) WithBucketDNS(value bool) *FeaturesApplyConfiguration { + b.BucketDNS = &value + return b +} + +// WithDomains sets the Domains field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Domains field is set to the value of the last call. +func (b *FeaturesApplyConfiguration) WithDomains(value *TenantDomainsApplyConfiguration) *FeaturesApplyConfiguration { + b.Domains = value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/kesconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/kesconfig.go new file mode 100644 index 00000000000..7e23a82771d --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/kesconfig.go @@ -0,0 +1,211 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// KESConfigApplyConfiguration represents an declarative configuration of the KESConfig type for use +// with apply. +type KESConfigApplyConfiguration struct { + Replicas *int32 `json:"replicas,omitempty"` + Image *string `json:"image,omitempty"` + ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + Configuration *v1.LocalObjectReference `json:"kesSecret,omitempty"` + ExternalCertSecret *LocalCertificateReferenceApplyConfiguration `json:"externalCertSecret,omitempty"` + ClientCertSecret *LocalCertificateReferenceApplyConfiguration `json:"clientCertSecret,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + KeyName *string `json:"keyName,omitempty"` + SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` +} + +// KESConfigApplyConfiguration constructs an declarative configuration of the KESConfig type for use with +// apply. +func KESConfig() *KESConfigApplyConfiguration { + return &KESConfigApplyConfiguration{} +} + +// WithReplicas sets the Replicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Replicas field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithReplicas(value int32) *KESConfigApplyConfiguration { + b.Replicas = &value + return b +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithImage(value string) *KESConfigApplyConfiguration { + b.Image = &value + return b +} + +// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullPolicy field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *KESConfigApplyConfiguration { + b.ImagePullPolicy = &value + return b +} + +// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceAccountName field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithServiceAccountName(value string) *KESConfigApplyConfiguration { + b.ServiceAccountName = &value + return b +} + +// WithConfiguration sets the Configuration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Configuration field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithConfiguration(value v1.LocalObjectReference) *KESConfigApplyConfiguration { + b.Configuration = &value + return b +} + +// WithExternalCertSecret sets the ExternalCertSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ExternalCertSecret field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithExternalCertSecret(value *LocalCertificateReferenceApplyConfiguration) *KESConfigApplyConfiguration { + b.ExternalCertSecret = value + return b +} + +// WithClientCertSecret sets the ClientCertSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClientCertSecret field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithClientCertSecret(value *LocalCertificateReferenceApplyConfiguration) *KESConfigApplyConfiguration { + b.ClientCertSecret = value + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *KESConfigApplyConfiguration) WithAnnotations(entries map[string]string) *KESConfigApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *KESConfigApplyConfiguration) WithLabels(entries map[string]string) *KESConfigApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithResources(value v1.ResourceRequirements) *KESConfigApplyConfiguration { + b.Resources = &value + return b +} + +// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the NodeSelector field, +// overwriting an existing map entries in NodeSelector field with the same key. +func (b *KESConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *KESConfigApplyConfiguration { + if b.NodeSelector == nil && len(entries) > 0 { + b.NodeSelector = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.NodeSelector[k] = v + } + return b +} + +// WithTolerations adds the given value to the Tolerations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tolerations field. +func (b *KESConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *KESConfigApplyConfiguration { + for i := range values { + b.Tolerations = append(b.Tolerations, values[i]) + } + return b +} + +// WithAffinity sets the Affinity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Affinity field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithAffinity(value v1.Affinity) *KESConfigApplyConfiguration { + b.Affinity = &value + return b +} + +// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. +func (b *KESConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *KESConfigApplyConfiguration { + for i := range values { + b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) + } + return b +} + +// WithKeyName sets the KeyName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the KeyName field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithKeyName(value string) *KESConfigApplyConfiguration { + b.KeyName = &value + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *KESConfigApplyConfiguration) WithSecurityContext(value v1.PodSecurityContext) *KESConfigApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *KESConfigApplyConfiguration) WithEnv(values ...v1.EnvVar) *KESConfigApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/localcertificatereference.go b/pkg/client/applyconfiguration/minio.min.io/v2/localcertificatereference.go new file mode 100644 index 00000000000..f2a9378f67e --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/localcertificatereference.go @@ -0,0 +1,48 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// LocalCertificateReferenceApplyConfiguration represents an declarative configuration of the LocalCertificateReference type for use +// with apply. +type LocalCertificateReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// LocalCertificateReferenceApplyConfiguration constructs an declarative configuration of the LocalCertificateReference type for use with +// apply. +func LocalCertificateReference() *LocalCertificateReferenceApplyConfiguration { + return &LocalCertificateReferenceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *LocalCertificateReferenceApplyConfiguration) WithName(value string) *LocalCertificateReferenceApplyConfiguration { + b.Name = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *LocalCertificateReferenceApplyConfiguration) WithType(value string) *LocalCertificateReferenceApplyConfiguration { + b.Type = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/logconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/logconfig.go new file mode 100644 index 00000000000..2023c2cf100 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/logconfig.go @@ -0,0 +1,175 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// LogConfigApplyConfiguration represents an declarative configuration of the LogConfig type for use +// with apply. +type LogConfigApplyConfiguration struct { + Image *string `json:"image,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Db *LogDbConfigApplyConfiguration `json:"db,omitempty"` + Audit *AuditConfigApplyConfiguration `json:"audit,omitempty"` + SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` +} + +// LogConfigApplyConfiguration constructs an declarative configuration of the LogConfig type for use with +// apply. +func LogConfig() *LogConfigApplyConfiguration { + return &LogConfigApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithImage(value string) *LogConfigApplyConfiguration { + b.Image = &value + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithResources(value v1.ResourceRequirements) *LogConfigApplyConfiguration { + b.Resources = &value + return b +} + +// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the NodeSelector field, +// overwriting an existing map entries in NodeSelector field with the same key. +func (b *LogConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *LogConfigApplyConfiguration { + if b.NodeSelector == nil && len(entries) > 0 { + b.NodeSelector = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.NodeSelector[k] = v + } + return b +} + +// WithAffinity sets the Affinity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Affinity field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithAffinity(value v1.Affinity) *LogConfigApplyConfiguration { + b.Affinity = &value + return b +} + +// WithTolerations adds the given value to the Tolerations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tolerations field. +func (b *LogConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *LogConfigApplyConfiguration { + for i := range values { + b.Tolerations = append(b.Tolerations, values[i]) + } + return b +} + +// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. +func (b *LogConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *LogConfigApplyConfiguration { + for i := range values { + b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *LogConfigApplyConfiguration) WithAnnotations(entries map[string]string) *LogConfigApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *LogConfigApplyConfiguration) WithLabels(entries map[string]string) *LogConfigApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithDb sets the Db field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Db field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithDb(value *LogDbConfigApplyConfiguration) *LogConfigApplyConfiguration { + b.Db = value + return b +} + +// WithAudit sets the Audit field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Audit field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithAudit(value *AuditConfigApplyConfiguration) *LogConfigApplyConfiguration { + b.Audit = value + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithSecurityContext(value v1.PodSecurityContext) *LogConfigApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceAccountName field is set to the value of the last call. +func (b *LogConfigApplyConfiguration) WithServiceAccountName(value string) *LogConfigApplyConfiguration { + b.ServiceAccountName = &value + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *LogConfigApplyConfiguration) WithEnv(values ...v1.EnvVar) *LogConfigApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/logdbconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/logdbconfig.go new file mode 100644 index 00000000000..d9dcab9629b --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/logdbconfig.go @@ -0,0 +1,175 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// LogDbConfigApplyConfiguration represents an declarative configuration of the LogDbConfig type for use +// with apply. +type LogDbConfigApplyConfiguration struct { + Image *string `json:"image,omitempty"` + InitImage *string `json:"initimage,omitempty"` + VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` +} + +// LogDbConfigApplyConfiguration constructs an declarative configuration of the LogDbConfig type for use with +// apply. +func LogDbConfig() *LogDbConfigApplyConfiguration { + return &LogDbConfigApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithImage(value string) *LogDbConfigApplyConfiguration { + b.Image = &value + return b +} + +// WithInitImage sets the InitImage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the InitImage field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithInitImage(value string) *LogDbConfigApplyConfiguration { + b.InitImage = &value + return b +} + +// WithVolumeClaimTemplate sets the VolumeClaimTemplate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VolumeClaimTemplate field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithVolumeClaimTemplate(value v1.PersistentVolumeClaim) *LogDbConfigApplyConfiguration { + b.VolumeClaimTemplate = &value + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithResources(value v1.ResourceRequirements) *LogDbConfigApplyConfiguration { + b.Resources = &value + return b +} + +// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the NodeSelector field, +// overwriting an existing map entries in NodeSelector field with the same key. +func (b *LogDbConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *LogDbConfigApplyConfiguration { + if b.NodeSelector == nil && len(entries) > 0 { + b.NodeSelector = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.NodeSelector[k] = v + } + return b +} + +// WithAffinity sets the Affinity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Affinity field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithAffinity(value v1.Affinity) *LogDbConfigApplyConfiguration { + b.Affinity = &value + return b +} + +// WithTolerations adds the given value to the Tolerations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tolerations field. +func (b *LogDbConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *LogDbConfigApplyConfiguration { + for i := range values { + b.Tolerations = append(b.Tolerations, values[i]) + } + return b +} + +// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. +func (b *LogDbConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *LogDbConfigApplyConfiguration { + for i := range values { + b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *LogDbConfigApplyConfiguration) WithAnnotations(entries map[string]string) *LogDbConfigApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *LogDbConfigApplyConfiguration) WithLabels(entries map[string]string) *LogDbConfigApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithSecurityContext(value v1.PodSecurityContext) *LogDbConfigApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceAccountName field is set to the value of the last call. +func (b *LogDbConfigApplyConfiguration) WithServiceAccountName(value string) *LogDbConfigApplyConfiguration { + b.ServiceAccountName = &value + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *LogDbConfigApplyConfiguration) WithEnv(values ...v1.EnvVar) *LogDbConfigApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/logging.go b/pkg/client/applyconfiguration/minio.min.io/v2/logging.go new file mode 100644 index 00000000000..a2a8dd7d215 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/logging.go @@ -0,0 +1,57 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// LoggingApplyConfiguration represents an declarative configuration of the Logging type for use +// with apply. +type LoggingApplyConfiguration struct { + JSON *bool `json:"json,omitempty"` + Anonymous *bool `json:"anonymous,omitempty"` + Quiet *bool `json:"quiet,omitempty"` +} + +// LoggingApplyConfiguration constructs an declarative configuration of the Logging type for use with +// apply. +func Logging() *LoggingApplyConfiguration { + return &LoggingApplyConfiguration{} +} + +// WithJSON sets the JSON field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the JSON field is set to the value of the last call. +func (b *LoggingApplyConfiguration) WithJSON(value bool) *LoggingApplyConfiguration { + b.JSON = &value + return b +} + +// WithAnonymous sets the Anonymous field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Anonymous field is set to the value of the last call. +func (b *LoggingApplyConfiguration) WithAnonymous(value bool) *LoggingApplyConfiguration { + b.Anonymous = &value + return b +} + +// WithQuiet sets the Quiet field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Quiet field is set to the value of the last call. +func (b *LoggingApplyConfiguration) WithQuiet(value bool) *LoggingApplyConfiguration { + b.Quiet = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/pool.go b/pkg/client/applyconfiguration/minio.min.io/v2/pool.go new file mode 100644 index 00000000000..b8cf99b462f --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/pool.go @@ -0,0 +1,182 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// PoolApplyConfiguration represents an declarative configuration of the Pool type for use +// with apply. +type PoolApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Servers *int32 `json:"servers,omitempty"` + VolumesPerServer *int32 `json:"volumesPerServer,omitempty"` + VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` + ContainerSecurityContext *v1.SecurityContext `json:"containerSecurityContext,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + RuntimeClassName *string `json:"runtimeClassName,omitempty"` +} + +// PoolApplyConfiguration constructs an declarative configuration of the Pool type for use with +// apply. +func Pool() *PoolApplyConfiguration { + return &PoolApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithName(value string) *PoolApplyConfiguration { + b.Name = &value + return b +} + +// WithServers sets the Servers field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Servers field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithServers(value int32) *PoolApplyConfiguration { + b.Servers = &value + return b +} + +// WithVolumesPerServer sets the VolumesPerServer field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VolumesPerServer field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithVolumesPerServer(value int32) *PoolApplyConfiguration { + b.VolumesPerServer = &value + return b +} + +// WithVolumeClaimTemplate sets the VolumeClaimTemplate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VolumeClaimTemplate field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithVolumeClaimTemplate(value v1.PersistentVolumeClaim) *PoolApplyConfiguration { + b.VolumeClaimTemplate = &value + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithResources(value v1.ResourceRequirements) *PoolApplyConfiguration { + b.Resources = &value + return b +} + +// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the NodeSelector field, +// overwriting an existing map entries in NodeSelector field with the same key. +func (b *PoolApplyConfiguration) WithNodeSelector(entries map[string]string) *PoolApplyConfiguration { + if b.NodeSelector == nil && len(entries) > 0 { + b.NodeSelector = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.NodeSelector[k] = v + } + return b +} + +// WithAffinity sets the Affinity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Affinity field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithAffinity(value v1.Affinity) *PoolApplyConfiguration { + b.Affinity = &value + return b +} + +// WithTolerations adds the given value to the Tolerations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tolerations field. +func (b *PoolApplyConfiguration) WithTolerations(values ...v1.Toleration) *PoolApplyConfiguration { + for i := range values { + b.Tolerations = append(b.Tolerations, values[i]) + } + return b +} + +// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. +func (b *PoolApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *PoolApplyConfiguration { + for i := range values { + b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) + } + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithSecurityContext(value v1.PodSecurityContext) *PoolApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithContainerSecurityContext sets the ContainerSecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContainerSecurityContext field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithContainerSecurityContext(value v1.SecurityContext) *PoolApplyConfiguration { + b.ContainerSecurityContext = &value + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *PoolApplyConfiguration) WithAnnotations(entries map[string]string) *PoolApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *PoolApplyConfiguration) WithLabels(entries map[string]string) *PoolApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithRuntimeClassName sets the RuntimeClassName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RuntimeClassName field is set to the value of the last call. +func (b *PoolApplyConfiguration) WithRuntimeClassName(value string) *PoolApplyConfiguration { + b.RuntimeClassName = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/poolstatus.go b/pkg/client/applyconfiguration/minio.min.io/v2/poolstatus.go new file mode 100644 index 00000000000..266737bd9c4 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/poolstatus.go @@ -0,0 +1,61 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" +) + +// PoolStatusApplyConfiguration represents an declarative configuration of the PoolStatus type for use +// with apply. +type PoolStatusApplyConfiguration struct { + SSName *string `json:"ssName,omitempty"` + State *v2.PoolState `json:"state,omitempty"` + LegacySecurityContext *bool `json:"legacySecurityContext,omitempty"` +} + +// PoolStatusApplyConfiguration constructs an declarative configuration of the PoolStatus type for use with +// apply. +func PoolStatus() *PoolStatusApplyConfiguration { + return &PoolStatusApplyConfiguration{} +} + +// WithSSName sets the SSName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SSName field is set to the value of the last call. +func (b *PoolStatusApplyConfiguration) WithSSName(value string) *PoolStatusApplyConfiguration { + b.SSName = &value + return b +} + +// WithState sets the State field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the State field is set to the value of the last call. +func (b *PoolStatusApplyConfiguration) WithState(value v2.PoolState) *PoolStatusApplyConfiguration { + b.State = &value + return b +} + +// WithLegacySecurityContext sets the LegacySecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LegacySecurityContext field is set to the value of the last call. +func (b *PoolStatusApplyConfiguration) WithLegacySecurityContext(value bool) *PoolStatusApplyConfiguration { + b.LegacySecurityContext = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/prometheusconfig.go b/pkg/client/applyconfiguration/minio.min.io/v2/prometheusconfig.go new file mode 100644 index 00000000000..dc116d079b5 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/prometheusconfig.go @@ -0,0 +1,193 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// PrometheusConfigApplyConfiguration represents an declarative configuration of the PrometheusConfig type for use +// with apply. +type PrometheusConfigApplyConfiguration struct { + Image *string `json:"image,omitempty"` + SideCarImage *string `json:"sidecarimage,omitempty"` + InitImage *string `json:"initimage,omitempty"` + DiskCapacityDB *int `json:"diskCapacityGB,omitempty"` + StorageClassName *string `json:"storageClassName,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` +} + +// PrometheusConfigApplyConfiguration constructs an declarative configuration of the PrometheusConfig type for use with +// apply. +func PrometheusConfig() *PrometheusConfigApplyConfiguration { + return &PrometheusConfigApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithImage(value string) *PrometheusConfigApplyConfiguration { + b.Image = &value + return b +} + +// WithSideCarImage sets the SideCarImage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SideCarImage field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithSideCarImage(value string) *PrometheusConfigApplyConfiguration { + b.SideCarImage = &value + return b +} + +// WithInitImage sets the InitImage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the InitImage field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithInitImage(value string) *PrometheusConfigApplyConfiguration { + b.InitImage = &value + return b +} + +// WithDiskCapacityDB sets the DiskCapacityDB field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DiskCapacityDB field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithDiskCapacityDB(value int) *PrometheusConfigApplyConfiguration { + b.DiskCapacityDB = &value + return b +} + +// WithStorageClassName sets the StorageClassName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StorageClassName field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithStorageClassName(value string) *PrometheusConfigApplyConfiguration { + b.StorageClassName = &value + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *PrometheusConfigApplyConfiguration) WithAnnotations(entries map[string]string) *PrometheusConfigApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *PrometheusConfigApplyConfiguration) WithLabels(entries map[string]string) *PrometheusConfigApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the NodeSelector field, +// overwriting an existing map entries in NodeSelector field with the same key. +func (b *PrometheusConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *PrometheusConfigApplyConfiguration { + if b.NodeSelector == nil && len(entries) > 0 { + b.NodeSelector = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.NodeSelector[k] = v + } + return b +} + +// WithAffinity sets the Affinity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Affinity field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithAffinity(value v1.Affinity) *PrometheusConfigApplyConfiguration { + b.Affinity = &value + return b +} + +// WithTolerations adds the given value to the Tolerations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tolerations field. +func (b *PrometheusConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *PrometheusConfigApplyConfiguration { + for i := range values { + b.Tolerations = append(b.Tolerations, values[i]) + } + return b +} + +// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. +func (b *PrometheusConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *PrometheusConfigApplyConfiguration { + for i := range values { + b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) + } + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithResources(value v1.ResourceRequirements) *PrometheusConfigApplyConfiguration { + b.Resources = &value + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithSecurityContext(value v1.PodSecurityContext) *PrometheusConfigApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceAccountName field is set to the value of the last call. +func (b *PrometheusConfigApplyConfiguration) WithServiceAccountName(value string) *PrometheusConfigApplyConfiguration { + b.ServiceAccountName = &value + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *PrometheusConfigApplyConfiguration) WithEnv(values ...v1.EnvVar) *PrometheusConfigApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/s3features.go b/pkg/client/applyconfiguration/minio.min.io/v2/s3features.go new file mode 100644 index 00000000000..5490c642ae2 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/s3features.go @@ -0,0 +1,39 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// S3FeaturesApplyConfiguration represents an declarative configuration of the S3Features type for use +// with apply. +type S3FeaturesApplyConfiguration struct { + BucketDNS *bool `json:"bucketDNS,omitempty"` +} + +// S3FeaturesApplyConfiguration constructs an declarative configuration of the S3Features type for use with +// apply. +func S3Features() *S3FeaturesApplyConfiguration { + return &S3FeaturesApplyConfiguration{} +} + +// WithBucketDNS sets the BucketDNS field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BucketDNS field is set to the value of the last call. +func (b *S3FeaturesApplyConfiguration) WithBucketDNS(value bool) *S3FeaturesApplyConfiguration { + b.BucketDNS = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/servicemetadata.go b/pkg/client/applyconfiguration/minio.min.io/v2/servicemetadata.go new file mode 100644 index 00000000000..490e825b615 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/servicemetadata.go @@ -0,0 +1,90 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// ServiceMetadataApplyConfiguration represents an declarative configuration of the ServiceMetadata type for use +// with apply. +type ServiceMetadataApplyConfiguration struct { + MinIOServiceLabels map[string]string `json:"minioServiceLabels,omitempty"` + MinIOServiceAnnotations map[string]string `json:"minioServiceAnnotations,omitempty"` + ConsoleServiceLabels map[string]string `json:"consoleServiceLabels,omitempty"` + ConsoleServiceAnnotations map[string]string `json:"consoleServiceAnnotations,omitempty"` +} + +// ServiceMetadataApplyConfiguration constructs an declarative configuration of the ServiceMetadata type for use with +// apply. +func ServiceMetadata() *ServiceMetadataApplyConfiguration { + return &ServiceMetadataApplyConfiguration{} +} + +// WithMinIOServiceLabels puts the entries into the MinIOServiceLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the MinIOServiceLabels field, +// overwriting an existing map entries in MinIOServiceLabels field with the same key. +func (b *ServiceMetadataApplyConfiguration) WithMinIOServiceLabels(entries map[string]string) *ServiceMetadataApplyConfiguration { + if b.MinIOServiceLabels == nil && len(entries) > 0 { + b.MinIOServiceLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.MinIOServiceLabels[k] = v + } + return b +} + +// WithMinIOServiceAnnotations puts the entries into the MinIOServiceAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the MinIOServiceAnnotations field, +// overwriting an existing map entries in MinIOServiceAnnotations field with the same key. +func (b *ServiceMetadataApplyConfiguration) WithMinIOServiceAnnotations(entries map[string]string) *ServiceMetadataApplyConfiguration { + if b.MinIOServiceAnnotations == nil && len(entries) > 0 { + b.MinIOServiceAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.MinIOServiceAnnotations[k] = v + } + return b +} + +// WithConsoleServiceLabels puts the entries into the ConsoleServiceLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the ConsoleServiceLabels field, +// overwriting an existing map entries in ConsoleServiceLabels field with the same key. +func (b *ServiceMetadataApplyConfiguration) WithConsoleServiceLabels(entries map[string]string) *ServiceMetadataApplyConfiguration { + if b.ConsoleServiceLabels == nil && len(entries) > 0 { + b.ConsoleServiceLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ConsoleServiceLabels[k] = v + } + return b +} + +// WithConsoleServiceAnnotations puts the entries into the ConsoleServiceAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the ConsoleServiceAnnotations field, +// overwriting an existing map entries in ConsoleServiceAnnotations field with the same key. +func (b *ServiceMetadataApplyConfiguration) WithConsoleServiceAnnotations(entries map[string]string) *ServiceMetadataApplyConfiguration { + if b.ConsoleServiceAnnotations == nil && len(entries) > 0 { + b.ConsoleServiceAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ConsoleServiceAnnotations[k] = v + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/sidecars.go b/pkg/client/applyconfiguration/minio.min.io/v2/sidecars.go new file mode 100644 index 00000000000..2dedd201dd1 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/sidecars.go @@ -0,0 +1,67 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// SideCarsApplyConfiguration represents an declarative configuration of the SideCars type for use +// with apply. +type SideCarsApplyConfiguration struct { + Containers []v1.Container `json:"containers,omitempty"` + VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` + Volumes []v1.Volume `json:"volumes,omitempty"` +} + +// SideCarsApplyConfiguration constructs an declarative configuration of the SideCars type for use with +// apply. +func SideCars() *SideCarsApplyConfiguration { + return &SideCarsApplyConfiguration{} +} + +// WithContainers adds the given value to the Containers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Containers field. +func (b *SideCarsApplyConfiguration) WithContainers(values ...v1.Container) *SideCarsApplyConfiguration { + for i := range values { + b.Containers = append(b.Containers, values[i]) + } + return b +} + +// WithVolumeClaimTemplates adds the given value to the VolumeClaimTemplates field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the VolumeClaimTemplates field. +func (b *SideCarsApplyConfiguration) WithVolumeClaimTemplates(values ...v1.PersistentVolumeClaim) *SideCarsApplyConfiguration { + for i := range values { + b.VolumeClaimTemplates = append(b.VolumeClaimTemplates, values[i]) + } + return b +} + +// WithVolumes adds the given value to the Volumes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Volumes field. +func (b *SideCarsApplyConfiguration) WithVolumes(values ...v1.Volume) *SideCarsApplyConfiguration { + for i := range values { + b.Volumes = append(b.Volumes, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tenant.go b/pkg/client/applyconfiguration/minio.min.io/v2/tenant.go new file mode 100644 index 00000000000..c226e57d909 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tenant.go @@ -0,0 +1,228 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// TenantApplyConfiguration represents an declarative configuration of the Tenant type for use +// with apply. +type TenantApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Scheduler *TenantSchedulerApplyConfiguration `json:"scheduler,omitempty"` + Spec *TenantSpecApplyConfiguration `json:"spec,omitempty"` + Status *TenantStatusApplyConfiguration `json:"status,omitempty"` +} + +// Tenant constructs an declarative configuration of the Tenant type for use with +// apply. +func Tenant(name, namespace string) *TenantApplyConfiguration { + b := &TenantApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Tenant") + b.WithAPIVersion("minio.min.io/v2") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithKind(value string) *TenantApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithAPIVersion(value string) *TenantApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithName(value string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithGenerateName(value string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithNamespace(value string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithUID(value types.UID) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithResourceVersion(value string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithGeneration(value int64) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TenantApplyConfiguration) WithLabels(entries map[string]string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TenantApplyConfiguration) WithAnnotations(entries map[string]string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *TenantApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *TenantApplyConfiguration) WithFinalizers(values ...string) *TenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *TenantApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithScheduler sets the Scheduler field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Scheduler field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithScheduler(value *TenantSchedulerApplyConfiguration) *TenantApplyConfiguration { + b.Scheduler = value + return b +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithSpec(value *TenantSpecApplyConfiguration) *TenantApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *TenantApplyConfiguration) WithStatus(value *TenantStatusApplyConfiguration) *TenantApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tenantdomains.go b/pkg/client/applyconfiguration/minio.min.io/v2/tenantdomains.go new file mode 100644 index 00000000000..11aec624d19 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tenantdomains.go @@ -0,0 +1,50 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// TenantDomainsApplyConfiguration represents an declarative configuration of the TenantDomains type for use +// with apply. +type TenantDomainsApplyConfiguration struct { + Minio []string `json:"minio,omitempty"` + Console *string `json:"console,omitempty"` +} + +// TenantDomainsApplyConfiguration constructs an declarative configuration of the TenantDomains type for use with +// apply. +func TenantDomains() *TenantDomainsApplyConfiguration { + return &TenantDomainsApplyConfiguration{} +} + +// WithMinio adds the given value to the Minio field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Minio field. +func (b *TenantDomainsApplyConfiguration) WithMinio(values ...string) *TenantDomainsApplyConfiguration { + for i := range values { + b.Minio = append(b.Minio, values[i]) + } + return b +} + +// WithConsole sets the Console field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Console field is set to the value of the last call. +func (b *TenantDomainsApplyConfiguration) WithConsole(value string) *TenantDomainsApplyConfiguration { + b.Console = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tenantscheduler.go b/pkg/client/applyconfiguration/minio.min.io/v2/tenantscheduler.go new file mode 100644 index 00000000000..56bcd1689b1 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tenantscheduler.go @@ -0,0 +1,39 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// TenantSchedulerApplyConfiguration represents an declarative configuration of the TenantScheduler type for use +// with apply. +type TenantSchedulerApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// TenantSchedulerApplyConfiguration constructs an declarative configuration of the TenantScheduler type for use with +// apply. +func TenantScheduler() *TenantSchedulerApplyConfiguration { + return &TenantSchedulerApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TenantSchedulerApplyConfiguration) WithName(value string) *TenantSchedulerApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tenantspec.go b/pkg/client/applyconfiguration/minio.min.io/v2/tenantspec.go new file mode 100644 index 00000000000..3a12b63fe72 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tenantspec.go @@ -0,0 +1,365 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + miniominiov2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" + appsv1 "k8s.io/api/apps/v1" + v1 "k8s.io/api/core/v1" +) + +// TenantSpecApplyConfiguration represents an declarative configuration of the TenantSpec type for use +// with apply. +type TenantSpecApplyConfiguration struct { + Pools []PoolApplyConfiguration `json:"pools,omitempty"` + Image *string `json:"image,omitempty"` + ImagePullSecret *v1.LocalObjectReference `json:"imagePullSecret,omitempty"` + PodManagementPolicy *appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` + CredsSecret *v1.LocalObjectReference `json:"credsSecret,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` + ExternalCertSecret []*miniominiov2.LocalCertificateReference `json:"externalCertSecret,omitempty"` + ExternalCaCertSecret []*miniominiov2.LocalCertificateReference `json:"externalCaCertSecret,omitempty"` + ExternalClientCertSecret *LocalCertificateReferenceApplyConfiguration `json:"externalClientCertSecret,omitempty"` + ExternalClientCertSecrets []*miniominiov2.LocalCertificateReference `json:"externalClientCertSecrets,omitempty"` + Mountpath *string `json:"mountPath,omitempty"` + Subpath *string `json:"subPath,omitempty"` + RequestAutoCert *bool `json:"requestAutoCert,omitempty"` + Liveness *v1.Probe `json:"liveness,omitempty"` + Readiness *v1.Probe `json:"readiness,omitempty"` + Startup *v1.Probe `json:"startup,omitempty"` + S3 *S3FeaturesApplyConfiguration `json:"s3,omitempty"` + Features *FeaturesApplyConfiguration `json:"features,omitempty"` + CertConfig *CertificateConfigApplyConfiguration `json:"certConfig,omitempty"` + KES *KESConfigApplyConfiguration `json:"kes,omitempty"` + Log *LogConfigApplyConfiguration `json:"log,omitempty"` + Prometheus *PrometheusConfigApplyConfiguration `json:"prometheus,omitempty"` + PrometheusOperator *bool `json:"prometheusOperator,omitempty"` + ServiceAccountName *string `json:"serviceAccountName,omitempty"` + PriorityClassName *string `json:"priorityClassName,omitempty"` + ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` + SideCars *SideCarsApplyConfiguration `json:"sideCars,omitempty"` + ExposeServices *ExposeServicesApplyConfiguration `json:"exposeServices,omitempty"` + ServiceMetadata *ServiceMetadataApplyConfiguration `json:"serviceMetadata,omitempty"` + Users []*v1.LocalObjectReference `json:"users,omitempty"` + Buckets []BucketApplyConfiguration `json:"buckets,omitempty"` + Logging *LoggingApplyConfiguration `json:"logging,omitempty"` + Configuration *v1.LocalObjectReference `json:"configuration,omitempty"` +} + +// TenantSpecApplyConfiguration constructs an declarative configuration of the TenantSpec type for use with +// apply. +func TenantSpec() *TenantSpecApplyConfiguration { + return &TenantSpecApplyConfiguration{} +} + +// WithPools adds the given value to the Pools field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Pools field. +func (b *TenantSpecApplyConfiguration) WithPools(values ...*PoolApplyConfiguration) *TenantSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPools") + } + b.Pools = append(b.Pools, *values[i]) + } + return b +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithImage(value string) *TenantSpecApplyConfiguration { + b.Image = &value + return b +} + +// WithImagePullSecret sets the ImagePullSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullSecret field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithImagePullSecret(value v1.LocalObjectReference) *TenantSpecApplyConfiguration { + b.ImagePullSecret = &value + return b +} + +// WithPodManagementPolicy sets the PodManagementPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PodManagementPolicy field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithPodManagementPolicy(value appsv1.PodManagementPolicyType) *TenantSpecApplyConfiguration { + b.PodManagementPolicy = &value + return b +} + +// WithCredsSecret sets the CredsSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CredsSecret field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithCredsSecret(value v1.LocalObjectReference) *TenantSpecApplyConfiguration { + b.CredsSecret = &value + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *TenantSpecApplyConfiguration) WithEnv(values ...v1.EnvVar) *TenantSpecApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} + +// WithExternalCertSecret adds the given value to the ExternalCertSecret field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExternalCertSecret field. +func (b *TenantSpecApplyConfiguration) WithExternalCertSecret(values ...**miniominiov2.LocalCertificateReference) *TenantSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExternalCertSecret") + } + b.ExternalCertSecret = append(b.ExternalCertSecret, *values[i]) + } + return b +} + +// WithExternalCaCertSecret adds the given value to the ExternalCaCertSecret field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExternalCaCertSecret field. +func (b *TenantSpecApplyConfiguration) WithExternalCaCertSecret(values ...**miniominiov2.LocalCertificateReference) *TenantSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExternalCaCertSecret") + } + b.ExternalCaCertSecret = append(b.ExternalCaCertSecret, *values[i]) + } + return b +} + +// WithExternalClientCertSecret sets the ExternalClientCertSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ExternalClientCertSecret field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithExternalClientCertSecret(value *LocalCertificateReferenceApplyConfiguration) *TenantSpecApplyConfiguration { + b.ExternalClientCertSecret = value + return b +} + +// WithExternalClientCertSecrets adds the given value to the ExternalClientCertSecrets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExternalClientCertSecrets field. +func (b *TenantSpecApplyConfiguration) WithExternalClientCertSecrets(values ...**miniominiov2.LocalCertificateReference) *TenantSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExternalClientCertSecrets") + } + b.ExternalClientCertSecrets = append(b.ExternalClientCertSecrets, *values[i]) + } + return b +} + +// WithMountpath sets the Mountpath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Mountpath field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithMountpath(value string) *TenantSpecApplyConfiguration { + b.Mountpath = &value + return b +} + +// WithSubpath sets the Subpath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Subpath field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithSubpath(value string) *TenantSpecApplyConfiguration { + b.Subpath = &value + return b +} + +// WithRequestAutoCert sets the RequestAutoCert field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RequestAutoCert field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithRequestAutoCert(value bool) *TenantSpecApplyConfiguration { + b.RequestAutoCert = &value + return b +} + +// WithLiveness sets the Liveness field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Liveness field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithLiveness(value v1.Probe) *TenantSpecApplyConfiguration { + b.Liveness = &value + return b +} + +// WithReadiness sets the Readiness field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Readiness field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithReadiness(value v1.Probe) *TenantSpecApplyConfiguration { + b.Readiness = &value + return b +} + +// WithStartup sets the Startup field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Startup field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithStartup(value v1.Probe) *TenantSpecApplyConfiguration { + b.Startup = &value + return b +} + +// WithS3 sets the S3 field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the S3 field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithS3(value *S3FeaturesApplyConfiguration) *TenantSpecApplyConfiguration { + b.S3 = value + return b +} + +// WithFeatures sets the Features field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Features field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithFeatures(value *FeaturesApplyConfiguration) *TenantSpecApplyConfiguration { + b.Features = value + return b +} + +// WithCertConfig sets the CertConfig field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CertConfig field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithCertConfig(value *CertificateConfigApplyConfiguration) *TenantSpecApplyConfiguration { + b.CertConfig = value + return b +} + +// WithKES sets the KES field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the KES field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithKES(value *KESConfigApplyConfiguration) *TenantSpecApplyConfiguration { + b.KES = value + return b +} + +// WithLog sets the Log field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Log field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithLog(value *LogConfigApplyConfiguration) *TenantSpecApplyConfiguration { + b.Log = value + return b +} + +// WithPrometheus sets the Prometheus field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Prometheus field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithPrometheus(value *PrometheusConfigApplyConfiguration) *TenantSpecApplyConfiguration { + b.Prometheus = value + return b +} + +// WithPrometheusOperator sets the PrometheusOperator field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PrometheusOperator field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithPrometheusOperator(value bool) *TenantSpecApplyConfiguration { + b.PrometheusOperator = &value + return b +} + +// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceAccountName field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithServiceAccountName(value string) *TenantSpecApplyConfiguration { + b.ServiceAccountName = &value + return b +} + +// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PriorityClassName field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithPriorityClassName(value string) *TenantSpecApplyConfiguration { + b.PriorityClassName = &value + return b +} + +// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullPolicy field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *TenantSpecApplyConfiguration { + b.ImagePullPolicy = &value + return b +} + +// WithSideCars sets the SideCars field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SideCars field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithSideCars(value *SideCarsApplyConfiguration) *TenantSpecApplyConfiguration { + b.SideCars = value + return b +} + +// WithExposeServices sets the ExposeServices field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ExposeServices field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithExposeServices(value *ExposeServicesApplyConfiguration) *TenantSpecApplyConfiguration { + b.ExposeServices = value + return b +} + +// WithServiceMetadata sets the ServiceMetadata field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceMetadata field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithServiceMetadata(value *ServiceMetadataApplyConfiguration) *TenantSpecApplyConfiguration { + b.ServiceMetadata = value + return b +} + +// WithUsers adds the given value to the Users field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Users field. +func (b *TenantSpecApplyConfiguration) WithUsers(values ...*v1.LocalObjectReference) *TenantSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithUsers") + } + b.Users = append(b.Users, values[i]) + } + return b +} + +// WithBuckets adds the given value to the Buckets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Buckets field. +func (b *TenantSpecApplyConfiguration) WithBuckets(values ...*BucketApplyConfiguration) *TenantSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithBuckets") + } + b.Buckets = append(b.Buckets, *values[i]) + } + return b +} + +// WithLogging sets the Logging field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Logging field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithLogging(value *LoggingApplyConfiguration) *TenantSpecApplyConfiguration { + b.Logging = value + return b +} + +// WithConfiguration sets the Configuration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Configuration field is set to the value of the last call. +func (b *TenantSpecApplyConfiguration) WithConfiguration(value v1.LocalObjectReference) *TenantSpecApplyConfiguration { + b.Configuration = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tenantstatus.go b/pkg/client/applyconfiguration/minio.min.io/v2/tenantstatus.go new file mode 100644 index 00000000000..d0dad817d87 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tenantstatus.go @@ -0,0 +1,184 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + miniominiov2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TenantStatusApplyConfiguration represents an declarative configuration of the TenantStatus type for use +// with apply. +type TenantStatusApplyConfiguration struct { + CurrentState *string `json:"currentState,omitempty"` + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + Revision *int32 `json:"revision,omitempty"` + SyncVersion *string `json:"syncVersion,omitempty"` + Certificates *CertificateStatusApplyConfiguration `json:"certificates,omitempty"` + Pools []PoolStatusApplyConfiguration `json:"pools,omitempty"` + WriteQuorum *int32 `json:"writeQuorum,omitempty"` + DrivesOnline *int32 `json:"drivesOnline,omitempty"` + DrivesOffline *int32 `json:"drivesOffline,omitempty"` + DrivesHealing *int32 `json:"drivesHealing,omitempty"` + HealthStatus *miniominiov2.HealthStatus `json:"healthStatus,omitempty"` + HealthMessage *string `json:"healthMessage,omitempty"` + WaitingOnReady *v1.Time `json:"waitingOnReady,omitempty"` + Usage *TenantUsageApplyConfiguration `json:"usage,omitempty"` + ProvisionedUsers *bool `json:"provisionedUsers,omitempty"` + ProvisionedBuckets *bool `json:"provisionedBuckets,omitempty"` +} + +// TenantStatusApplyConfiguration constructs an declarative configuration of the TenantStatus type for use with +// apply. +func TenantStatus() *TenantStatusApplyConfiguration { + return &TenantStatusApplyConfiguration{} +} + +// WithCurrentState sets the CurrentState field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CurrentState field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithCurrentState(value string) *TenantStatusApplyConfiguration { + b.CurrentState = &value + return b +} + +// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AvailableReplicas field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithAvailableReplicas(value int32) *TenantStatusApplyConfiguration { + b.AvailableReplicas = &value + return b +} + +// WithRevision sets the Revision field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Revision field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithRevision(value int32) *TenantStatusApplyConfiguration { + b.Revision = &value + return b +} + +// WithSyncVersion sets the SyncVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SyncVersion field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithSyncVersion(value string) *TenantStatusApplyConfiguration { + b.SyncVersion = &value + return b +} + +// WithCertificates sets the Certificates field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Certificates field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithCertificates(value *CertificateStatusApplyConfiguration) *TenantStatusApplyConfiguration { + b.Certificates = value + return b +} + +// WithPools adds the given value to the Pools field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Pools field. +func (b *TenantStatusApplyConfiguration) WithPools(values ...*PoolStatusApplyConfiguration) *TenantStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPools") + } + b.Pools = append(b.Pools, *values[i]) + } + return b +} + +// WithWriteQuorum sets the WriteQuorum field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the WriteQuorum field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithWriteQuorum(value int32) *TenantStatusApplyConfiguration { + b.WriteQuorum = &value + return b +} + +// WithDrivesOnline sets the DrivesOnline field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DrivesOnline field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithDrivesOnline(value int32) *TenantStatusApplyConfiguration { + b.DrivesOnline = &value + return b +} + +// WithDrivesOffline sets the DrivesOffline field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DrivesOffline field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithDrivesOffline(value int32) *TenantStatusApplyConfiguration { + b.DrivesOffline = &value + return b +} + +// WithDrivesHealing sets the DrivesHealing field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DrivesHealing field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithDrivesHealing(value int32) *TenantStatusApplyConfiguration { + b.DrivesHealing = &value + return b +} + +// WithHealthStatus sets the HealthStatus field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HealthStatus field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithHealthStatus(value miniominiov2.HealthStatus) *TenantStatusApplyConfiguration { + b.HealthStatus = &value + return b +} + +// WithHealthMessage sets the HealthMessage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HealthMessage field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithHealthMessage(value string) *TenantStatusApplyConfiguration { + b.HealthMessage = &value + return b +} + +// WithWaitingOnReady sets the WaitingOnReady field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the WaitingOnReady field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithWaitingOnReady(value v1.Time) *TenantStatusApplyConfiguration { + b.WaitingOnReady = &value + return b +} + +// WithUsage sets the Usage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Usage field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithUsage(value *TenantUsageApplyConfiguration) *TenantStatusApplyConfiguration { + b.Usage = value + return b +} + +// WithProvisionedUsers sets the ProvisionedUsers field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProvisionedUsers field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithProvisionedUsers(value bool) *TenantStatusApplyConfiguration { + b.ProvisionedUsers = &value + return b +} + +// WithProvisionedBuckets sets the ProvisionedBuckets field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ProvisionedBuckets field is set to the value of the last call. +func (b *TenantStatusApplyConfiguration) WithProvisionedBuckets(value bool) *TenantStatusApplyConfiguration { + b.ProvisionedBuckets = &value + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tenantusage.go b/pkg/client/applyconfiguration/minio.min.io/v2/tenantusage.go new file mode 100644 index 00000000000..a7ee20e2f24 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tenantusage.go @@ -0,0 +1,80 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// TenantUsageApplyConfiguration represents an declarative configuration of the TenantUsage type for use +// with apply. +type TenantUsageApplyConfiguration struct { + Capacity *int64 `json:"capacity,omitempty"` + RawCapacity *int64 `json:"rawCapacity,omitempty"` + Usage *int64 `json:"usage,omitempty"` + RawUsage *int64 `json:"rawUsage,omitempty"` + Tiers []TierUsageApplyConfiguration `json:"tiers,omitempty"` +} + +// TenantUsageApplyConfiguration constructs an declarative configuration of the TenantUsage type for use with +// apply. +func TenantUsage() *TenantUsageApplyConfiguration { + return &TenantUsageApplyConfiguration{} +} + +// WithCapacity sets the Capacity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Capacity field is set to the value of the last call. +func (b *TenantUsageApplyConfiguration) WithCapacity(value int64) *TenantUsageApplyConfiguration { + b.Capacity = &value + return b +} + +// WithRawCapacity sets the RawCapacity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RawCapacity field is set to the value of the last call. +func (b *TenantUsageApplyConfiguration) WithRawCapacity(value int64) *TenantUsageApplyConfiguration { + b.RawCapacity = &value + return b +} + +// WithUsage sets the Usage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Usage field is set to the value of the last call. +func (b *TenantUsageApplyConfiguration) WithUsage(value int64) *TenantUsageApplyConfiguration { + b.Usage = &value + return b +} + +// WithRawUsage sets the RawUsage field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RawUsage field is set to the value of the last call. +func (b *TenantUsageApplyConfiguration) WithRawUsage(value int64) *TenantUsageApplyConfiguration { + b.RawUsage = &value + return b +} + +// WithTiers adds the given value to the Tiers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tiers field. +func (b *TenantUsageApplyConfiguration) WithTiers(values ...*TierUsageApplyConfiguration) *TenantUsageApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTiers") + } + b.Tiers = append(b.Tiers, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/minio.min.io/v2/tierusage.go b/pkg/client/applyconfiguration/minio.min.io/v2/tierusage.go new file mode 100644 index 00000000000..a6cac167924 --- /dev/null +++ b/pkg/client/applyconfiguration/minio.min.io/v2/tierusage.go @@ -0,0 +1,57 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// TierUsageApplyConfiguration represents an declarative configuration of the TierUsage type for use +// with apply. +type TierUsageApplyConfiguration struct { + Name *string `json:"Name,omitempty"` + Type *string `json:"Type,omitempty"` + TotalSize *int64 `json:"totalSize,omitempty"` +} + +// TierUsageApplyConfiguration constructs an declarative configuration of the TierUsage type for use with +// apply. +func TierUsage() *TierUsageApplyConfiguration { + return &TierUsageApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TierUsageApplyConfiguration) WithName(value string) *TierUsageApplyConfiguration { + b.Name = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *TierUsageApplyConfiguration) WithType(value string) *TierUsageApplyConfiguration { + b.Type = &value + return b +} + +// WithTotalSize sets the TotalSize field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TotalSize field is set to the value of the last call. +func (b *TierUsageApplyConfiguration) WithTotalSize(value int64) *TierUsageApplyConfiguration { + b.TotalSize = &value + return b +} diff --git a/pkg/client/applyconfiguration/utils.go b/pkg/client/applyconfiguration/utils.go new file mode 100644 index 00000000000..753bb05fd8d --- /dev/null +++ b/pkg/client/applyconfiguration/utils.go @@ -0,0 +1,87 @@ +// This file is part of MinIO Operator +// Copyright (c) 2021 MinIO, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package applyconfiguration + +import ( + v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" + miniominiov2 "github.com/minio/operator/pkg/client/applyconfiguration/minio.min.io/v2" + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no +// apply configuration type exists for the given GroupVersionKind. +func ForKind(kind schema.GroupVersionKind) interface{} { + switch kind { + // Group=minio.min.io, Version=v2 + case v2.SchemeGroupVersion.WithKind("AuditConfig"): + return &miniominiov2.AuditConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("Bucket"): + return &miniominiov2.BucketApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("CertificateConfig"): + return &miniominiov2.CertificateConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("CertificateStatus"): + return &miniominiov2.CertificateStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("CustomCertificateConfig"): + return &miniominiov2.CustomCertificateConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("CustomCertificates"): + return &miniominiov2.CustomCertificatesApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ExposeServices"): + return &miniominiov2.ExposeServicesApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("Features"): + return &miniominiov2.FeaturesApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("KESConfig"): + return &miniominiov2.KESConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("LocalCertificateReference"): + return &miniominiov2.LocalCertificateReferenceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("LogConfig"): + return &miniominiov2.LogConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("LogDbConfig"): + return &miniominiov2.LogDbConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("Logging"): + return &miniominiov2.LoggingApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("Pool"): + return &miniominiov2.PoolApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("PoolStatus"): + return &miniominiov2.PoolStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("PrometheusConfig"): + return &miniominiov2.PrometheusConfigApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("S3Features"): + return &miniominiov2.S3FeaturesApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ServiceMetadata"): + return &miniominiov2.ServiceMetadataApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("SideCars"): + return &miniominiov2.SideCarsApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("Tenant"): + return &miniominiov2.TenantApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("TenantDomains"): + return &miniominiov2.TenantDomainsApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("TenantScheduler"): + return &miniominiov2.TenantSchedulerApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("TenantSpec"): + return &miniominiov2.TenantSpecApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("TenantStatus"): + return &miniominiov2.TenantStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("TenantUsage"): + return &miniominiov2.TenantUsageApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("TierUsage"): + return &miniominiov2.TierUsageApplyConfiguration{} + + } + return nil +} diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 2e824d20e8a..da3287f43d2 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -33,8 +33,7 @@ type Interface interface { MinioV2() miniov2.MinioV2Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient minioV2 *miniov2.MinioV2Client diff --git a/pkg/client/clientset/versioned/typed/minio.min.io/v2/fake/fake_tenant.go b/pkg/client/clientset/versioned/typed/minio.min.io/v2/fake/fake_tenant.go index dae675fcdf0..bf97ed26612 100644 --- a/pkg/client/clientset/versioned/typed/minio.min.io/v2/fake/fake_tenant.go +++ b/pkg/client/clientset/versioned/typed/minio.min.io/v2/fake/fake_tenant.go @@ -20,11 +20,13 @@ package fake import ( "context" + json "encoding/json" + "fmt" v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" + miniominiov2 "github.com/minio/operator/pkg/client/applyconfiguration/minio.min.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +38,9 @@ type FakeTenants struct { ns string } -var tenantsResource = schema.GroupVersionResource{Group: "minio.min.io", Version: "v2", Resource: "tenants"} +var tenantsResource = v2.SchemeGroupVersion.WithResource("tenants") -var tenantsKind = schema.GroupVersionKind{Group: "minio.min.io", Version: "v2", Kind: "Tenant"} +var tenantsKind = v2.SchemeGroupVersion.WithKind("Tenant") // Get takes name of the tenant, and returns the corresponding tenant object, and an error if there is any. func (c *FakeTenants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.Tenant, err error) { @@ -140,3 +142,48 @@ func (c *FakeTenants) Patch(ctx context.Context, name string, pt types.PatchType } return obj.(*v2.Tenant), err } + +// Apply takes the given apply declarative configuration, applies it and returns the applied tenant. +func (c *FakeTenants) Apply(ctx context.Context, tenant *miniominiov2.TenantApplyConfiguration, opts v1.ApplyOptions) (result *v2.Tenant, err error) { + if tenant == nil { + return nil, fmt.Errorf("tenant provided to Apply must not be nil") + } + data, err := json.Marshal(tenant) + if err != nil { + return nil, err + } + name := tenant.Name + if name == nil { + return nil, fmt.Errorf("tenant.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(tenantsResource, c.ns, *name, types.ApplyPatchType, data), &v2.Tenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.Tenant), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeTenants) ApplyStatus(ctx context.Context, tenant *miniominiov2.TenantApplyConfiguration, opts v1.ApplyOptions) (result *v2.Tenant, err error) { + if tenant == nil { + return nil, fmt.Errorf("tenant provided to Apply must not be nil") + } + data, err := json.Marshal(tenant) + if err != nil { + return nil, err + } + name := tenant.Name + if name == nil { + return nil, fmt.Errorf("tenant.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(tenantsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2.Tenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.Tenant), err +} diff --git a/pkg/client/clientset/versioned/typed/minio.min.io/v2/tenant.go b/pkg/client/clientset/versioned/typed/minio.min.io/v2/tenant.go index 6fcfaf5d1b2..b26dd5906f4 100644 --- a/pkg/client/clientset/versioned/typed/minio.min.io/v2/tenant.go +++ b/pkg/client/clientset/versioned/typed/minio.min.io/v2/tenant.go @@ -20,9 +20,12 @@ package v2 import ( "context" + json "encoding/json" + "fmt" "time" v2 "github.com/minio/operator/pkg/apis/minio.min.io/v2" + miniominiov2 "github.com/minio/operator/pkg/client/applyconfiguration/minio.min.io/v2" scheme "github.com/minio/operator/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -47,6 +50,8 @@ type TenantInterface interface { List(ctx context.Context, opts v1.ListOptions) (*v2.TenantList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.Tenant, err error) + Apply(ctx context.Context, tenant *miniominiov2.TenantApplyConfiguration, opts v1.ApplyOptions) (result *v2.Tenant, err error) + ApplyStatus(ctx context.Context, tenant *miniominiov2.TenantApplyConfiguration, opts v1.ApplyOptions) (result *v2.Tenant, err error) TenantExpansion } @@ -193,3 +198,59 @@ func (c *tenants) Patch(ctx context.Context, name string, pt types.PatchType, da Into(result) return } + +// Apply takes the given apply declarative configuration, applies it and returns the applied tenant. +func (c *tenants) Apply(ctx context.Context, tenant *miniominiov2.TenantApplyConfiguration, opts v1.ApplyOptions) (result *v2.Tenant, err error) { + if tenant == nil { + return nil, fmt.Errorf("tenant provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(tenant) + if err != nil { + return nil, err + } + name := tenant.Name + if name == nil { + return nil, fmt.Errorf("tenant.Name must be provided to Apply") + } + result = &v2.Tenant{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("tenants"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *tenants) ApplyStatus(ctx context.Context, tenant *miniominiov2.TenantApplyConfiguration, opts v1.ApplyOptions) (result *v2.Tenant, err error) { + if tenant == nil { + return nil, fmt.Errorf("tenant provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(tenant) + if err != nil { + return nil, err + } + + name := tenant.Name + if name == nil { + return nil, fmt.Errorf("tenant.Name must be provided to Apply") + } + + result = &v2.Tenant{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("tenants"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 15ca0b05c91..18103c93857 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -47,6 +47,11 @@ type sharedInformerFactory struct { // startedInformers is used for tracking which informers have been started. // This allows Start() to be called multiple times safely. startedInformers map[reflect.Type]bool + // wg tracks how many goroutines were started. + wg sync.WaitGroup + // shuttingDown is true when Shutdown has been called. It may still be running + // because it needs to wait for goroutines. + shuttingDown bool } // WithCustomResyncConfig sets a custom resync period for the specified informer types. @@ -107,20 +112,39 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy return factory } -// Start initializes all requested informers. func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() + if f.shuttingDown { + return + } + for informerType, informer := range f.informers { if !f.startedInformers[informerType] { - go informer.Run(stopCh) + f.wg.Add(1) + // We need a new variable in each loop iteration, + // otherwise the goroutine would use the loop variable + // and that keeps changing. + informer := informer + go func() { + defer f.wg.Done() + informer.Run(stopCh) + }() f.startedInformers[informerType] = true } } } -// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) Shutdown() { + f.lock.Lock() + f.shuttingDown = true + f.lock.Unlock() + + // Will return immediately if there is nothing to wait for. + f.wg.Wait() +} + func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { informers := func() map[reflect.Type]cache.SharedIndexInformer { f.lock.Lock() @@ -167,11 +191,58 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // SharedInformerFactory provides shared informers for resources in all known // API group versions. +// +// It is typically used like this: +// +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } +// +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // Start initializes all requested informers. They are handled in goroutines + // which run until the stop channel gets closed. + Start(stopCh <-chan struct{}) + + // Shutdown marks a factory as shutting down. At that point no new + // informers can be started anymore and Start will return without + // doing anything. + // + // In addition, Shutdown blocks until all goroutines have terminated. For that + // to happen, the close channel(s) that they were started with must be closed, + // either before Shutdown gets called or while it is waiting. + // + // Shutdown may be called multiple times, even concurrently. All such calls will + // block until all goroutines have terminated. + Shutdown() + + // WaitForCacheSync blocks until all started informers' caches were synced + // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + // ForResource gives generic access to a shared informer of the matching type. + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // InternalInformerFor returns the SharedIndexInformer for obj using an internal + // client. + InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer + Minio() miniominio.Interface }