diff --git a/go.mod b/go.mod index 7551d9d5a..1896434b7 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( k8s.io/klog/v2 v2.120.1 kmodules.xyz/client-go v0.29.13 kmodules.xyz/custom-resources v0.29.1 - kubedb.dev/apimachinery v0.44.1-0.20240319062303-406611de1d5f + kubedb.dev/apimachinery v0.44.1-0.20240421070443-e0f277d34347 sigs.k8s.io/controller-runtime v0.17.2 xorm.io/xorm v1.3.6 ) @@ -100,13 +100,13 @@ require ( github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - golang.org/x/crypto v0.19.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect @@ -126,7 +126,7 @@ require ( k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect kmodules.xyz/apiversion v0.2.0 // indirect kmodules.xyz/monitoring-agent-api v0.29.0 // indirect - kmodules.xyz/offshoot-api v0.29.0 // indirect + kmodules.xyz/offshoot-api v0.29.1 // indirect kubeops.dev/petset v0.0.5 // indirect modernc.org/memory v1.5.0 // indirect modernc.org/token v1.1.0 // indirect diff --git a/go.sum b/go.sum index fc098e001..6994624ae 100644 --- a/go.sum +++ b/go.sum @@ -434,8 +434,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -465,8 +465,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -501,8 +501,8 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -510,8 +510,8 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -612,10 +612,10 @@ kmodules.xyz/custom-resources v0.29.1 h1:xiNylhs3ILRbcUhxxy306AOy9GMA4Mq7xFIptZK kmodules.xyz/custom-resources v0.29.1/go.mod h1:829zDY1EjaxPP52h1T73LZx/vgv8Pld9/uTT/ViZTc0= kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9H1UFRwB4= kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI= -kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY= -kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw= -kubedb.dev/apimachinery v0.44.1-0.20240319062303-406611de1d5f h1:hFPMQW4+BgUQlMUIpKtFTFNSYmzHVY1xDH13mFrV5jY= -kubedb.dev/apimachinery v0.44.1-0.20240319062303-406611de1d5f/go.mod h1:7daaaWragCFLV38plrrJtsOuzinBSX3enMpliqlm3Uo= +kmodules.xyz/offshoot-api v0.29.1 h1:Pm83nzYHbqfCYKPCHrK0io387yXTaBmSydoAP6nF0WU= +kmodules.xyz/offshoot-api v0.29.1/go.mod h1:SeGhKGXxNAy56cLnskEcLgCH+LRFN+MhJzvrZzPqUlM= +kubedb.dev/apimachinery v0.44.1-0.20240421070443-e0f277d34347 h1:3zmWDtLwc9l1xSFsuAnxqiqZyRpwrmteIlrRdR0jzRo= +kubedb.dev/apimachinery v0.44.1-0.20240421070443-e0f277d34347/go.mod h1:0uGwbmD4XN00LeU236LLOgoocK+UBoB9ojdstnZeJd8= kubeops.dev/petset v0.0.5 h1:VVXi39JhjondlbHyZ98z0MLp6VCmiCMinL59K48Y2zA= kubeops.dev/petset v0.0.5/go.mod h1:ijtKT1HlAht2vBEZj5LW7C00XEs3B0d1VdCQgd5V4cA= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= diff --git a/mssql/kubedb_client_builder.go b/mssql/kubedb_client_builder.go index 867908989..8e9732c08 100644 --- a/mssql/kubedb_client_builder.go +++ b/mssql/kubedb_client_builder.go @@ -30,13 +30,13 @@ import ( type KubeDBClientBuilder struct { kc client.Client - db *api.MsSQL + db *api.MSSQL url string podName string ctx context.Context } -func NewKubeDBClientBuilder(kc client.Client, db *api.MsSQL) *KubeDBClientBuilder { +func NewKubeDBClientBuilder(kc client.Client, db *api.MSSQL) *KubeDBClientBuilder { return &KubeDBClientBuilder{ kc: kc, db: db, @@ -58,7 +58,7 @@ func (o *KubeDBClientBuilder) WithContext(ctx context.Context) *KubeDBClientBuil return o } -func (o *KubeDBClientBuilder) GetMsSQLXormClient() (*XormClient, error) { +func (o *KubeDBClientBuilder) GetMSSQLXormClient() (*XormClient, error) { if o.ctx == nil { o.ctx = context.Background() } @@ -67,7 +67,7 @@ func (o *KubeDBClientBuilder) GetMsSQLXormClient() (*XormClient, error) { return nil, err } - engine, err := xorm.NewEngine(api.ResourceSingularMsSQL, connector) + engine, err := xorm.NewEngine(api.ResourceSingularMSSQL, connector) if err != nil { return nil, err } @@ -87,7 +87,7 @@ func (o *KubeDBClientBuilder) getURL() string { return fmt.Sprintf("%s.%s.%s.svc", o.podName, o.db.GoverningServiceName(), o.db.Namespace) } -func (o *KubeDBClientBuilder) getMsSQLSACredentials() (string, string, error) { +func (o *KubeDBClientBuilder) getMSSQLSACredentials() (string, string, error) { db := o.db var secretName string if db.Spec.AuthSecret != nil { @@ -110,7 +110,7 @@ func (o *KubeDBClientBuilder) getMsSQLSACredentials() (string, string, error) { } func (o *KubeDBClientBuilder) getConnectionString() (string, error) { - user, pass, err := o.getMsSQLSACredentials() + user, pass, err := o.getMSSQLSACredentials() if err != nil { return "", err } @@ -124,7 +124,7 @@ func (o *KubeDBClientBuilder) getConnectionString() (string, error) { //if o.db.Spec.RequireSSL && o.db.Spec.TLS != nil { // // get client-secret // var clientSecret core.Secret - // err := o.kc.Get(o.ctx, client.ObjectKey{Namespace: o.db.GetNamespace(), Name: o.db.GetCertSecretName(api.MsSQLClientCert)}, &clientSecret) + // err := o.kc.Get(o.ctx, client.ObjectKey{Namespace: o.db.GetNamespace(), Name: o.db.GetCertSecretName(api.MSSQLClientCert)}, &clientSecret) // if err != nil { // return "", err // } @@ -143,13 +143,13 @@ func (o *KubeDBClientBuilder) getConnectionString() (string, error) { // // // tls custom setup // if o.db.Spec.RequireSSL { - // mssql_driver.RegisterTLSConfig(api.MsSQLTLSConfigCustom, &tls.Config{ + // mssql_driver.RegisterTLSConfig(api.MSSQLTLSConfigCustom, &tls.Config{ // RootCAs: certPool, // Certificates: clientCert, // }) - // tlsConfig = fmt.Sprintf("tls=%s", api.MsSQLTLSConfigCustom) + // tlsConfig = fmt.Sprintf("tls=%s", api.MSSQLTLSConfigCustom) // } else { - // tlsConfig = fmt.Sprintf("tls=%s", api.MsSQLTLSConfigSkipVerify) + // tlsConfig = fmt.Sprintf("tls=%s", api.MSSQLTLSConfigSkipVerify) // } //} diff --git a/vendor/golang.org/x/crypto/ocsp/ocsp.go b/vendor/golang.org/x/crypto/ocsp/ocsp.go index 4269ed113..bf2259537 100644 --- a/vendor/golang.org/x/crypto/ocsp/ocsp.go +++ b/vendor/golang.org/x/crypto/ocsp/ocsp.go @@ -279,21 +279,22 @@ func getOIDFromHashAlgorithm(target crypto.Hash) asn1.ObjectIdentifier { // This is the exposed reflection of the internal OCSP structures. -// The status values that can be expressed in OCSP. See RFC 6960. +// The status values that can be expressed in OCSP. See RFC 6960. +// These are used for the Response.Status field. const ( // Good means that the certificate is valid. - Good = iota + Good = 0 // Revoked means that the certificate has been deliberately revoked. - Revoked + Revoked = 1 // Unknown means that the OCSP responder doesn't know about the certificate. - Unknown + Unknown = 2 // ServerFailed is unused and was never used (see // https://go-review.googlesource.com/#/c/18944). ParseResponse will // return a ResponseError when an error response is parsed. - ServerFailed + ServerFailed = 3 ) -// The enumerated reasons for revoking a certificate. See RFC 5280. +// The enumerated reasons for revoking a certificate. See RFC 5280. const ( Unspecified = 0 KeyCompromise = 1 diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go index e2b298d85..43557ab7e 100644 --- a/vendor/golang.org/x/net/http2/frame.go +++ b/vendor/golang.org/x/net/http2/frame.go @@ -1564,6 +1564,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { if size > remainSize { hdec.SetEmitEnabled(false) mh.Truncated = true + remainSize = 0 return } remainSize -= size @@ -1576,6 +1577,36 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { var hc headersOrContinuation = hf for { frag := hc.HeaderBlockFragment() + + // Avoid parsing large amounts of headers that we will then discard. + // If the sender exceeds the max header list size by too much, + // skip parsing the fragment and close the connection. + // + // "Too much" is either any CONTINUATION frame after we've already + // exceeded the max header list size (in which case remainSize is 0), + // or a frame whose encoded size is more than twice the remaining + // header list bytes we're willing to accept. + if int64(len(frag)) > int64(2*remainSize) { + if VerboseLogs { + log.Printf("http2: header list too large") + } + // It would be nice to send a RST_STREAM before sending the GOAWAY, + // but the structure of the server's frame writer makes this difficult. + return nil, ConnectionError(ErrCodeProtocol) + } + + // Also close the connection after any CONTINUATION frame following an + // invalid header, since we stop tracking the size of the headers after + // an invalid one. + if invalid != nil { + if VerboseLogs { + log.Printf("http2: invalid header: %v", invalid) + } + // It would be nice to send a RST_STREAM before sending the GOAWAY, + // but the structure of the server's frame writer makes this difficult. + return nil, ConnectionError(ErrCodeProtocol) + } + if _, err := hdec.Write(frag); err != nil { return nil, ConnectionError(ErrCodeCompression) } diff --git a/vendor/golang.org/x/net/http2/pipe.go b/vendor/golang.org/x/net/http2/pipe.go index 684d984fd..3b9f06b96 100644 --- a/vendor/golang.org/x/net/http2/pipe.go +++ b/vendor/golang.org/x/net/http2/pipe.go @@ -77,7 +77,10 @@ func (p *pipe) Read(d []byte) (n int, err error) { } } -var errClosedPipeWrite = errors.New("write on closed buffer") +var ( + errClosedPipeWrite = errors.New("write on closed buffer") + errUninitializedPipeWrite = errors.New("write on uninitialized buffer") +) // Write copies bytes from p into the buffer and wakes a reader. // It is an error to write more data than the buffer can hold. @@ -91,6 +94,12 @@ func (p *pipe) Write(d []byte) (n int, err error) { if p.err != nil || p.breakErr != nil { return 0, errClosedPipeWrite } + // pipe.setBuffer is never invoked, leaving the buffer uninitialized. + // We shouldn't try to write to an uninitialized pipe, + // but returning an error is better than panicking. + if p.b == nil { + return 0, errUninitializedPipeWrite + } return p.b.Write(d) } diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index ae94c6408..ce2e8b40e 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -124,6 +124,7 @@ type Server struct { // IdleTimeout specifies how long until idle clients should be // closed with a GOAWAY frame. PING frames are not considered // activity for the purposes of IdleTimeout. + // If zero or negative, there is no timeout. IdleTimeout time.Duration // MaxUploadBufferPerConnection is the size of the initial flow @@ -434,7 +435,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { // passes the connection off to us with the deadline already set. // Write deadlines are set per stream in serverConn.newStream. // Disarm the net.Conn write deadline here. - if sc.hs.WriteTimeout != 0 { + if sc.hs.WriteTimeout > 0 { sc.conn.SetWriteDeadline(time.Time{}) } @@ -924,7 +925,7 @@ func (sc *serverConn) serve() { sc.setConnState(http.StateActive) sc.setConnState(http.StateIdle) - if sc.srv.IdleTimeout != 0 { + if sc.srv.IdleTimeout > 0 { sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) defer sc.idleTimer.Stop() } @@ -1637,7 +1638,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { delete(sc.streams, st.id) if len(sc.streams) == 0 { sc.setConnState(http.StateIdle) - if sc.srv.IdleTimeout != 0 { + if sc.srv.IdleTimeout > 0 { sc.idleTimer.Reset(sc.srv.IdleTimeout) } if h1ServerKeepAlivesDisabled(sc.hs) { @@ -2017,7 +2018,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // similar to how the http1 server works. Here it's // technically more like the http1 Server's ReadHeaderTimeout // (in Go 1.8), though. That's a more sane option anyway. - if sc.hs.ReadTimeout != 0 { + if sc.hs.ReadTimeout > 0 { sc.conn.SetReadDeadline(time.Time{}) st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) } @@ -2038,7 +2039,7 @@ func (sc *serverConn) upgradeRequest(req *http.Request) { // Disable any read deadline set by the net/http package // prior to the upgrade. - if sc.hs.ReadTimeout != 0 { + if sc.hs.ReadTimeout > 0 { sc.conn.SetReadDeadline(time.Time{}) } @@ -2116,7 +2117,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.flow.conn = &sc.flow // link to conn-level counter st.flow.add(sc.initialStreamSendWindowSize) st.inflow.init(sc.srv.initialStreamRecvWindowSize()) - if sc.hs.WriteTimeout != 0 { + if sc.hs.WriteTimeout > 0 { st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } diff --git a/vendor/golang.org/x/net/http2/testsync.go b/vendor/golang.org/x/net/http2/testsync.go new file mode 100644 index 000000000..61075bd16 --- /dev/null +++ b/vendor/golang.org/x/net/http2/testsync.go @@ -0,0 +1,331 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package http2 + +import ( + "context" + "sync" + "time" +) + +// testSyncHooks coordinates goroutines in tests. +// +// For example, a call to ClientConn.RoundTrip involves several goroutines, including: +// - the goroutine running RoundTrip; +// - the clientStream.doRequest goroutine, which writes the request; and +// - the clientStream.readLoop goroutine, which reads the response. +// +// Using testSyncHooks, a test can start a RoundTrip and identify when all these goroutines +// are blocked waiting for some condition such as reading the Request.Body or waiting for +// flow control to become available. +// +// The testSyncHooks also manage timers and synthetic time in tests. +// This permits us to, for example, start a request and cause it to time out waiting for +// response headers without resorting to time.Sleep calls. +type testSyncHooks struct { + // active/inactive act as a mutex and condition variable. + // + // - neither chan contains a value: testSyncHooks is locked. + // - active contains a value: unlocked, and at least one goroutine is not blocked + // - inactive contains a value: unlocked, and all goroutines are blocked + active chan struct{} + inactive chan struct{} + + // goroutine counts + total int // total goroutines + condwait map[*sync.Cond]int // blocked in sync.Cond.Wait + blocked []*testBlockedGoroutine // otherwise blocked + + // fake time + now time.Time + timers []*fakeTimer + + // Transport testing: Report various events. + newclientconn func(*ClientConn) + newstream func(*clientStream) +} + +// testBlockedGoroutine is a blocked goroutine. +type testBlockedGoroutine struct { + f func() bool // blocked until f returns true + ch chan struct{} // closed when unblocked +} + +func newTestSyncHooks() *testSyncHooks { + h := &testSyncHooks{ + active: make(chan struct{}, 1), + inactive: make(chan struct{}, 1), + condwait: map[*sync.Cond]int{}, + } + h.inactive <- struct{}{} + h.now = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) + return h +} + +// lock acquires the testSyncHooks mutex. +func (h *testSyncHooks) lock() { + select { + case <-h.active: + case <-h.inactive: + } +} + +// waitInactive waits for all goroutines to become inactive. +func (h *testSyncHooks) waitInactive() { + for { + <-h.inactive + if !h.unlock() { + break + } + } +} + +// unlock releases the testSyncHooks mutex. +// It reports whether any goroutines are active. +func (h *testSyncHooks) unlock() (active bool) { + // Look for a blocked goroutine which can be unblocked. + blocked := h.blocked[:0] + unblocked := false + for _, b := range h.blocked { + if !unblocked && b.f() { + unblocked = true + close(b.ch) + } else { + blocked = append(blocked, b) + } + } + h.blocked = blocked + + // Count goroutines blocked on condition variables. + condwait := 0 + for _, count := range h.condwait { + condwait += count + } + + if h.total > condwait+len(blocked) { + h.active <- struct{}{} + return true + } else { + h.inactive <- struct{}{} + return false + } +} + +// goRun starts a new goroutine. +func (h *testSyncHooks) goRun(f func()) { + h.lock() + h.total++ + h.unlock() + go func() { + defer func() { + h.lock() + h.total-- + h.unlock() + }() + f() + }() +} + +// blockUntil indicates that a goroutine is blocked waiting for some condition to become true. +// It waits until f returns true before proceeding. +// +// Example usage: +// +// h.blockUntil(func() bool { +// // Is the context done yet? +// select { +// case <-ctx.Done(): +// default: +// return false +// } +// return true +// }) +// // Wait for the context to become done. +// <-ctx.Done() +// +// The function f passed to blockUntil must be non-blocking and idempotent. +func (h *testSyncHooks) blockUntil(f func() bool) { + if f() { + return + } + ch := make(chan struct{}) + h.lock() + h.blocked = append(h.blocked, &testBlockedGoroutine{ + f: f, + ch: ch, + }) + h.unlock() + <-ch +} + +// broadcast is sync.Cond.Broadcast. +func (h *testSyncHooks) condBroadcast(cond *sync.Cond) { + h.lock() + delete(h.condwait, cond) + h.unlock() + cond.Broadcast() +} + +// broadcast is sync.Cond.Wait. +func (h *testSyncHooks) condWait(cond *sync.Cond) { + h.lock() + h.condwait[cond]++ + h.unlock() +} + +// newTimer creates a new fake timer. +func (h *testSyncHooks) newTimer(d time.Duration) timer { + h.lock() + defer h.unlock() + t := &fakeTimer{ + hooks: h, + when: h.now.Add(d), + c: make(chan time.Time), + } + h.timers = append(h.timers, t) + return t +} + +// afterFunc creates a new fake AfterFunc timer. +func (h *testSyncHooks) afterFunc(d time.Duration, f func()) timer { + h.lock() + defer h.unlock() + t := &fakeTimer{ + hooks: h, + when: h.now.Add(d), + f: f, + } + h.timers = append(h.timers, t) + return t +} + +func (h *testSyncHooks) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { + ctx, cancel := context.WithCancel(ctx) + t := h.afterFunc(d, cancel) + return ctx, func() { + t.Stop() + cancel() + } +} + +func (h *testSyncHooks) timeUntilEvent() time.Duration { + h.lock() + defer h.unlock() + var next time.Time + for _, t := range h.timers { + if next.IsZero() || t.when.Before(next) { + next = t.when + } + } + if d := next.Sub(h.now); d > 0 { + return d + } + return 0 +} + +// advance advances time and causes synthetic timers to fire. +func (h *testSyncHooks) advance(d time.Duration) { + h.lock() + defer h.unlock() + h.now = h.now.Add(d) + timers := h.timers[:0] + for _, t := range h.timers { + t := t // remove after go.mod depends on go1.22 + t.mu.Lock() + switch { + case t.when.After(h.now): + timers = append(timers, t) + case t.when.IsZero(): + // stopped timer + default: + t.when = time.Time{} + if t.c != nil { + close(t.c) + } + if t.f != nil { + h.total++ + go func() { + defer func() { + h.lock() + h.total-- + h.unlock() + }() + t.f() + }() + } + } + t.mu.Unlock() + } + h.timers = timers +} + +// A timer wraps a time.Timer, or a synthetic equivalent in tests. +// Unlike time.Timer, timer is single-use: The timer channel is closed when the timer expires. +type timer interface { + C() <-chan time.Time + Stop() bool + Reset(d time.Duration) bool +} + +// timeTimer implements timer using real time. +type timeTimer struct { + t *time.Timer + c chan time.Time +} + +// newTimeTimer creates a new timer using real time. +func newTimeTimer(d time.Duration) timer { + ch := make(chan time.Time) + t := time.AfterFunc(d, func() { + close(ch) + }) + return &timeTimer{t, ch} +} + +// newTimeAfterFunc creates an AfterFunc timer using real time. +func newTimeAfterFunc(d time.Duration, f func()) timer { + return &timeTimer{ + t: time.AfterFunc(d, f), + } +} + +func (t timeTimer) C() <-chan time.Time { return t.c } +func (t timeTimer) Stop() bool { return t.t.Stop() } +func (t timeTimer) Reset(d time.Duration) bool { return t.t.Reset(d) } + +// fakeTimer implements timer using fake time. +type fakeTimer struct { + hooks *testSyncHooks + + mu sync.Mutex + when time.Time // when the timer will fire + c chan time.Time // closed when the timer fires; mutually exclusive with f + f func() // called when the timer fires; mutually exclusive with c +} + +func (t *fakeTimer) C() <-chan time.Time { return t.c } + +func (t *fakeTimer) Stop() bool { + t.mu.Lock() + defer t.mu.Unlock() + stopped := t.when.IsZero() + t.when = time.Time{} + return stopped +} + +func (t *fakeTimer) Reset(d time.Duration) bool { + if t.c != nil || t.f == nil { + panic("fakeTimer only supports Reset on AfterFunc timers") + } + t.mu.Lock() + defer t.mu.Unlock() + t.hooks.lock() + defer t.hooks.unlock() + active := !t.when.IsZero() + t.when = t.hooks.now.Add(d) + if !active { + t.hooks.timers = append(t.hooks.timers, t) + } + return active +} diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index df578b86c..ce375c8c7 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -147,6 +147,12 @@ type Transport struct { // waiting for their turn. StrictMaxConcurrentStreams bool + // IdleConnTimeout is the maximum amount of time an idle + // (keep-alive) connection will remain idle before closing + // itself. + // Zero means no limit. + IdleConnTimeout time.Duration + // ReadIdleTimeout is the timeout after which a health check using ping // frame will be carried out if no frame is received on the connection. // Note that a ping response will is considered a received frame, so if @@ -178,6 +184,8 @@ type Transport struct { connPoolOnce sync.Once connPoolOrDef ClientConnPool // non-nil version of ConnPool + + syncHooks *testSyncHooks } func (t *Transport) maxHeaderListSize() uint32 { @@ -302,7 +310,7 @@ type ClientConn struct { readerErr error // set before readerDone is closed idleTimeout time.Duration // or 0 for never - idleTimer *time.Timer + idleTimer timer mu sync.Mutex // guards following cond *sync.Cond // hold mu; broadcast on flow/closed changes @@ -344,6 +352,60 @@ type ClientConn struct { werr error // first write error that has occurred hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder + + syncHooks *testSyncHooks // can be nil +} + +// Hook points used for testing. +// Outside of tests, cc.syncHooks is nil and these all have minimal implementations. +// Inside tests, see the testSyncHooks function docs. + +// goRun starts a new goroutine. +func (cc *ClientConn) goRun(f func()) { + if cc.syncHooks != nil { + cc.syncHooks.goRun(f) + return + } + go f() +} + +// condBroadcast is cc.cond.Broadcast. +func (cc *ClientConn) condBroadcast() { + if cc.syncHooks != nil { + cc.syncHooks.condBroadcast(cc.cond) + } + cc.cond.Broadcast() +} + +// condWait is cc.cond.Wait. +func (cc *ClientConn) condWait() { + if cc.syncHooks != nil { + cc.syncHooks.condWait(cc.cond) + } + cc.cond.Wait() +} + +// newTimer creates a new time.Timer, or a synthetic timer in tests. +func (cc *ClientConn) newTimer(d time.Duration) timer { + if cc.syncHooks != nil { + return cc.syncHooks.newTimer(d) + } + return newTimeTimer(d) +} + +// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. +func (cc *ClientConn) afterFunc(d time.Duration, f func()) timer { + if cc.syncHooks != nil { + return cc.syncHooks.afterFunc(d, f) + } + return newTimeAfterFunc(d, f) +} + +func (cc *ClientConn) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { + if cc.syncHooks != nil { + return cc.syncHooks.contextWithTimeout(ctx, d) + } + return context.WithTimeout(ctx, d) } // clientStream is the state for a single HTTP/2 stream. One of these @@ -425,7 +487,7 @@ func (cs *clientStream) abortStreamLocked(err error) { // TODO(dneil): Clean up tests where cs.cc.cond is nil. if cs.cc.cond != nil { // Wake up writeRequestBody if it is waiting on flow control. - cs.cc.cond.Broadcast() + cs.cc.condBroadcast() } } @@ -435,7 +497,7 @@ func (cs *clientStream) abortRequestBodyWrite() { defer cc.mu.Unlock() if cs.reqBody != nil && cs.reqBodyClosed == nil { cs.closeReqBodyLocked() - cc.cond.Broadcast() + cc.condBroadcast() } } @@ -445,10 +507,10 @@ func (cs *clientStream) closeReqBodyLocked() { } cs.reqBodyClosed = make(chan struct{}) reqBodyClosed := cs.reqBodyClosed - go func() { + cs.cc.goRun(func() { cs.reqBody.Close() close(reqBodyClosed) - }() + }) } type stickyErrWriter struct { @@ -537,15 +599,6 @@ func authorityAddr(scheme string, authority string) (addr string) { return net.JoinHostPort(host, port) } -var retryBackoffHook func(time.Duration) *time.Timer - -func backoffNewTimer(d time.Duration) *time.Timer { - if retryBackoffHook != nil { - return retryBackoffHook(d) - } - return time.NewTimer(d) -} - // RoundTripOpt is like RoundTrip, but takes options. func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) { if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) { @@ -573,13 +626,27 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res backoff := float64(uint(1) << (uint(retry) - 1)) backoff += backoff * (0.1 * mathrand.Float64()) d := time.Second * time.Duration(backoff) - timer := backoffNewTimer(d) + var tm timer + if t.syncHooks != nil { + tm = t.syncHooks.newTimer(d) + t.syncHooks.blockUntil(func() bool { + select { + case <-tm.C(): + case <-req.Context().Done(): + default: + return false + } + return true + }) + } else { + tm = newTimeTimer(d) + } select { - case <-timer.C: + case <-tm.C(): t.vlogf("RoundTrip retrying after failure: %v", roundTripErr) continue case <-req.Context().Done(): - timer.Stop() + tm.Stop() err = req.Context().Err() } } @@ -658,6 +725,9 @@ func canRetryError(err error) bool { } func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) { + if t.syncHooks != nil { + return t.newClientConn(nil, singleUse, t.syncHooks) + } host, _, err := net.SplitHostPort(addr) if err != nil { return nil, err @@ -666,7 +736,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b if err != nil { return nil, err } - return t.newClientConn(tconn, singleUse) + return t.newClientConn(tconn, singleUse, nil) } func (t *Transport) newTLSConfig(host string) *tls.Config { @@ -732,10 +802,10 @@ func (t *Transport) maxEncoderHeaderTableSize() uint32 { } func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { - return t.newClientConn(c, t.disableKeepAlives()) + return t.newClientConn(c, t.disableKeepAlives(), nil) } -func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { +func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHooks) (*ClientConn, error) { cc := &ClientConn{ t: t, tconn: c, @@ -750,10 +820,15 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro wantSettingsAck: true, pings: make(map[[8]byte]chan struct{}), reqHeaderMu: make(chan struct{}, 1), + syncHooks: hooks, + } + if hooks != nil { + hooks.newclientconn(cc) + c = cc.tconn } if d := t.idleConnTimeout(); d != 0 { cc.idleTimeout = d - cc.idleTimer = time.AfterFunc(d, cc.onIdleTimeout) + cc.idleTimer = cc.afterFunc(d, cc.onIdleTimeout) } if VerboseLogs { t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr()) @@ -818,7 +893,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro return nil, cc.werr } - go cc.readLoop() + cc.goRun(cc.readLoop) return cc, nil } @@ -826,7 +901,7 @@ func (cc *ClientConn) healthCheck() { pingTimeout := cc.t.pingTimeout() // We don't need to periodically ping in the health check, because the readLoop of ClientConn will // trigger the healthCheck again if there is no frame received. - ctx, cancel := context.WithTimeout(context.Background(), pingTimeout) + ctx, cancel := cc.contextWithTimeout(context.Background(), pingTimeout) defer cancel() cc.vlogf("http2: Transport sending health check") err := cc.Ping(ctx) @@ -1056,7 +1131,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { // Wait for all in-flight streams to complete or connection to close done := make(chan struct{}) cancelled := false // guarded by cc.mu - go func() { + cc.goRun(func() { cc.mu.Lock() defer cc.mu.Unlock() for { @@ -1068,9 +1143,9 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { if cancelled { break } - cc.cond.Wait() + cc.condWait() } - }() + }) shutdownEnterWaitStateHook() select { case <-done: @@ -1080,7 +1155,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { cc.mu.Lock() // Free the goroutine above cancelled = true - cc.cond.Broadcast() + cc.condBroadcast() cc.mu.Unlock() return ctx.Err() } @@ -1118,7 +1193,7 @@ func (cc *ClientConn) closeForError(err error) { for _, cs := range cc.streams { cs.abortStreamLocked(err) } - cc.cond.Broadcast() + cc.condBroadcast() cc.mu.Unlock() cc.closeConn() } @@ -1215,6 +1290,10 @@ func (cc *ClientConn) decrStreamReservationsLocked() { } func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { + return cc.roundTrip(req, nil) +} + +func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) (*http.Response, error) { ctx := req.Context() cs := &clientStream{ cc: cc, @@ -1229,9 +1308,23 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { respHeaderRecv: make(chan struct{}), donec: make(chan struct{}), } - go cs.doRequest(req) + cc.goRun(func() { + cs.doRequest(req) + }) waitDone := func() error { + if cc.syncHooks != nil { + cc.syncHooks.blockUntil(func() bool { + select { + case <-cs.donec: + case <-ctx.Done(): + case <-cs.reqCancel: + default: + return false + } + return true + }) + } select { case <-cs.donec: return nil @@ -1292,7 +1385,24 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { return err } + if streamf != nil { + streamf(cs) + } + for { + if cc.syncHooks != nil { + cc.syncHooks.blockUntil(func() bool { + select { + case <-cs.respHeaderRecv: + case <-cs.abort: + case <-ctx.Done(): + case <-cs.reqCancel: + default: + return false + } + return true + }) + } select { case <-cs.respHeaderRecv: return handleResponseHeaders() @@ -1348,6 +1458,21 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { if cc.reqHeaderMu == nil { panic("RoundTrip on uninitialized ClientConn") // for tests } + var newStreamHook func(*clientStream) + if cc.syncHooks != nil { + newStreamHook = cc.syncHooks.newstream + cc.syncHooks.blockUntil(func() bool { + select { + case cc.reqHeaderMu <- struct{}{}: + <-cc.reqHeaderMu + case <-cs.reqCancel: + case <-ctx.Done(): + default: + return false + } + return true + }) + } select { case cc.reqHeaderMu <- struct{}{}: case <-cs.reqCancel: @@ -1372,6 +1497,10 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { } cc.mu.Unlock() + if newStreamHook != nil { + newStreamHook(cs) + } + // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? if !cc.t.disableCompression() && req.Header.Get("Accept-Encoding") == "" && @@ -1452,15 +1581,30 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { var respHeaderTimer <-chan time.Time var respHeaderRecv chan struct{} if d := cc.responseHeaderTimeout(); d != 0 { - timer := time.NewTimer(d) + timer := cc.newTimer(d) defer timer.Stop() - respHeaderTimer = timer.C + respHeaderTimer = timer.C() respHeaderRecv = cs.respHeaderRecv } // Wait until the peer half-closes its end of the stream, // or until the request is aborted (via context, error, or otherwise), // whichever comes first. for { + if cc.syncHooks != nil { + cc.syncHooks.blockUntil(func() bool { + select { + case <-cs.peerClosed: + case <-respHeaderTimer: + case <-respHeaderRecv: + case <-cs.abort: + case <-ctx.Done(): + case <-cs.reqCancel: + default: + return false + } + return true + }) + } select { case <-cs.peerClosed: return nil @@ -1609,7 +1753,7 @@ func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { return nil } cc.pendingRequests++ - cc.cond.Wait() + cc.condWait() cc.pendingRequests-- select { case <-cs.abort: @@ -1871,8 +2015,24 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) cs.flow.take(take) return take, nil } - cc.cond.Wait() + cc.condWait() + } +} + +func validateHeaders(hdrs http.Header) string { + for k, vv := range hdrs { + if !httpguts.ValidHeaderFieldName(k) { + return fmt.Sprintf("name %q", k) + } + for _, v := range vv { + if !httpguts.ValidHeaderFieldValue(v) { + // Don't include the value in the error, + // because it may be sensitive. + return fmt.Sprintf("value for header %q", k) + } + } } + return "" } var errNilRequestURL = errors.New("http2: Request.URI is nil") @@ -1912,19 +2072,14 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail } } - // Check for any invalid headers and return an error before we + // Check for any invalid headers+trailers and return an error before we // potentially pollute our hpack state. (We want to be able to // continue to reuse the hpack encoder for future requests) - for k, vv := range req.Header { - if !httpguts.ValidHeaderFieldName(k) { - return nil, fmt.Errorf("invalid HTTP header name %q", k) - } - for _, v := range vv { - if !httpguts.ValidHeaderFieldValue(v) { - // Don't include the value in the error, because it may be sensitive. - return nil, fmt.Errorf("invalid HTTP header value for header %q", k) - } - } + if err := validateHeaders(req.Header); err != "" { + return nil, fmt.Errorf("invalid HTTP header %s", err) + } + if err := validateHeaders(req.Trailer); err != "" { + return nil, fmt.Errorf("invalid HTTP trailer %s", err) } enumerateHeaders := func(f func(name, value string)) { @@ -2143,7 +2298,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) { } // Wake up writeRequestBody via clientStream.awaitFlowControl and // wake up RoundTrip if there is a pending request. - cc.cond.Broadcast() + cc.condBroadcast() closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 { @@ -2231,7 +2386,7 @@ func (rl *clientConnReadLoop) cleanup() { cs.abortStreamLocked(err) } } - cc.cond.Broadcast() + cc.condBroadcast() cc.mu.Unlock() } @@ -2266,10 +2421,9 @@ func (rl *clientConnReadLoop) run() error { cc := rl.cc gotSettings := false readIdleTimeout := cc.t.ReadIdleTimeout - var t *time.Timer + var t timer if readIdleTimeout != 0 { - t = time.AfterFunc(readIdleTimeout, cc.healthCheck) - defer t.Stop() + t = cc.afterFunc(readIdleTimeout, cc.healthCheck) } for { f, err := cc.fr.ReadFrame() @@ -2684,7 +2838,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { }) return nil } - if !cs.firstByte { + if !cs.pastHeaders { cc.logf("protocol error: received DATA before a HEADERS frame") rl.endStreamError(cs, StreamError{ StreamID: f.StreamID, @@ -2867,7 +3021,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { for _, cs := range cc.streams { cs.flow.add(delta) } - cc.cond.Broadcast() + cc.condBroadcast() cc.initialWindowSize = s.Val case SettingHeaderTableSize: @@ -2911,9 +3065,18 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { fl = &cs.flow } if !fl.add(int32(f.Increment)) { + // For stream, the sender sends RST_STREAM with an error code of FLOW_CONTROL_ERROR + if cs != nil { + rl.endStreamError(cs, StreamError{ + StreamID: f.StreamID, + Code: ErrCodeFlowControl, + }) + return nil + } + return ConnectionError(ErrCodeFlowControl) } - cc.cond.Broadcast() + cc.condBroadcast() return nil } @@ -2955,24 +3118,38 @@ func (cc *ClientConn) Ping(ctx context.Context) error { } cc.mu.Unlock() } - errc := make(chan error, 1) - go func() { + var pingError error + errc := make(chan struct{}) + cc.goRun(func() { cc.wmu.Lock() defer cc.wmu.Unlock() - if err := cc.fr.WritePing(false, p); err != nil { - errc <- err + if pingError = cc.fr.WritePing(false, p); pingError != nil { + close(errc) return } - if err := cc.bw.Flush(); err != nil { - errc <- err + if pingError = cc.bw.Flush(); pingError != nil { + close(errc) return } - }() + }) + if cc.syncHooks != nil { + cc.syncHooks.blockUntil(func() bool { + select { + case <-c: + case <-errc: + case <-ctx.Done(): + case <-cc.readerDone: + default: + return false + } + return true + }) + } select { case <-c: return nil - case err := <-errc: - return err + case <-errc: + return pingError case <-ctx.Done(): return ctx.Err() case <-cc.readerDone: @@ -3141,9 +3318,17 @@ func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, err } func (t *Transport) idleConnTimeout() time.Duration { + // to keep things backwards compatible, we use non-zero values of + // IdleConnTimeout, followed by using the IdleConnTimeout on the underlying + // http1 transport, followed by 0 + if t.IdleConnTimeout != 0 { + return t.IdleConnTimeout + } + if t.t1 != nil { return t.t1.IdleConnTimeout } + return 0 } diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go index e7d3df4bd..b0e419857 100644 --- a/vendor/golang.org/x/sys/unix/aliases.go +++ b/vendor/golang.org/x/sys/unix/aliases.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go index 16dc69937..2f0fa76e4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin && go1.12 +//go:build darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 64d1bb4db..2b57e0f73 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -13,6 +13,7 @@ package unix import ( + "errors" "sync" "unsafe" ) @@ -169,25 +170,26 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) - if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { + // Suppress ENOMEM errors to be compatible with the C library __xuname() implementation. + if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) - if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) - if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) - if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } @@ -205,7 +207,7 @@ func Uname(uname *Utsname) error { mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) - if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 0f85e29e6..5682e2628 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1849,6 +1849,105 @@ func Dup2(oldfd, newfd int) error { //sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) //sys Fsopen(fsName string, flags int) (fd int, err error) //sys Fspick(dirfd int, pathName string, flags int) (fd int, err error) + +//sys fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) + +func fsconfigCommon(fd int, cmd uint, key string, value *byte, aux int) (err error) { + var keyp *byte + if keyp, err = BytePtrFromString(key); err != nil { + return + } + return fsconfig(fd, cmd, keyp, value, aux) +} + +// FsconfigSetFlag is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_FLAG. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +func FsconfigSetFlag(fd int, key string) (err error) { + return fsconfigCommon(fd, FSCONFIG_SET_FLAG, key, nil, 0) +} + +// FsconfigSetString is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_STRING. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// value is the parameter value to set. +func FsconfigSetString(fd int, key string, value string) (err error) { + var valuep *byte + if valuep, err = BytePtrFromString(value); err != nil { + return + } + return fsconfigCommon(fd, FSCONFIG_SET_STRING, key, valuep, 0) +} + +// FsconfigSetBinary is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_BINARY. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// value is the parameter value to set. +func FsconfigSetBinary(fd int, key string, value []byte) (err error) { + if len(value) == 0 { + return EINVAL + } + return fsconfigCommon(fd, FSCONFIG_SET_BINARY, key, &value[0], len(value)) +} + +// FsconfigSetPath is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_PATH. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// path is a non-empty path for specified key. +// atfd is a file descriptor at which to start lookup from or AT_FDCWD. +func FsconfigSetPath(fd int, key string, path string, atfd int) (err error) { + var valuep *byte + if valuep, err = BytePtrFromString(path); err != nil { + return + } + return fsconfigCommon(fd, FSCONFIG_SET_PATH, key, valuep, atfd) +} + +// FsconfigSetPathEmpty is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_PATH_EMPTY. The same as +// FconfigSetPath but with AT_PATH_EMPTY implied. +func FsconfigSetPathEmpty(fd int, key string, path string, atfd int) (err error) { + var valuep *byte + if valuep, err = BytePtrFromString(path); err != nil { + return + } + return fsconfigCommon(fd, FSCONFIG_SET_PATH_EMPTY, key, valuep, atfd) +} + +// FsconfigSetFd is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_FD. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// value is a file descriptor to be assigned to specified key. +func FsconfigSetFd(fd int, key string, value int) (err error) { + return fsconfigCommon(fd, FSCONFIG_SET_FD, key, nil, value) +} + +// FsconfigCreate is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_CMD_CREATE. +// +// fd is the filesystem context to act upon. +func FsconfigCreate(fd int) (err error) { + return fsconfig(fd, FSCONFIG_CMD_CREATE, nil, nil, 0) +} + +// FsconfigReconfigure is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_CMD_RECONFIGURE. +// +// fd is the filesystem context to act upon. +func FsconfigReconfigure(fd int) (err error) { + return fsconfig(fd, FSCONFIG_CMD_RECONFIGURE, nil, nil, 0) +} + //sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64 //sysnb Getpgid(pid int) (pgid int, err error) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 1488d2712..87d8612a1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -906,6 +906,16 @@ func Fspick(dirfd int, pathName string, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) { + _, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(value)), uintptr(aux), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index dc0c955ee..eff6bcdef 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -836,6 +836,15 @@ const ( FSPICK_EMPTY_PATH = 0x8 FSMOUNT_CLOEXEC = 0x1 + + FSCONFIG_SET_FLAG = 0x0 + FSCONFIG_SET_STRING = 0x1 + FSCONFIG_SET_BINARY = 0x2 + FSCONFIG_SET_PATH = 0x3 + FSCONFIG_SET_PATH_EMPTY = 0x4 + FSCONFIG_SET_FD = 0x5 + FSCONFIG_CMD_CREATE = 0x6 + FSCONFIG_CMD_RECONFIGURE = 0x7 ) type OpenHow struct { @@ -1550,6 +1559,7 @@ const ( IFLA_DEVLINK_PORT = 0x3e IFLA_GSO_IPV4_MAX_SIZE = 0x3f IFLA_GRO_IPV4_MAX_SIZE = 0x40 + IFLA_DPLL_PIN = 0x41 IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0 IFLA_PROTO_DOWN_REASON_MASK = 0x1 IFLA_PROTO_DOWN_REASON_VALUE = 0x2 @@ -1565,6 +1575,7 @@ const ( IFLA_INET6_ICMP6STATS = 0x6 IFLA_INET6_TOKEN = 0x7 IFLA_INET6_ADDR_GEN_MODE = 0x8 + IFLA_INET6_RA_MTU = 0x9 IFLA_BR_UNSPEC = 0x0 IFLA_BR_FORWARD_DELAY = 0x1 IFLA_BR_HELLO_TIME = 0x2 @@ -1612,6 +1623,9 @@ const ( IFLA_BR_MCAST_MLD_VERSION = 0x2c IFLA_BR_VLAN_STATS_PER_PORT = 0x2d IFLA_BR_MULTI_BOOLOPT = 0x2e + IFLA_BR_MCAST_QUERIER_STATE = 0x2f + IFLA_BR_FDB_N_LEARNED = 0x30 + IFLA_BR_FDB_MAX_LEARNED = 0x31 IFLA_BRPORT_UNSPEC = 0x0 IFLA_BRPORT_STATE = 0x1 IFLA_BRPORT_PRIORITY = 0x2 @@ -1649,6 +1663,14 @@ const ( IFLA_BRPORT_BACKUP_PORT = 0x22 IFLA_BRPORT_MRP_RING_OPEN = 0x23 IFLA_BRPORT_MRP_IN_OPEN = 0x24 + IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT = 0x25 + IFLA_BRPORT_MCAST_EHT_HOSTS_CNT = 0x26 + IFLA_BRPORT_LOCKED = 0x27 + IFLA_BRPORT_MAB = 0x28 + IFLA_BRPORT_MCAST_N_GROUPS = 0x29 + IFLA_BRPORT_MCAST_MAX_GROUPS = 0x2a + IFLA_BRPORT_NEIGH_VLAN_SUPPRESS = 0x2b + IFLA_BRPORT_BACKUP_NHID = 0x2c IFLA_INFO_UNSPEC = 0x0 IFLA_INFO_KIND = 0x1 IFLA_INFO_DATA = 0x2 @@ -1670,6 +1692,9 @@ const ( IFLA_MACVLAN_MACADDR = 0x4 IFLA_MACVLAN_MACADDR_DATA = 0x5 IFLA_MACVLAN_MACADDR_COUNT = 0x6 + IFLA_MACVLAN_BC_QUEUE_LEN = 0x7 + IFLA_MACVLAN_BC_QUEUE_LEN_USED = 0x8 + IFLA_MACVLAN_BC_CUTOFF = 0x9 IFLA_VRF_UNSPEC = 0x0 IFLA_VRF_TABLE = 0x1 IFLA_VRF_PORT_UNSPEC = 0x0 @@ -1693,9 +1718,22 @@ const ( IFLA_XFRM_UNSPEC = 0x0 IFLA_XFRM_LINK = 0x1 IFLA_XFRM_IF_ID = 0x2 + IFLA_XFRM_COLLECT_METADATA = 0x3 IFLA_IPVLAN_UNSPEC = 0x0 IFLA_IPVLAN_MODE = 0x1 IFLA_IPVLAN_FLAGS = 0x2 + NETKIT_NEXT = -0x1 + NETKIT_PASS = 0x0 + NETKIT_DROP = 0x2 + NETKIT_REDIRECT = 0x7 + NETKIT_L2 = 0x0 + NETKIT_L3 = 0x1 + IFLA_NETKIT_UNSPEC = 0x0 + IFLA_NETKIT_PEER_INFO = 0x1 + IFLA_NETKIT_PRIMARY = 0x2 + IFLA_NETKIT_POLICY = 0x3 + IFLA_NETKIT_PEER_POLICY = 0x4 + IFLA_NETKIT_MODE = 0x5 IFLA_VXLAN_UNSPEC = 0x0 IFLA_VXLAN_ID = 0x1 IFLA_VXLAN_GROUP = 0x2 @@ -1726,6 +1764,8 @@ const ( IFLA_VXLAN_GPE = 0x1b IFLA_VXLAN_TTL_INHERIT = 0x1c IFLA_VXLAN_DF = 0x1d + IFLA_VXLAN_VNIFILTER = 0x1e + IFLA_VXLAN_LOCALBYPASS = 0x1f IFLA_GENEVE_UNSPEC = 0x0 IFLA_GENEVE_ID = 0x1 IFLA_GENEVE_REMOTE = 0x2 @@ -1740,6 +1780,7 @@ const ( IFLA_GENEVE_LABEL = 0xb IFLA_GENEVE_TTL_INHERIT = 0xc IFLA_GENEVE_DF = 0xd + IFLA_GENEVE_INNER_PROTO_INHERIT = 0xe IFLA_BAREUDP_UNSPEC = 0x0 IFLA_BAREUDP_PORT = 0x1 IFLA_BAREUDP_ETHERTYPE = 0x2 @@ -1752,6 +1793,8 @@ const ( IFLA_GTP_FD1 = 0x2 IFLA_GTP_PDP_HASHSIZE = 0x3 IFLA_GTP_ROLE = 0x4 + IFLA_GTP_CREATE_SOCKETS = 0x5 + IFLA_GTP_RESTART_COUNT = 0x6 IFLA_BOND_UNSPEC = 0x0 IFLA_BOND_MODE = 0x1 IFLA_BOND_ACTIVE_SLAVE = 0x2 @@ -1781,6 +1824,9 @@ const ( IFLA_BOND_AD_ACTOR_SYSTEM = 0x1a IFLA_BOND_TLB_DYNAMIC_LB = 0x1b IFLA_BOND_PEER_NOTIF_DELAY = 0x1c + IFLA_BOND_AD_LACP_ACTIVE = 0x1d + IFLA_BOND_MISSED_MAX = 0x1e + IFLA_BOND_NS_IP6_TARGET = 0x1f IFLA_BOND_AD_INFO_UNSPEC = 0x0 IFLA_BOND_AD_INFO_AGGREGATOR = 0x1 IFLA_BOND_AD_INFO_NUM_PORTS = 0x2 @@ -1796,6 +1842,7 @@ const ( IFLA_BOND_SLAVE_AD_AGGREGATOR_ID = 0x6 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE = 0x7 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8 + IFLA_BOND_SLAVE_PRIO = 0x9 IFLA_VF_INFO_UNSPEC = 0x0 IFLA_VF_INFO = 0x1 IFLA_VF_UNSPEC = 0x0 @@ -1854,8 +1901,16 @@ const ( IFLA_STATS_LINK_XSTATS_SLAVE = 0x3 IFLA_STATS_LINK_OFFLOAD_XSTATS = 0x4 IFLA_STATS_AF_SPEC = 0x5 + IFLA_STATS_GETSET_UNSPEC = 0x0 + IFLA_STATS_GET_FILTERS = 0x1 + IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS = 0x2 IFLA_OFFLOAD_XSTATS_UNSPEC = 0x0 IFLA_OFFLOAD_XSTATS_CPU_HIT = 0x1 + IFLA_OFFLOAD_XSTATS_HW_S_INFO = 0x2 + IFLA_OFFLOAD_XSTATS_L3_STATS = 0x3 + IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC = 0x0 + IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST = 0x1 + IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED = 0x2 IFLA_XDP_UNSPEC = 0x0 IFLA_XDP_FD = 0x1 IFLA_XDP_ATTACHED = 0x2 @@ -1885,6 +1940,11 @@ const ( IFLA_RMNET_UNSPEC = 0x0 IFLA_RMNET_MUX_ID = 0x1 IFLA_RMNET_FLAGS = 0x2 + IFLA_MCTP_UNSPEC = 0x0 + IFLA_MCTP_NET = 0x1 + IFLA_DSA_UNSPEC = 0x0 + IFLA_DSA_CONDUIT = 0x1 + IFLA_DSA_MASTER = 0x1 ) const ( diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go index 4581bead5..868c844e4 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go @@ -32,6 +32,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA return map[string]common.OpenAPIDefinition{ "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), @@ -162,6 +163,49 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go index cfa29a3b0..ab0da6344 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go @@ -392,6 +392,25 @@ type ServicePort struct { NodePort int32 `json:"nodePort,omitempty"` } +// GatewayPort contains information on Gateway service's port. +type GatewayPort struct { + // The name of this port within the gateway service. + // +optional + Name string `json:"name,omitempty"` + + // The port that will be exposed by the gateway service. + Port int32 `json:"port"` + + // Number of the port to access the backend service. + // +optional + BackendServicePort int32 `json:"backendServicePort,omitempty"` + + // The port on each node on which this gateway service is exposed when type is + // NodePort or LoadBalancer. + // +optional + NodePort int32 `json:"nodePort,omitempty"` +} + // Beware of MergeServicePorts // ref: https://github.com/kmodules/client-go/blob/03dac1aea5084354127990a10d0b0e7529460dd5/core/v1/service.go#L103-L136 func PatchServicePorts(cur []core.ServicePort, desired []ServicePort) []core.ServicePort { diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go index 2dc937aac..52b9367f4 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go @@ -108,6 +108,22 @@ func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GatewayPort) DeepCopyInto(out *GatewayPort) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayPort. +func (in *GatewayPort) DeepCopy() *GatewayPort { + if in == nil { + return nil + } + out := new(GatewayPort) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IONiceSettings) DeepCopyInto(out *IONiceSettings) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_helpers.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_helpers.go index a30fdc5c3..6d42bd92d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_helpers.go @@ -26,38 +26,39 @@ import ( "kmodules.xyz/client-go/apiextensions" ) -func (m MsSQLVersion) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralMsSQLVersion)) +func (m MSSQLVersion) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { + return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralMSSQLVersion)) } -var _ apis.ResourceInfo = &MsSQLVersion{} +var _ apis.ResourceInfo = &MSSQLVersion{} -func (m MsSQLVersion) ResourceFQN() string { - return fmt.Sprintf("%s.%s", ResourcePluralMsSQLVersion, catalog.GroupName) +func (m MSSQLVersion) ResourceFQN() string { + return fmt.Sprintf("%s.%s", ResourcePluralMSSQLVersion, catalog.GroupName) } -func (m MsSQLVersion) ResourceShortCode() string { - return ResourceCodeMsSQLVersion +func (m MSSQLVersion) ResourceShortCode() string { + return ResourceCodeMSSQLVersion } -func (m MsSQLVersion) ResourceKind() string { - return ResourceKindMsSQLVersion +func (m MSSQLVersion) ResourceKind() string { + return ResourceKindMSSQLVersion } -func (m MsSQLVersion) ResourceSingular() string { - return ResourceSingularMsSQLVersion +func (m MSSQLVersion) ResourceSingular() string { + return ResourceSingularMSSQLVersion } -func (m MsSQLVersion) ResourcePlural() string { - return ResourcePluralMsSQLVersion +func (m MSSQLVersion) ResourcePlural() string { + return ResourcePluralMSSQLVersion } -func (m MsSQLVersion) ValidateSpecs() error { +func (m MSSQLVersion) ValidateSpecs() error { if m.Spec.Version == "" || m.Spec.DB.Image == "" || m.Spec.Coordinator.Image == "" { - return fmt.Errorf(`at least one of the following specs is not set for MsSQLVersion "%v": + return fmt.Errorf(`at least one of the following specs is not set for MSSQLVersion "%v": spec.version, spec.coordinator.image, spec.initContainer.image`, m.Name) } + // TODO: add m.spec.exporter.image check FOR monitoring return nil } diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_types.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_types.go index 929f6e0b9..b819bf056 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_types.go @@ -21,17 +21,11 @@ import ( appcat "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1" ) -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// TODO: -// set scope=Cluster for MsSQLVersion struct - const ( - ResourceCodeMsSQLVersion = "msversion" - ResourceKindMsSQLVersion = "MsSQLVersion" - ResourceSingularMsSQLVersion = "mssqlversion" - ResourcePluralMsSQLVersion = "mssqlversions" + ResourceCodeMSSQLVersion = "msversion" + ResourceKindMSSQLVersion = "MSSQLVersion" + ResourceSingularMSSQLVersion = "mssqlversion" + ResourcePluralMSSQLVersion = "mssqlversions" ) // +genclient @@ -41,28 +35,28 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true -// +kubebuilder:resource:path=mssqlversions,singular=mssqlversion,shortName=msversion,categories={datastore,kubedb,appscode} +// +kubebuilder:resource:path=mssqlversions,singular=mssqlversion,scope=Cluster,shortName=msversion,categories={datastore,kubedb,appscode} // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" // +kubebuilder:printcolumn:name="DB_IMAGE",type="string",JSONPath=".spec.db.image" // +kubebuilder:printcolumn:name="Deprecated",type="boolean",JSONPath=".spec.deprecated" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -type MsSQLVersion struct { +type MSSQLVersion struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec MsSQLVersionSpec `json:"spec,omitempty"` + Spec MSSQLVersionSpec `json:"spec,omitempty"` } -// MsSQLVersionSpec defines the desired state of MsSQL Version -type MsSQLVersionSpec struct { +// MSSQLVersionSpec defines the desired state of MSSQL Version +type MSSQLVersionSpec struct { // Version Version string `json:"version"` // Database Image - DB MsSQLVersionDatabase `json:"db"` + DB MSSQLVersionDatabase `json:"db"` // Coordinator Image // +optional - Coordinator MsSQLCoordinator `json:"coordinator,omitempty"` + Coordinator MSSQLCoordinator `json:"coordinator,omitempty"` // Init container Image - InitContainer MsSQLInitContainer `json:"initContainer"` + InitContainer MSSQLInitContainer `json:"initContainer"` // Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded. // +optional Deprecated bool `json:"deprecated,omitempty"` @@ -71,45 +65,45 @@ type MsSQLVersionSpec struct { Stash appcat.StashAddonSpec `json:"stash,omitempty"` // SecurityContext is for the additional config for the DB container // +optional - SecurityContext MsSQLSecurityContext `json:"securityContext"` + SecurityContext MSSQLSecurityContext `json:"securityContext"` // PSP names // +optional - PodSecurityPolicies MsSQLVersionPodSecurityPolicy `json:"podSecurityPolicies"` + PodSecurityPolicies MSSQLVersionPodSecurityPolicy `json:"podSecurityPolicies"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` } -// MsSQLVersionDatabase is the MsSQL Database image -type MsSQLVersionDatabase struct { +// MSSQLVersionDatabase is the MSSQL Database image +type MSSQLVersionDatabase struct { Image string `json:"image"` } -// MsSQLCoordinator is the MSSQL coordinator Container image -type MsSQLCoordinator struct { +// MSSQLCoordinator is the MSSQL coordinator Container image +type MSSQLCoordinator struct { Image string `json:"image"` } -// MsSQLInitContainer is the MsSQL Container initializer -type MsSQLInitContainer struct { +// MSSQLInitContainer is the MSSQL Container initializer +type MSSQLInitContainer struct { Image string `json:"image"` } -// MsSQLVersionPodSecurityPolicy is the MsSQL pod security policies -type MsSQLVersionPodSecurityPolicy struct { +// MSSQLVersionPodSecurityPolicy is the MSSQL pod security policies +type MSSQLVersionPodSecurityPolicy struct { DatabasePolicyName string `json:"databasePolicyName"` } -// MsSQLSecurityContext is for additional configuration for the MSSQL database container -type MsSQLSecurityContext struct { +// MSSQLSecurityContext is for additional configuration for the MSSQL database container +type MSSQLSecurityContext struct { RunAsUser *int64 `json:"runAsUser,omitempty"` RunAsGroup *int64 `json:"runAsGroup,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// MsSQLVersionList contains a list of MsSQLVersion -type MsSQLVersionList struct { +// MSSQLVersionList contains a list of MSSQLVersion +type MSSQLVersionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MsSQLVersion `json:"items"` + Items []MSSQLVersion `json:"items"` } diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go index 06629a387..83d24a627 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go @@ -440,6 +440,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), @@ -494,6 +495,14 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/catalog/v1alpha1.KafkaVersionList": schema_apimachinery_apis_catalog_v1alpha1_KafkaVersionList(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.KafkaVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_KafkaVersionPodSecurityPolicy(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.KafkaVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_KafkaVersionSpec(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLCoordinator": schema_apimachinery_apis_catalog_v1alpha1_MSSQLCoordinator(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLInitContainer": schema_apimachinery_apis_catalog_v1alpha1_MSSQLInitContainer(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLSecurityContext": schema_apimachinery_apis_catalog_v1alpha1_MSSQLSecurityContext(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersion": schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersion(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionDatabase": schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionDatabase(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionList": schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionList(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionPodSecurityPolicy(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionSpec(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ManifestBackup": schema_apimachinery_apis_catalog_v1alpha1_ManifestBackup(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ManifestRestore": schema_apimachinery_apis_catalog_v1alpha1_ManifestRestore(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersion": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersion(ref), @@ -518,14 +527,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionList": schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionList(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionPodSecurityPolicy(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionSpec(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLCoordinator": schema_apimachinery_apis_catalog_v1alpha1_MsSQLCoordinator(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLInitContainer": schema_apimachinery_apis_catalog_v1alpha1_MsSQLInitContainer(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLSecurityContext": schema_apimachinery_apis_catalog_v1alpha1_MsSQLSecurityContext(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersion": schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersion(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionDatabase": schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionDatabase(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionList": schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionList(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionPodSecurityPolicy(ref), - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionSpec(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MySQLUpdateConstraints": schema_apimachinery_apis_catalog_v1alpha1_MySQLUpdateConstraints(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MySQLVersion": schema_apimachinery_apis_catalog_v1alpha1_MySQLVersion(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MySQLVersionAllowlist": schema_apimachinery_apis_catalog_v1alpha1_MySQLVersionAllowlist(ref), @@ -21395,6 +21396,49 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -24214,13 +24258,14 @@ func schema_apimachinery_apis_catalog_v1alpha1_KafkaVersionSpec(ref common.Refer } } -func schema_apimachinery_apis_catalog_v1alpha1_ManifestBackup(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLCoordinator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "MSSQLCoordinator is the MSSQL coordinator Container image", + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "image": { SchemaProps: spec.SchemaProps{ Default: "", Type: []string{"string"}, @@ -24228,19 +24273,20 @@ func schema_apimachinery_apis_catalog_v1alpha1_ManifestBackup(ref common.Referen }, }, }, - Required: []string{"name"}, + Required: []string{"image"}, }, }, } } -func schema_apimachinery_apis_catalog_v1alpha1_ManifestRestore(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "MSSQLInitContainer is the MSSQL Container initializer", + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "image": { SchemaProps: spec.SchemaProps{ Default: "", Type: []string{"string"}, @@ -24248,13 +24294,38 @@ func schema_apimachinery_apis_catalog_v1alpha1_ManifestRestore(ref common.Refere }, }, }, - Required: []string{"name"}, + Required: []string{"image"}, }, }, } } -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MSSQLSecurityContext is for additional configuration for the MSSQL database container", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "runAsUser": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "runAsGroup": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -24283,85 +24354,22 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersion(ref common.Referen "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionSpec"}, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionCoordinator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionCoordinator is the MariaDB Coordinator image", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"image"}, - }, - }, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionDatabase is the mariadb image", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"image"}, - }, - }, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionExporter(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionExporter is the image for the MariaDB exporter", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"image"}, - }, - }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionSpec"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionInitContainer is the MariaDB Container initializer", + Description: "MSSQLVersionDatabase is the MSSQL Database image", Type: []string{"object"}, Properties: map[string]spec.Schema{ "image": { @@ -24378,11 +24386,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionInitContainer(ref c } } -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionList is a list of MariaDBVersions", + Description: "MSSQLVersionList contains a list of MSSQLVersion", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -24407,31 +24415,31 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionList(ref common.Ref }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of MariaDBVersion CRD objects", - Type: []string{"array"}, + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersion"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersion"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersion"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersion"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionPodSecurityPolicy is the MariaDB pod security policies", + Description: "MSSQLVersionPodSecurityPolicy is the MSSQL pod security policies", Type: []string{"object"}, Properties: map[string]spec.Schema{ "databasePolicyName": { @@ -24448,11 +24456,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionPodSecurityPolicy(r } } -func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MSSQLVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MariaDBVersionSpec is the spec for MariaDB version", + Description: "MSSQLVersionSpec defines the desired state of MSSQL Version", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -24467,21 +24475,21 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "Database Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionDatabase"), }, }, - "exporter": { + "coordinator": { SchemaProps: spec.SchemaProps{ - Description: "Exporter Image", + Description: "Coordinator Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLCoordinator"), }, }, - "coordinator": { + "initContainer": { SchemaProps: spec.SchemaProps{ - Description: "Coordinator Image", + Description: "Init container Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionCoordinator"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLInitContainer"), }, }, "deprecated": { @@ -24491,25 +24499,25 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.Ref Format: "", }, }, - "initContainer": { + "stash": { SchemaProps: spec.SchemaProps{ - Description: "Init container Image", + Description: "Stash defines backup and restore task definitions.", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer"), + Ref: ref("kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec"), }, }, - "podSecurityPolicies": { + "securityContext": { SchemaProps: spec.SchemaProps{ - Description: "PSP names", + Description: "SecurityContext is for the additional config for the DB container", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLSecurityContext"), }, }, - "stash": { + "podSecurityPolicies": { SchemaProps: spec.SchemaProps{ - Description: "Stash defines backup and restore task definitions.", + Description: "PSP names", Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionPodSecurityPolicy"), }, }, "updateConstraints": { @@ -24519,36 +24527,56 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.Ref Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, - "gitSyncer": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), - }, - }, - "securityContext": { + }, + Required: []string{"version", "db", "initContainer"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MSSQLVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_ManifestBackup(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "SecurityContext is for the additional config for the DB container", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "archiver": { + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_ManifestRestore(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "Archiver defines the walg & stash-addon related specifications", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies"}, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -24577,22 +24605,22 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersion(ref common.Refer "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionSpec"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionCoordinator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MemcachedVersionDatabase is the Memcached Database image", + Description: "MariaDBVersionCoordinator is the MariaDB Coordinator image", Type: []string{"object"}, Properties: map[string]spec.Schema{ "image": { @@ -24609,11 +24637,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionDatabase(ref comm } } -func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionExporter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MemcachedVersionExporter is the image for the Memcached exporter", + Description: "MariaDBVersionDatabase is the mariadb image", Type: []string{"object"}, Properties: map[string]spec.Schema{ "image": { @@ -24630,18 +24658,60 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionExporter(ref comm } } -func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionExporter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MemcachedVersionList is a list of MemcachedVersions", + Description: "MariaDBVersionExporter is the image for the MariaDB exporter", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MariaDBVersionInitContainer is the MariaDB Container initializer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MariaDBVersionList is a list of MariaDBVersions", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, "apiVersion": { @@ -24659,13 +24729,13 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionList(ref common.R }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of MemcachedVersion CRD objects", + Description: "Items is a list of MariaDBVersion CRD objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersion"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersion"), }, }, }, @@ -24675,15 +24745,15 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionList(ref common.R }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersion"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersion"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MemcachedVersionPodSecurityPolicy is the Memcached pod security policies", + Description: "MariaDBVersionPodSecurityPolicy is the MariaDB pod security policies", Type: []string{"object"}, Properties: map[string]spec.Schema{ "databasePolicyName": { @@ -24700,11 +24770,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionPodSecurityPolicy } } -func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MemcachedVersionSpec is the spec for memcached version", + Description: "MariaDBVersionSpec is the spec for MariaDB version", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -24719,14 +24789,21 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionSpec(ref common.R SchemaProps: spec.SchemaProps{ Description: "Database Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionDatabase"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase"), }, }, "exporter": { SchemaProps: spec.SchemaProps{ Description: "Exporter Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionExporter"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter"), + }, + }, + "coordinator": { + SchemaProps: spec.SchemaProps{ + Description: "Coordinator Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionCoordinator"), }, }, "deprecated": { @@ -24736,57 +24813,64 @@ func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionSpec(ref common.R Format: "", }, }, + "initContainer": { + SchemaProps: spec.SchemaProps{ + Description: "Init container Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer"), + }, + }, "podSecurityPolicies": { SchemaProps: spec.SchemaProps{ Description: "PSP names", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionPodSecurityPolicy"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy"), }, }, - "securityContext": { + "stash": { SchemaProps: spec.SchemaProps{ - Description: "SecurityContext is for the additional config for the DB container", + Description: "Stash defines backup and restore task definitions.", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"), + Ref: ref("kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec"), }, }, - }, - Required: []string{"version", "db", "exporter", "podSecurityPolicies"}, - }, - }, - Dependencies: []string{ - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"}, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MongoDBSecurityContext provides additional securityContext settings for the MongoDBSecurityContext Image", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "runAsUser": { + "updateConstraints": { SchemaProps: spec.SchemaProps{ - Description: "RunAsUser is default UID for the DB container.", - Type: []string{"integer"}, - Format: "int64", + Description: "update constraints", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, - "runAsGroup": { + "gitSyncer": { SchemaProps: spec.SchemaProps{ - Description: "RunAsGroup is default GID for the DB container.", - Type: []string{"integer"}, - Format: "int64", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext is for the additional config for the DB container", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"), + }, + }, + "archiver": { + SchemaProps: spec.SchemaProps{ + Description: "Archiver defines the walg & stash-addon related specifications", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec"), }, }, }, + Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies"}, }, }, + Dependencies: []string{ + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -24815,43 +24899,22 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersion(ref common.Referen "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionSpec"}, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MongoDBVersionDatabase is the MongoDB Database image", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"image"}, - }, - }, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionSpec"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionExporter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MongoDBVersionExporter is the image for the MongoDB exporter", + Description: "MemcachedVersionDatabase is the Memcached Database image", Type: []string{"object"}, Properties: map[string]spec.Schema{ "image": { @@ -24868,11 +24931,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionExporter(ref common } } -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionExporter(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MongoDBVersionInitContainer is the Elasticsearch Container initializer", + Description: "MemcachedVersionExporter is the image for the Memcached exporter", Type: []string{"object"}, Properties: map[string]spec.Schema{ "image": { @@ -24889,11 +24952,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionInitContainer(ref c } } -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MongoDBVersionList is a list of MongoDBVersions", + Description: "MemcachedVersionList is a list of MemcachedVersions", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -24918,13 +24981,13 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionList(ref common.Ref }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of MongoDBVersion CRD objects", + Description: "Items is a list of MemcachedVersion CRD objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersion"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersion"), }, }, }, @@ -24934,15 +24997,15 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionList(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersion"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersion"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MongoDBVersionPodSecurityPolicy is the MongoDB pod security policies", + Description: "MemcachedVersionPodSecurityPolicy is the Memcached pod security policies", Type: []string{"object"}, Properties: map[string]spec.Schema{ "databasePolicyName": { @@ -24959,11 +25022,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionPodSecurityPolicy(r } } -func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MongoDBVersionSpec is the spec for mongodb version", + Description: "MemcachedVersionSpec is the spec for memcached version", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -24974,25 +25037,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionSpec(ref common.Ref Format: "", }, }, - "distribution": { - SchemaProps: spec.SchemaProps{ - Description: "Distribution", - Type: []string{"string"}, - Format: "", - }, - }, "db": { SchemaProps: spec.SchemaProps{ Description: "Database Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionDatabase"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionDatabase"), }, }, "exporter": { SchemaProps: spec.SchemaProps{ Description: "Exporter Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionExporter"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionExporter"), }, }, "deprecated": { @@ -25002,129 +25058,48 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionSpec(ref common.Ref Format: "", }, }, - "initContainer": { - SchemaProps: spec.SchemaProps{ - Description: "Init container Image", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionInitContainer"), - }, - }, "podSecurityPolicies": { SchemaProps: spec.SchemaProps{ Description: "PSP names", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy"), - }, - }, - "replicationModeDetector": { - SchemaProps: spec.SchemaProps{ - Description: "ReplicationModeDetector Image", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ReplicationModeDetector"), - }, - }, - "stash": { - SchemaProps: spec.SchemaProps{ - Description: "Stash defines backup and restore task definitions.", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec"), - }, - }, - "updateConstraints": { - SchemaProps: spec.SchemaProps{ - Description: "update constraints", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), - }, - }, - "gitSyncer": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionPodSecurityPolicy"), }, }, "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext is for the additional config for the DB container", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBSecurityContext"), - }, - }, - "archiver": { - SchemaProps: spec.SchemaProps{ - Description: "Archiver defines the walg & kube-stash-addon related specifications", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"), }, }, }, - Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies", "replicationModeDetector"}, + Required: []string{"version", "db", "exporter", "podSecurityPolicies"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ReplicationModeDetector", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLCoordinator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MsSQLCoordinator is the MSSQL coordinator Container image", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"image"}, - }, - }, - } -} - -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MsSQLInitContainer is the MsSQL Container initializer", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "image": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"image"}, - }, - }, + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLSecurityContext is for additional configuration for the MSSQL database container", + Description: "MongoDBSecurityContext provides additional securityContext settings for the MongoDBSecurityContext Image", Type: []string{"object"}, Properties: map[string]spec.Schema{ "runAsUser": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "RunAsUser is default UID for the DB container.", + Type: []string{"integer"}, + Format: "int64", }, }, "runAsGroup": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "RunAsGroup is default GID for the DB container.", + Type: []string{"integer"}, + Format: "int64", }, }, }, @@ -25133,7 +25108,7 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLSecurityContext(ref common.R } } -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -25162,22 +25137,64 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersion(ref common.Reference "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionSpec"}, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MongoDBVersionDatabase is the MongoDB Database image", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionExporter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MongoDBVersionExporter is the image for the MongoDB exporter", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, } } -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLVersionDatabase is the MsSQL Database image", + Description: "MongoDBVersionInitContainer is the Elasticsearch Container initializer", Type: []string{"object"}, Properties: map[string]spec.Schema{ "image": { @@ -25194,11 +25211,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionDatabase(ref common.R } } -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLVersionList contains a list of MsSQLVersion", + Description: "MongoDBVersionList is a list of MongoDBVersions", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -25223,31 +25240,31 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionList(ref common.Refer }, "items": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Items is a list of MongoDBVersion CRD objects", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersion"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersion"), }, }, }, }, }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersion"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersion"}, } } -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLVersionPodSecurityPolicy is the MsSQL pod security policies", + Description: "MongoDBVersionPodSecurityPolicy is the MongoDB pod security policies", Type: []string{"object"}, Properties: map[string]spec.Schema{ "databasePolicyName": { @@ -25264,11 +25281,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionPodSecurityPolicy(ref } } -func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLVersionSpec defines the desired state of MsSQL Version", + Description: "MongoDBVersionSpec is the spec for mongodb version", Type: []string{"object"}, Properties: map[string]spec.Schema{ "version": { @@ -25279,32 +25296,53 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionSpec(ref common.Refer Format: "", }, }, + "distribution": { + SchemaProps: spec.SchemaProps{ + Description: "Distribution", + Type: []string{"string"}, + Format: "", + }, + }, "db": { SchemaProps: spec.SchemaProps{ Description: "Database Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionDatabase"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionDatabase"), }, }, - "coordinator": { + "exporter": { SchemaProps: spec.SchemaProps{ - Description: "Coordinator Image", + Description: "Exporter Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLCoordinator"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionExporter"), + }, + }, + "deprecated": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.", + Type: []string{"boolean"}, + Format: "", }, }, "initContainer": { SchemaProps: spec.SchemaProps{ Description: "Init container Image", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLInitContainer"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionInitContainer"), }, }, - "deprecated": { + "podSecurityPolicies": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.", - Type: []string{"boolean"}, - Format: "", + Description: "PSP names", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy"), + }, + }, + "replicationModeDetector": { + SchemaProps: spec.SchemaProps{ + Description: "ReplicationModeDetector Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ReplicationModeDetector"), }, }, "stash": { @@ -25314,33 +25352,39 @@ func schema_apimachinery_apis_catalog_v1alpha1_MsSQLVersionSpec(ref common.Refer Ref: ref("kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec"), }, }, - "securityContext": { + "updateConstraints": { SchemaProps: spec.SchemaProps{ - Description: "SecurityContext is for the additional config for the DB container", + Description: "update constraints", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLSecurityContext"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, - "podSecurityPolicies": { + "gitSyncer": { SchemaProps: spec.SchemaProps{ - Description: "PSP names", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext is for the additional config for the DB container", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionPodSecurityPolicy"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBSecurityContext"), }, }, - "updateConstraints": { + "archiver": { SchemaProps: spec.SchemaProps{ - Description: "update constraints", + Description: "Archiver defines the walg & kube-stash-addon related specifications", Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec"), }, }, }, - Required: []string{"version", "db", "initContainer"}, + Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies", "replicationModeDetector"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MsSQLVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ReplicationModeDetector", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/register.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/register.go index b6ed39d9a..9e3bb43a9 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/register.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/register.go @@ -92,8 +92,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &SolrVersionList{}, &ZooKeeperVersion{}, &ZooKeeperVersionList{}, - &MsSQLVersion{}, - &MsSQLVersionList{}, + &MSSQLVersion{}, + &MSSQLVersionList{}, ) scheme.AddKnownTypes(SchemeGroupVersion, diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go index 719cd300b..c3ae42b6e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go @@ -858,6 +858,179 @@ func (in *KafkaVersionSpec) DeepCopy() *KafkaVersionSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLCoordinator) DeepCopyInto(out *MSSQLCoordinator) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLCoordinator. +func (in *MSSQLCoordinator) DeepCopy() *MSSQLCoordinator { + if in == nil { + return nil + } + out := new(MSSQLCoordinator) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLInitContainer) DeepCopyInto(out *MSSQLInitContainer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLInitContainer. +func (in *MSSQLInitContainer) DeepCopy() *MSSQLInitContainer { + if in == nil { + return nil + } + out := new(MSSQLInitContainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLSecurityContext) DeepCopyInto(out *MSSQLSecurityContext) { + *out = *in + if in.RunAsUser != nil { + in, out := &in.RunAsUser, &out.RunAsUser + *out = new(int64) + **out = **in + } + if in.RunAsGroup != nil { + in, out := &in.RunAsGroup, &out.RunAsGroup + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLSecurityContext. +func (in *MSSQLSecurityContext) DeepCopy() *MSSQLSecurityContext { + if in == nil { + return nil + } + out := new(MSSQLSecurityContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLVersion) DeepCopyInto(out *MSSQLVersion) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLVersion. +func (in *MSSQLVersion) DeepCopy() *MSSQLVersion { + if in == nil { + return nil + } + out := new(MSSQLVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MSSQLVersion) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLVersionDatabase) DeepCopyInto(out *MSSQLVersionDatabase) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLVersionDatabase. +func (in *MSSQLVersionDatabase) DeepCopy() *MSSQLVersionDatabase { + if in == nil { + return nil + } + out := new(MSSQLVersionDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLVersionList) DeepCopyInto(out *MSSQLVersionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MSSQLVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLVersionList. +func (in *MSSQLVersionList) DeepCopy() *MSSQLVersionList { + if in == nil { + return nil + } + out := new(MSSQLVersionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MSSQLVersionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLVersionPodSecurityPolicy) DeepCopyInto(out *MSSQLVersionPodSecurityPolicy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLVersionPodSecurityPolicy. +func (in *MSSQLVersionPodSecurityPolicy) DeepCopy() *MSSQLVersionPodSecurityPolicy { + if in == nil { + return nil + } + out := new(MSSQLVersionPodSecurityPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLVersionSpec) DeepCopyInto(out *MSSQLVersionSpec) { + *out = *in + out.DB = in.DB + out.Coordinator = in.Coordinator + out.InitContainer = in.InitContainer + in.Stash.DeepCopyInto(&out.Stash) + in.SecurityContext.DeepCopyInto(&out.SecurityContext) + out.PodSecurityPolicies = in.PodSecurityPolicies + in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLVersionSpec. +func (in *MSSQLVersionSpec) DeepCopy() *MSSQLVersionSpec { + if in == nil { + return nil + } + out := new(MSSQLVersionSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManifestBackup) DeepCopyInto(out *ManifestBackup) { *out = *in @@ -1360,179 +1533,6 @@ func (in *MongoDBVersionSpec) DeepCopy() *MongoDBVersionSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLCoordinator) DeepCopyInto(out *MsSQLCoordinator) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLCoordinator. -func (in *MsSQLCoordinator) DeepCopy() *MsSQLCoordinator { - if in == nil { - return nil - } - out := new(MsSQLCoordinator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLInitContainer) DeepCopyInto(out *MsSQLInitContainer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLInitContainer. -func (in *MsSQLInitContainer) DeepCopy() *MsSQLInitContainer { - if in == nil { - return nil - } - out := new(MsSQLInitContainer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLSecurityContext) DeepCopyInto(out *MsSQLSecurityContext) { - *out = *in - if in.RunAsUser != nil { - in, out := &in.RunAsUser, &out.RunAsUser - *out = new(int64) - **out = **in - } - if in.RunAsGroup != nil { - in, out := &in.RunAsGroup, &out.RunAsGroup - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLSecurityContext. -func (in *MsSQLSecurityContext) DeepCopy() *MsSQLSecurityContext { - if in == nil { - return nil - } - out := new(MsSQLSecurityContext) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLVersion) DeepCopyInto(out *MsSQLVersion) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLVersion. -func (in *MsSQLVersion) DeepCopy() *MsSQLVersion { - if in == nil { - return nil - } - out := new(MsSQLVersion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MsSQLVersion) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLVersionDatabase) DeepCopyInto(out *MsSQLVersionDatabase) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLVersionDatabase. -func (in *MsSQLVersionDatabase) DeepCopy() *MsSQLVersionDatabase { - if in == nil { - return nil - } - out := new(MsSQLVersionDatabase) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLVersionList) DeepCopyInto(out *MsSQLVersionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MsSQLVersion, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLVersionList. -func (in *MsSQLVersionList) DeepCopy() *MsSQLVersionList { - if in == nil { - return nil - } - out := new(MsSQLVersionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MsSQLVersionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLVersionPodSecurityPolicy) DeepCopyInto(out *MsSQLVersionPodSecurityPolicy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLVersionPodSecurityPolicy. -func (in *MsSQLVersionPodSecurityPolicy) DeepCopy() *MsSQLVersionPodSecurityPolicy { - if in == nil { - return nil - } - out := new(MsSQLVersionPodSecurityPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLVersionSpec) DeepCopyInto(out *MsSQLVersionSpec) { - *out = *in - out.DB = in.DB - out.Coordinator = in.Coordinator - out.InitContainer = in.InitContainer - in.Stash.DeepCopyInto(&out.Stash) - in.SecurityContext.DeepCopyInto(&out.SecurityContext) - out.PodSecurityPolicies = in.PodSecurityPolicies - in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLVersionSpec. -func (in *MsSQLVersionSpec) DeepCopy() *MsSQLVersionSpec { - if in == nil { - return nil - } - out := new(MsSQLVersionSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MySQLUpdateConstraints) DeepCopyInto(out *MySQLUpdateConstraints) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go index 315e43f5a..1cbb74b45 100644 --- a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go @@ -440,6 +440,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), @@ -21239,6 +21240,49 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/openapi_generated.go index 7e976540a..3e4069565 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/openapi_generated.go @@ -440,6 +440,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), @@ -21245,6 +21246,49 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/constants.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/constants.go index a4951df82..a382a6fb0 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/constants.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/constants.go @@ -352,32 +352,44 @@ const ( SinglestoreVolumeNameData = "data" SinglestoreVolumeMountPathData = "/var/lib/memsql" - // =========================== MsSQL Constants ============================ - MsSQLDatabasePodPrimary = "primary" - MsSQLDatabasePodSecondary = "secondary" - MsSQLSecondaryServiceAlias = "secondary" - MsSQLDatabasePortName = "db" - MsSQLPrimaryServicePortName = "primary" - MsSQLSecondaryServicePortName = "secondary" - MsSQLDatabasePort = 1433 - MsSQLDatabaseMirroringEndpointPort = 5022 - MsSQLCoordinatorPort = 2381 - MsSQLSAUser = "sa" + // =========================== MSSQL Constants ============================ + MSSQLSAUser = "sa" + MSSQLEndpointCertsSecretName = "endpoint-cert" + MSSQLDbmLoginSecretName = "dbm-login-secret" + MSSQLMasterKeySecretName = "master-key-secret" + + MSSQLDatabasePodPrimary = "primary" + MSSQLDatabasePodSecondary = "secondary" + MSSQLSecondaryServiceAlias = "secondary" + MSSQLSecondaryServicePortName = "secondary" + // port related + MSSQLDatabasePortName = "db" + MSSQLPrimaryServicePortName = "primary" + MSSQLDatabasePort = 1433 + MSSQLDatabaseMirroringEndpointPort = 5022 + MSSQLCoordinatorPort = 2381 // environment variables EnvAcceptEula = "ACCEPT_EULA" - EnvMsSQLEnableHADR = "MSSQL_ENABLE_HADR" - EnvMsSQLAgentEnabled = "MSSQL_AGENT_ENABLED" - EnvMsSQLSAUsername = "MSSQL_SA_USERNAME" - EnvMsSQLSAPassword = "MSSQL_SA_PASSWORD" + EnvMSSQLEnableHADR = "MSSQL_ENABLE_HADR" + EnvMSSQLAgentEnabled = "MSSQL_AGENT_ENABLED" + EnvMSSQLSAUsername = "MSSQL_SA_USERNAME" + EnvMSSQLSAPassword = "MSSQL_SA_PASSWORD" // container related - MsSQLContainerName = "mssql" - MsSQLCoordinatorContainerName = "mssql-coordinator" - MsSQLInitContainerName = "mssql-init" - MsSQLVolumeNameInitScript = "init-scripts" - MsSQLVolumeMountPathInitScript = "/scripts" + MSSQLContainerName = "mssql" + MSSQLCoordinatorContainerName = "mssql-coordinator" + MSSQLInitContainerName = "mssql-init" // volume related - MsSQLVolumeNameData = "data" - MsSQLVolumeMountPathData = "/var/opt/mssql" + MSSQLVolumeNameData = "data" + MSSQLVolumeMountPathData = "/var/opt/mssql" + MSSQLVolumeNameInitScript = "init-scripts" + MSSQLVolumeMountPathInitScript = "/scripts" + MSSQLVolumeNameEndpointCert = "endpoint-cert" + MSSQLVolumeMountPathEndpointCert = "/var/opt/mssql/endpoint-cert" + MSSQLVolumeNameCerts = "certs" + MSSQLVolumeMountPathCerts = "/var/opt/mssql/certs" + // tls related + MSSQLInternalTLSCrt = "tls.crt" + MSSQLInternalTLSKey = "tls.key" // =========================== PostgreSQL Constants ============================ PostgresDatabasePortName = "db" @@ -794,6 +806,7 @@ const ( ResourcePluralSolr = "solrs" SolrPortName = "http" SolrRestPort = 8983 + SolrExporterPort = 9854 SolrSecretKey = "solr.xml" SolrContainerName = "solr" SolrInitContainerName = "init-solr" @@ -988,6 +1001,7 @@ const ( DruidEmitterPrometheusPortKey = "druid.emitter.prometheus.port" DruidEmitterPrometheusPortVal = 8080 DruidMonitoringMonitorsKey = "druid.monitoring.monitors" + DruidEmitterPrometheusDimensionMapPath = "druid.emitter.prometheus.dimensionMapPath" DruidEmitterPrometheusStrategy = "druid.emitter.prometheus.strategy" DruidMetricsJVMMonitor = "org.apache.druid.java.util.metrics.JvmMonitor" DruidMetricsServiceStatusMonitor = "org.apache.druid.server.metrics.ServiceStatusMonitor" @@ -1095,43 +1109,48 @@ const ( RabbitMQPluginsVolName = "rabbitmq-plugins" RabbitMQTempConfigVolName = "temp-config" - RabbitMQContainerName = "rabbitmq" - RabbitMQInitContainerName = "rabbitmq-init" - RabbitMQManagementPlugin = "rabbitmq_management" - RabbitMQPeerdiscoveryPlugin = "rabbitmq_peer_discovery_k8s" - RabbitMQLoopBackUserKey = "loopback_users" - RabbitMQLoopBackUserVal = "none" - RabbitMQDefaultTCPListenerKey = "listeners.tcp.default" - RabbitMQDefaultTCPListenerVal = "5672" - RabbitMQQueueMasterLocatorKey = "queue_master_locator" - RabbitMQQueueMasterLocatorVal = "min-masters" - RabbitMQDiskFreeLimitKey = "disk_free_limit.absolute" - RabbitMQDiskFreeLimitVal = "2GB" - RabbitMQPartitionHandingKey = "cluster_partition_handling" - RabbitMQPartitionHandingVal = "pause_minority" - RabbitMQPeerDiscoveryKey = "cluster_formation.peer_discovery_backend" - RabbitMQPeerDiscoveryVal = "rabbit_peer_discovery_k8s" - RabbitMQK8sHostKey = "cluster_formation.k8s.host" - RabbitMQK8sHostVal = "kubernetes.default.svc.cluster.local" - RabbitMQK8sAddressTypeKey = "cluster_formation.k8s.address_type" - RabbitMQK8sAddressTypeVal = "hostname" - RabbitMQNodeCleanupWarningKey = "cluster_formation.node_cleanup.only_log_warning" - RabbitMQNodeCleanupWarningVal = "true" - RabbitMQLogFileLevelKey = "log.file.level" - RabbitMQLogFileLevelVal = "info" - RabbitMQLogConsoleKey = "log.console" - RabbitMQLogConsoleVal = "true" - RabbitMQLogConsoleLevelKey = "log.console.level" - RabbitMQLogConsoleLevelVal = "info" - RabbitMQDefaultUserKey = "default_user" - RabbitMQDefaultUserVal = "$(RABBITMQ_DEFAULT_USER)" - RabbitMQDefaultPasswordKey = "default_pass" - RabbitMQDefaultPasswordVal = "$(RABBITMQ_DEFAULT_PASS)" - RabbitMQClusterNameKey = "cluster_name" - RabbitMQK8sSvcNameKey = "cluster_formation.k8s.service_name" - RabbitMQConfigFileName = "rabbitmq.conf" - RabbitMQEnabledPluginsFileName = "enabled_plugins" - RabbitMQHealthCheckerQueueName = "kubedb-system" + RabbitMQContainerName = "rabbitmq" + RabbitMQInitContainerName = "rabbitmq-init" + RabbitMQManagementPlugin = "rabbitmq_management" + RabbitMQPeerdiscoveryPlugin = "rabbitmq_peer_discovery_k8s" + RabbitMQFederationPlugin = "rabbitmq_federation" + RabbitMQFederationManagementPlugin = "rabbitmq_federation_management" + RabbitMQShovelPlugin = "rabbitmq_shovel" + RabbitMQShovelManagementPlugin = "rabbitmq_shovel_management" + RabbitMQWebDispatchPlugin = "rabbitmq_web_dispatch" + RabbitMQLoopBackUserKey = "loopback_users" + RabbitMQLoopBackUserVal = "none" + RabbitMQDefaultTCPListenerKey = "listeners.tcp.default" + RabbitMQDefaultTCPListenerVal = "5672" + RabbitMQQueueMasterLocatorKey = "queue_master_locator" + RabbitMQQueueMasterLocatorVal = "min-masters" + RabbitMQDiskFreeLimitKey = "disk_free_limit.absolute" + RabbitMQDiskFreeLimitVal = "2GB" + RabbitMQPartitionHandingKey = "cluster_partition_handling" + RabbitMQPartitionHandingVal = "pause_minority" + RabbitMQPeerDiscoveryKey = "cluster_formation.peer_discovery_backend" + RabbitMQPeerDiscoveryVal = "rabbit_peer_discovery_k8s" + RabbitMQK8sHostKey = "cluster_formation.k8s.host" + RabbitMQK8sHostVal = "kubernetes.default.svc.cluster.local" + RabbitMQK8sAddressTypeKey = "cluster_formation.k8s.address_type" + RabbitMQK8sAddressTypeVal = "hostname" + RabbitMQNodeCleanupWarningKey = "cluster_formation.node_cleanup.only_log_warning" + RabbitMQNodeCleanupWarningVal = "true" + RabbitMQLogFileLevelKey = "log.file.level" + RabbitMQLogFileLevelVal = "info" + RabbitMQLogConsoleKey = "log.console" + RabbitMQLogConsoleVal = "true" + RabbitMQLogConsoleLevelKey = "log.console.level" + RabbitMQLogConsoleLevelVal = "info" + RabbitMQDefaultUserKey = "default_user" + RabbitMQDefaultUserVal = "$(RABBITMQ_DEFAULT_USER)" + RabbitMQDefaultPasswordKey = "default_pass" + RabbitMQDefaultPasswordVal = "$(RABBITMQ_DEFAULT_PASS)" + RabbitMQClusterNameKey = "cluster_name" + RabbitMQK8sSvcNameKey = "cluster_formation.k8s.service_name" + RabbitMQConfigFileName = "rabbitmq.conf" + RabbitMQEnabledPluginsFileName = "enabled_plugins" + RabbitMQHealthCheckerQueueName = "kubedb-system" ) // =========================== FerretDB Constants ============================ @@ -1251,6 +1270,17 @@ var ( core.ResourceMemory: resource.MustParse("2Gi"), }, } + + // DefaultResourcesMemoryIntensive must be used for Druid MiddleManagers + DefaultResourcesMemoryIntensiveDruid = core.ResourceRequirements{ + Requests: core.ResourceList{ + core.ResourceCPU: resource.MustParse(".500"), + core.ResourceMemory: resource.MustParse("2.5Gi"), + }, + Limits: core.ResourceList{ + core.ResourceMemory: resource.MustParse("2.5Gi"), + }, + } ) func DefaultArbiter(computeOnly bool) core.ResourceRequirements { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go index e3515ab21..c598a53e5 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go @@ -380,7 +380,7 @@ func (d *Druid) SetDefaults() { d.Spec.Topology.Coordinators.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{FSGroup: druidVersion.Spec.SecurityContext.RunAsUser} } d.setDefaultContainerSecurityContext(&druidVersion, &d.Spec.Topology.Coordinators.PodTemplate) - d.setDefaultContainerResourceLimits(&d.Spec.Topology.Coordinators.PodTemplate) + d.setDefaultContainerResourceLimits(&d.Spec.Topology.Coordinators.PodTemplate, DruidNodeRoleCoordinators) } } if d.Spec.Topology.Overlords != nil { @@ -392,7 +392,7 @@ func (d *Druid) SetDefaults() { d.Spec.Topology.Overlords.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{FSGroup: druidVersion.Spec.SecurityContext.RunAsUser} } d.setDefaultContainerSecurityContext(&druidVersion, &d.Spec.Topology.Overlords.PodTemplate) - d.setDefaultContainerResourceLimits(&d.Spec.Topology.Overlords.PodTemplate) + d.setDefaultContainerResourceLimits(&d.Spec.Topology.Overlords.PodTemplate, DruidNodeRoleOverlords) } } if d.Spec.Topology.MiddleManagers != nil { @@ -404,7 +404,7 @@ func (d *Druid) SetDefaults() { d.Spec.Topology.MiddleManagers.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{FSGroup: druidVersion.Spec.SecurityContext.RunAsUser} } d.setDefaultContainerSecurityContext(&druidVersion, &d.Spec.Topology.MiddleManagers.PodTemplate) - d.setDefaultContainerResourceLimits(&d.Spec.Topology.MiddleManagers.PodTemplate) + d.setDefaultContainerResourceLimits(&d.Spec.Topology.MiddleManagers.PodTemplate, DruidNodeRoleMiddleManagers) } } if d.Spec.Topology.Historicals != nil { @@ -416,7 +416,7 @@ func (d *Druid) SetDefaults() { d.Spec.Topology.Historicals.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{FSGroup: druidVersion.Spec.SecurityContext.RunAsUser} } d.setDefaultContainerSecurityContext(&druidVersion, &d.Spec.Topology.Historicals.PodTemplate) - d.setDefaultContainerResourceLimits(&d.Spec.Topology.Historicals.PodTemplate) + d.setDefaultContainerResourceLimits(&d.Spec.Topology.Historicals.PodTemplate, DruidNodeRoleHistoricals) } } if d.Spec.Topology.Brokers != nil { @@ -428,7 +428,7 @@ func (d *Druid) SetDefaults() { d.Spec.Topology.Brokers.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{FSGroup: druidVersion.Spec.SecurityContext.RunAsUser} } d.setDefaultContainerSecurityContext(&druidVersion, &d.Spec.Topology.Brokers.PodTemplate) - d.setDefaultContainerResourceLimits(&d.Spec.Topology.Brokers.PodTemplate) + d.setDefaultContainerResourceLimits(&d.Spec.Topology.Brokers.PodTemplate, DruidNodeRoleBrokers) } } @@ -441,7 +441,7 @@ func (d *Druid) SetDefaults() { d.Spec.Topology.Routers.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{FSGroup: druidVersion.Spec.SecurityContext.RunAsUser} } d.setDefaultContainerSecurityContext(&druidVersion, &d.Spec.Topology.Routers.PodTemplate) - d.setDefaultContainerResourceLimits(&d.Spec.Topology.Routers.PodTemplate) + d.setDefaultContainerResourceLimits(&d.Spec.Topology.Routers.PodTemplate, DruidNodeRoleRouters) } } } @@ -498,10 +498,14 @@ func (d *Druid) assignDefaultContainerSecurityContext(druidVersion *catalog.Drui } } -func (d *Druid) setDefaultContainerResourceLimits(podTemplate *ofst.PodTemplateSpec) { +func (d *Druid) setDefaultContainerResourceLimits(podTemplate *ofst.PodTemplateSpec, nodeRole DruidNodeRoleType) { dbContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, DruidContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { - apis.SetDefaultResourceLimits(&dbContainer.Resources, DefaultResources) + if nodeRole == DruidNodeRoleMiddleManagers { + apis.SetDefaultResourceLimits(&dbContainer.Resources, DefaultResourcesMemoryIntensiveDruid) + } else { + apis.SetDefaultResourceLimits(&dbContainer.Resources, DefaultResources) + } } initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, DruidInitContainerName) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_helpers.go index 945246a6d..2e48b10f6 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_helpers.go @@ -1,19 +1,38 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package v1alpha2 import ( "context" "fmt" "strings" + "time" "kubedb.dev/apimachinery/apis" catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" "kubedb.dev/apimachinery/apis/kubedb" + "kubedb.dev/apimachinery/crds" "gomodules.xyz/pointer" core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" + "kmodules.xyz/client-go/apiextensions" coreutil "kmodules.xyz/client-go/core/v1" metautil "kmodules.xyz/client-go/meta" "kmodules.xyz/client-go/policy/secomp" @@ -21,70 +40,74 @@ import ( ofst "kmodules.xyz/offshoot-api/api/v2" ) -type MsSQLApp struct { - *MsSQL +type MSSQLApp struct { + *MSSQL +} + +func (m *MSSQL) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { + return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralMSSQL)) } -func (m MsSQLApp) Name() string { - return m.MsSQL.Name +func (m MSSQLApp) Name() string { + return m.MSSQL.Name } -func (m MsSQLApp) Type() appcat.AppType { - return appcat.AppType(fmt.Sprintf("%s/%s", kubedb.GroupName, ResourceSingularMsSQL)) +func (m MSSQLApp) Type() appcat.AppType { + return appcat.AppType(fmt.Sprintf("%s/%s", kubedb.GroupName, ResourceSingularMSSQL)) } -func (m *MsSQL) ResourceKind() string { - return ResourceKindMsSQL +func (m *MSSQL) ResourceKind() string { + return ResourceKindMSSQL } -func (m *MsSQL) ResourcePlural() string { - return ResourcePluralMsSQL +func (m *MSSQL) ResourcePlural() string { + return ResourcePluralMSSQL } -func (m *MsSQL) ResourceFQN() string { +func (m *MSSQL) ResourceFQN() string { return fmt.Sprintf("%s.%s", m.ResourcePlural(), kubedb.GroupName) } // Owner returns owner reference to resources -func (m *MsSQL) Owner() *meta.OwnerReference { +func (m *MSSQL) Owner() *meta.OwnerReference { return meta.NewControllerRef(m, SchemeGroupVersion.WithKind(m.ResourceKind())) } -func (m *MsSQL) OffshootName() string { +func (m *MSSQL) OffshootName() string { return m.Name } -func (m *MsSQL) ServiceName() string { +func (m *MSSQL) ServiceName() string { return m.OffshootName() } -func (m *MsSQL) SecondaryServiceName() string { +func (m *MSSQL) SecondaryServiceName() string { return metautil.NameWithPrefix(m.ServiceName(), "secondary") } -func (m *MsSQL) GoverningServiceName() string { +func (m *MSSQL) GoverningServiceName() string { return metautil.NameWithSuffix(m.ServiceName(), "pods") } -func (m *MsSQL) DefaultUserCredSecretName(username string) string { +func (m *MSSQL) DefaultUserCredSecretName(username string) string { return metautil.NameWithSuffix(m.Name, strings.ReplaceAll(fmt.Sprintf("%s-cred", username), "_", "-")) } -func (m *MsSQL) offshootLabels(selector, override map[string]string) map[string]string { +func (m *MSSQL) offshootLabels(selector, override map[string]string) map[string]string { selector[metautil.ComponentLabelKey] = ComponentDatabase return metautil.FilterKeys(kubedb.GroupName, selector, metautil.OverwriteKeys(nil, m.Labels, override)) } -func (m *MsSQL) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string { +func (m *MSSQL) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string { svcTemplate := GetServiceTemplate(m.Spec.ServiceTemplates, alias) return m.offshootLabels(metautil.OverwriteKeys(m.OffshootSelectors(), extraLabels...), svcTemplate.Labels) } -func (m *MsSQL) OffshootLabels() map[string]string { +func (m *MSSQL) OffshootLabels() map[string]string { return m.offshootLabels(m.OffshootSelectors(), nil) } -func (m *MsSQL) OffshootSelectors(extraSelectors ...map[string]string) map[string]string { +func (m *MSSQL) OffshootSelectors(extraSelectors ...map[string]string) map[string]string { selector := map[string]string{ metautil.NameLabelKey: m.ResourceFQN(), metautil.InstanceLabelKey: m.Name, @@ -93,65 +116,72 @@ func (m *MsSQL) OffshootSelectors(extraSelectors ...map[string]string) map[strin return metautil.OverwriteKeys(selector, extraSelectors...) } -func (m *MsSQL) IsClustering() bool { - return m.Spec.Topology != nil && m.Spec.Topology.Mode != nil && *m.Spec.Topology.Mode == MsSQLModeAvailabilityGroup +func (m *MSSQL) IsAvailabilityGroup() bool { + return m.Spec.Topology != nil && + m.Spec.Topology.Mode != nil && + *m.Spec.Topology.Mode == MSSQLModeAvailabilityGroup } -func (m *MsSQL) IsStandalone() bool { - return m.Spec.Topology == nil || (m.Spec.Topology.Mode != nil && *m.Spec.Topology.Mode == MsSQLModeStandalone) +func (m *MSSQL) IsStandalone() bool { + return m.Spec.Topology == nil } -func (m *MsSQL) PVCName(alias string) string { +func (m *MSSQL) PVCName(alias string) string { return metautil.NameWithSuffix(m.Name, alias) } -func (m *MsSQL) PodLabels(extraLabels ...map[string]string) map[string]string { +func (m *MSSQL) PodLabels(extraLabels ...map[string]string) map[string]string { return m.offshootLabels(metautil.OverwriteKeys(m.OffshootSelectors(), extraLabels...), m.Spec.PodTemplate.Labels) } -func (m *MsSQL) PodLabel(podTemplate *ofst.PodTemplateSpec) map[string]string { +func (m *MSSQL) PodLabel(podTemplate *ofst.PodTemplateSpec) map[string]string { if podTemplate != nil && podTemplate.Labels != nil { return m.offshootLabels(m.OffshootSelectors(), m.Spec.PodTemplate.Labels) } return m.offshootLabels(m.OffshootSelectors(), nil) } -func (m *MsSQL) ConfigSecretName() string { +func (m *MSSQL) ConfigSecretName() string { return metautil.NameWithSuffix(m.OffshootName(), "config") } -func (m *MsSQL) StatefulSetName() string { +func (m *MSSQL) PetSetName() string { return m.OffshootName() } -func (m *MsSQL) ServiceAccountName() string { +func (m *MSSQL) ServiceAccountName() string { return m.OffshootName() } -func (m *MsSQL) PodControllerLabels(extraLabels ...map[string]string) map[string]string { +func (m *MSSQL) PodControllerLabels(extraLabels ...map[string]string) map[string]string { return m.offshootLabels(metautil.OverwriteKeys(m.OffshootSelectors(), extraLabels...), m.Spec.PodTemplate.Controller.Labels) } -func (m *MsSQL) PodControllerLabel(podTemplate *ofst.PodTemplateSpec) map[string]string { +func (m *MSSQL) PodControllerLabel(podTemplate *ofst.PodTemplateSpec) map[string]string { if podTemplate != nil && podTemplate.Controller.Labels != nil { return m.offshootLabels(m.OffshootSelectors(), podTemplate.Controller.Labels) } return m.offshootLabels(m.OffshootSelectors(), nil) } -func (m *MsSQL) GetPersistentSecrets() []string { +func (m *MSSQL) GetPersistentSecrets() []string { var secrets []string if m.Spec.AuthSecret != nil { secrets = append(secrets, m.Spec.AuthSecret.Name) } + + secrets = append(secrets, MSSQLEndpointCertsSecretName) + secrets = append(secrets, MSSQLDbmLoginSecretName) + secrets = append(secrets, MSSQLMasterKeySecretName) + return secrets } -func (m *MsSQL) AppBindingMeta() appcat.AppBindingMeta { - return &MsSQLApp{m} +func (m *MSSQL) AppBindingMeta() appcat.AppBindingMeta { + return &MSSQLApp{m} } -func (m MsSQL) SetHealthCheckerDefaults() { +func (m MSSQL) SetHealthCheckerDefaults() { if m.Spec.HealthChecker.PeriodSeconds == nil { m.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(10) } @@ -163,22 +193,22 @@ func (m MsSQL) SetHealthCheckerDefaults() { } } -func (m MsSQL) GetAuthSecretName() string { +func (m MSSQL) GetAuthSecretName() string { if m.Spec.AuthSecret != nil && m.Spec.AuthSecret.Name != "" { return m.Spec.AuthSecret.Name } - return m.DefaultUserCredSecretName(MsSQLSAUser) + return metautil.NameWithSuffix(m.OffshootName(), "auth") } -func (m *MsSQL) GetNameSpacedName() string { +func (m *MSSQL) GetNameSpacedName() string { return m.Namespace + "/" + m.Name } -func (m *MsSQL) PrimaryServiceDNS() string { +func (m *MSSQL) PrimaryServiceDNS() string { return fmt.Sprintf("%s.%s.svc", m.ServiceName(), m.Namespace) } -func (m *MsSQL) SetDefaults() { +func (m *MSSQL) SetDefaults() { if m == nil { return } @@ -189,20 +219,40 @@ func (m *MsSQL) SetDefaults() { m.Spec.TerminationPolicy = TerminationPolicyDelete } - if m.Spec.Topology == nil { + if m.IsStandalone() { if m.Spec.Replicas == nil { m.Spec.Replicas = pointer.Int32P(1) } - if m.Spec.PodTemplate == nil { - m.Spec.PodTemplate = &ofst.PodTemplateSpec{} - } } else { - if m.Spec.Replicas == nil { - m.Spec.Replicas = pointer.Int32P(3) + if m.Spec.LeaderElection == nil { + m.Spec.LeaderElection = &MSSQLLeaderElectionConfig{ + // The upper limit of election timeout is 50000ms (50s), which should only be used when deploying a + // globally-distributed etcd cluster. A reasonable round-trip time for the continental United States is around 130-150ms, + // and the time between US and Japan is around 350-400ms. If the network has uneven performance or regular packet + // delays/loss then it is possible that a couple of retries may be necessary to successfully send a packet. + // So 5s is a safe upper limit of global round-trip time. As the election timeout should be an order of magnitude + // bigger than broadcast time, in the case of ~5s for a globally distributed cluster, then 50 seconds becomes + // a reasonable maximum. + Period: meta.Duration{Duration: 300 * time.Millisecond}, + // the amount of HeartbeatTick can be missed before the failOver + ElectionTick: 10, + // this value should be one. + HeartbeatTick: 1, + } + } + if m.Spec.LeaderElection.TransferLeadershipInterval == nil { + m.Spec.LeaderElection.TransferLeadershipInterval = &meta.Duration{Duration: 1 * time.Second} + } + if m.Spec.LeaderElection.TransferLeadershipTimeout == nil { + m.Spec.LeaderElection.TransferLeadershipTimeout = &meta.Duration{Duration: 60 * time.Second} } } - var mssqlVersion catalog.MsSQLVersion + if m.Spec.PodTemplate == nil { + m.Spec.PodTemplate = &ofst.PodTemplateSpec{} + } + + var mssqlVersion catalog.MSSQLVersion err := DefaultClient.Get(context.TODO(), types.NamespacedName{ Name: m.Spec.Version, }, &mssqlVersion) @@ -213,15 +263,12 @@ func (m *MsSQL) SetDefaults() { m.setDefaultContainerSecurityContext(&mssqlVersion, m.Spec.PodTemplate) - // TODO: - // m.SetTLSDefaults() - m.SetHealthCheckerDefaults() m.setDefaultContainerResourceLimits(m.Spec.PodTemplate) } -func (m *MsSQL) setDefaultContainerSecurityContext(mssqlVersion *catalog.MsSQLVersion, podTemplate *ofst.PodTemplateSpec) { +func (m *MSSQL) setDefaultContainerSecurityContext(mssqlVersion *catalog.MSSQLVersion, podTemplate *ofst.PodTemplateSpec) { if podTemplate == nil { return } @@ -229,80 +276,64 @@ func (m *MsSQL) setDefaultContainerSecurityContext(mssqlVersion *catalog.MsSQLVe podTemplate.Spec.SecurityContext = &core.PodSecurityContext{} } if podTemplate.Spec.SecurityContext.FSGroup == nil { - podTemplate.Spec.SecurityContext.FSGroup = mssqlVersion.Spec.SecurityContext.RunAsUser + podTemplate.Spec.SecurityContext.FSGroup = mssqlVersion.Spec.SecurityContext.RunAsGroup } - container := coreutil.GetContainerByName(podTemplate.Spec.Containers, MsSQLContainerName) + container := coreutil.GetContainerByName(podTemplate.Spec.Containers, MSSQLContainerName) if container == nil { container = &core.Container{ - Name: MsSQLContainerName, + Name: MSSQLContainerName, } } if container.SecurityContext == nil { container.SecurityContext = &core.SecurityContext{} } - m.assignDefaultContainerSecurityContext(mssqlVersion, container.SecurityContext) + m.assignDefaultContainerSecurityContext(mssqlVersion, container.SecurityContext, true) podTemplate.Spec.Containers = coreutil.UpsertContainer(podTemplate.Spec.Containers, *container) - initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, MsSQLInitContainerName) + initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, MSSQLInitContainerName) if initContainer == nil { initContainer = &core.Container{ - Name: MsSQLInitContainerName, + Name: MSSQLInitContainerName, } } if initContainer.SecurityContext == nil { initContainer.SecurityContext = &core.SecurityContext{} } - m.assignDefaultInitContainerSecurityContext(mssqlVersion, initContainer.SecurityContext) + m.assignDefaultContainerSecurityContext(mssqlVersion, initContainer.SecurityContext, false) podTemplate.Spec.InitContainers = coreutil.UpsertContainer(podTemplate.Spec.InitContainers, *initContainer) - if m.IsClustering() { - coordinatorContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, MsSQLCoordinatorContainerName) + if m.IsAvailabilityGroup() { + coordinatorContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, MSSQLCoordinatorContainerName) if coordinatorContainer == nil { coordinatorContainer = &core.Container{ - Name: MsSQLCoordinatorContainerName, + Name: MSSQLCoordinatorContainerName, } } if coordinatorContainer.SecurityContext == nil { coordinatorContainer.SecurityContext = &core.SecurityContext{} } - m.assignDefaultContainerSecurityContext(mssqlVersion, coordinatorContainer.SecurityContext) + m.assignDefaultContainerSecurityContext(mssqlVersion, coordinatorContainer.SecurityContext, false) podTemplate.Spec.Containers = coreutil.UpsertContainer(podTemplate.Spec.Containers, *coordinatorContainer) } } -func (m *MsSQL) assignDefaultInitContainerSecurityContext(mssqlVersion *catalog.MsSQLVersion, sc *core.SecurityContext) { - if sc.AllowPrivilegeEscalation == nil { - sc.AllowPrivilegeEscalation = pointer.BoolP(false) - } - if sc.Capabilities == nil { - sc.Capabilities = &core.Capabilities{ - Drop: []core.Capability{"ALL"}, - } - } - if sc.RunAsNonRoot == nil { - sc.RunAsNonRoot = pointer.BoolP(true) - } - if sc.RunAsUser == nil { - sc.RunAsUser = mssqlVersion.Spec.SecurityContext.RunAsUser - } - if sc.RunAsGroup == nil { - sc.RunAsGroup = mssqlVersion.Spec.SecurityContext.RunAsGroup - } - if sc.SeccompProfile == nil { - sc.SeccompProfile = secomp.DefaultSeccompProfile() - } -} - -func (m *MsSQL) assignDefaultContainerSecurityContext(mssqlVersion *catalog.MsSQLVersion, sc *core.SecurityContext) { +func (m *MSSQL) assignDefaultContainerSecurityContext(mssqlVersion *catalog.MSSQLVersion, sc *core.SecurityContext, isMainContainer bool) { if sc.AllowPrivilegeEscalation == nil { sc.AllowPrivilegeEscalation = pointer.BoolP(false) } if sc.Capabilities == nil { - sc.Capabilities = &core.Capabilities{ - Drop: []core.Capability{"ALL"}, + if isMainContainer { + sc.Capabilities = &core.Capabilities{ + Drop: []core.Capability{"ALL"}, + Add: []core.Capability{"NET_BIND_SERVICE"}, + } + } else { + sc.Capabilities = &core.Capabilities{ + Drop: []core.Capability{"ALL"}, + } } } if sc.RunAsNonRoot == nil { @@ -319,19 +350,19 @@ func (m *MsSQL) assignDefaultContainerSecurityContext(mssqlVersion *catalog.MsSQ } } -func (m *MsSQL) setDefaultContainerResourceLimits(podTemplate *ofst.PodTemplateSpec) { - dbContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, MsSQLContainerName) +func (m *MSSQL) setDefaultContainerResourceLimits(podTemplate *ofst.PodTemplateSpec) { + dbContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, MSSQLContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { apis.SetDefaultResourceLimits(&dbContainer.Resources, DefaultResourcesMemoryIntensive) } - initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, MsSQLInitContainerName) + initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, MSSQLInitContainerName) if initContainer != nil && (initContainer.Resources.Requests == nil && initContainer.Resources.Limits == nil) { apis.SetDefaultResourceLimits(&initContainer.Resources, DefaultInitContainerResource) } - if m.IsClustering() { - coordinatorContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, MsSQLCoordinatorContainerName) + if m.IsAvailabilityGroup() { + coordinatorContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, MSSQLCoordinatorContainerName) if coordinatorContainer != nil && (coordinatorContainer.Resources.Requests == nil && coordinatorContainer.Resources.Limits == nil) { apis.SetDefaultResourceLimits(&coordinatorContainer.Resources, CoordinatorDefaultResources) } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_types.go index bcda16e52..edc73f513 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_types.go @@ -24,25 +24,24 @@ import ( ) const ( - ResourceCodeMsSQL = "ms" - ResourceKindMsSQL = "MsSQL" - ResourceSingularMsSQL = "mssql" - ResourcePluralMsSQL = "mssqls" + ResourceCodeMSSQL = "ms" + ResourceKindMSSQL = "MSSQL" + ResourceSingularMSSQL = "mssql" + ResourcePluralMSSQL = "mssqls" ) -// +kubebuilder:validation:Enum=Standalone;AvailabilityGroup -type MsSQLMode string +// +kubebuilder:validation:Enum=AvailabilityGroup;RemoteReplica +type MSSQLMode string const ( - MsSQLModeStandalone MsSQLMode = "Standalone" - MsSQLModeAvailabilityGroup MsSQLMode = "AvailabilityGroup" - MsSQLModeRemoteReplica MsSQLMode = "RemoteReplica" + MSSQLModeAvailabilityGroup MSSQLMode = "AvailabilityGroup" + MSSQLModeRemoteReplica MSSQLMode = "RemoteReplica" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. -// MsSQL defines a MsSQL database. +// MSSQL defines a MSSQL database. // +genclient // +k8s:openapi-gen=true @@ -54,24 +53,24 @@ const ( // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -type MsSQL struct { +type MSSQL struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec MsSQLSpec `json:"spec,omitempty"` - Status MsSQLStatus `json:"status,omitempty"` + Spec MSSQLSpec `json:"spec,omitempty"` + Status MSSQLStatus `json:"status,omitempty"` } -// MsSQLSpec defines the desired state of MsSQL -type MsSQLSpec struct { - // Version of MsSQL to be deployed. +// MSSQLSpec defines the desired state of MSSQL +type MSSQLSpec struct { + // Version of MSSQL to be deployed. Version string `json:"version"` - // Number of instances to deploy for a MsSQL database. In case of MsSQL Availability Group (default 3). + // Number of instances to deploy for a MSSQL database. In case of MSSQL Availability Group (default 3). Replicas *int32 `json:"replicas,omitempty"` - // MsSQL cluster topology - Topology *MsSQLTopology `json:"topology,omitempty"` // ag or standalone + // MSSQL cluster topology + Topology *MSSQLTopology `json:"topology,omitempty"` // ag or standalone // StorageType can be durable (default) or ephemeral StorageType StorageType `json:"storageType,omitempty"` @@ -83,6 +82,11 @@ type MsSQLSpec struct { // +optional AuthSecret *SecretReference `json:"authSecret,omitempty"` + // InternalAuth is used to authenticate endpoint + // +optional + // +nullable + InternalAuth *InternalAuthentication `json:"internalAuth,omitempty"` + // Init is used to initialize database // +optional Init *InitSpec `json:"init,omitempty"` @@ -107,30 +111,45 @@ type MsSQLSpec struct { // +optional Coordinator CoordinatorSpec `json:"coordinator,omitempty"` + // Leader election configuration + // +optional + LeaderElection *MSSQLLeaderElectionConfig `json:"leaderElection,omitempty"` + // HealthChecker defines attributes of the health checker // +optional // +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1} HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"` + + // PodPlacementPolicy is the reference of the podPlacementPolicy + // +kubebuilder:default={name: "default"} + // +optional + PodPlacementPolicy *core.LocalObjectReference `json:"podPlacementPolicy,omitempty"` +} + +// InternalAuthentication provides different way of endpoint authentication +type InternalAuthentication struct { + // EndpointCert is used for endpoint authentication of MSSql Server + EndpointCert *kmapi.TLSConfig `json:"endpointCert"` } -type MsSQLTopology struct { +type MSSQLTopology struct { // If set to - - // "AvailabilityGroup", MsSQLAvailabilityGroupSpec is required and MsSQL servers will start an Availability Group - Mode *MsSQLMode `json:"mode,omitempty"` + // "AvailabilityGroup", MSSQLAvailabilityGroupSpec is required and MSSQL servers will start an Availability Group + Mode *MSSQLMode `json:"mode,omitempty"` - // AvailabilityGroup info for MsSQL + // AvailabilityGroup info for MSSQL // +optional - AvailabilityGroup *MsSQLAvailabilityGroupSpec `json:"availabilityGroup,omitempty"` + AvailabilityGroup *MSSQLAvailabilityGroupSpec `json:"availabilityGroup,omitempty"` } -// MsSQLAvailabilityGroupSpec defines the availability group spec for MsSQL -type MsSQLAvailabilityGroupSpec struct { +// MSSQLAvailabilityGroupSpec defines the availability group spec for MSSQL +type MSSQLAvailabilityGroupSpec struct { // AvailabilityDatabases is an array of databases to be included in the availability group AvailabilityDatabases []string `json:"databases"` } -// MsSQLStatus defines the observed state of MsSQL -type MsSQLStatus struct { +// MSSQLStatus defines the observed state of MSSQL +type MSSQLStatus struct { // Specifies the current phase of the database // +optional Phase DatabasePhase `json:"phase,omitempty"` @@ -143,11 +162,50 @@ type MsSQLStatus struct { Conditions []kmapi.Condition `json:"conditions,omitempty"` } +// MSSQLLeaderElectionConfig contains essential attributes of leader election. +type MSSQLLeaderElectionConfig struct { + // Period between Node.Tick invocations + // +kubebuilder:default="100ms" + // +optional + Period metav1.Duration `json:"period,omitempty"` + + // ElectionTick is the number of Node.Tick invocations that must pass between + // elections. That is, if a follower does not receive any message from the + // leader of current term before ElectionTick has elapsed, it will become + // candidate and start an election. ElectionTick must be greater than + // HeartbeatTick. We suggest ElectionTick = 10 * HeartbeatTick to avoid + // unnecessary leader switching. default value is 10. + // +default=10 + // +kubebuilder:default=10 + // +optional + ElectionTick int32 `json:"electionTick,omitempty"` + + // HeartbeatTick is the number of Node.Tick invocations that must pass between + // heartbeats. That is, a leader sends heartbeat messages to maintain its + // leadership every HeartbeatTick ticks. default value is 1. + // +default=1 + // +kubebuilder:default=1 + // +optional + HeartbeatTick int32 `json:"heartbeatTick,omitempty"` + + // TransferLeadershipInterval retry interval for transfer leadership + // to the healthiest node + // +kubebuilder:default="1s" + // +optional + TransferLeadershipInterval *metav1.Duration `json:"transferLeadershipInterval,omitempty"` + + // TransferLeadershipTimeout retry timeout for transfer leadership + // to the healthiest node + // +kubebuilder:default="60s" + // +optional + TransferLeadershipTimeout *metav1.Duration `json:"transferLeadershipTimeout,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// MsSQLList contains a list of MsSQL -type MsSQLList struct { +// MSSQLList contains a list of MSSQL +type MSSQLList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MsSQL `json:"items"` + Items []MSSQL `json:"items"` } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_webhook.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_webhook.go index da88161ce..acafe6c74 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssql_webhook.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/utils/ptr" ofst "kmodules.xyz/offshoot-api/api/v2" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -38,7 +39,7 @@ import ( var mssqllog = logf.Log.WithName("mssql-resource") // SetupWebhookWithManager will setup the manager to manage the webhooks -func (r *MsSQL) SetupWebhookWithManager(mgr ctrl.Manager) error { +func (r *MSSQL) SetupWebhookWithManager(mgr ctrl.Manager) error { return ctrl.NewWebhookManagedBy(mgr). For(r). Complete() @@ -46,10 +47,10 @@ func (r *MsSQL) SetupWebhookWithManager(mgr ctrl.Manager) error { //+kubebuilder:webhook:path=/mutate-kubedb-com-v1alpha2-mssql,mutating=true,failurePolicy=fail,sideEffects=None,groups=kubedb.com,resources=mssqls,verbs=create;update,versions=v1alpha2,name=mmssql.kb.io,admissionReviewVersions=v1 -var _ webhook.Defaulter = &MsSQL{} +var _ webhook.Defaulter = &MSSQL{} // Default implements webhook.Defaulter so a webhook will be registered for the type -func (m *MsSQL) Default() { +func (m *MSSQL) Default() { if m == nil { return } @@ -60,27 +61,27 @@ func (m *MsSQL) Default() { //+kubebuilder:webhook:path=/validate-kubedb-com-v1alpha2-mssql,mutating=false,failurePolicy=fail,sideEffects=None,groups=kubedb.com,resources=mssqls,verbs=create;update,versions=v1alpha2,name=vmssql.kb.io,admissionReviewVersions=v1 -var _ webhook.Validator = &MsSQL{} +var _ webhook.Validator = &MSSQL{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type -func (m *MsSQL) ValidateCreate() (admission.Warnings, error) { +func (m *MSSQL) ValidateCreate() (admission.Warnings, error) { mssqllog.Info("validate create", "name", m.Name) allErr := m.ValidateCreateOrUpdate() if len(allErr) == 0 { return nil, nil } - return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kubedb.com", Kind: "MsSQL"}, m.Name, allErr) + return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kubedb.com", Kind: "MSSQL"}, m.Name, allErr) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type -func (m *MsSQL) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { +func (m *MSSQL) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { mssqllog.Info("validate update", "name", m.Name) - oldMsSQL := old.(*MsSQL) + oldMSSQL := old.(*MSSQL) allErr := m.ValidateCreateOrUpdate() - if m.Spec.Topology == nil && *oldMsSQL.Spec.Replicas == 1 && *m.Spec.Replicas > 1 { + if m.Spec.Topology == nil && ptr.Deref(oldMSSQL.Spec.Replicas, 0) == 1 && ptr.Deref(m.Spec.Replicas, 0) > 1 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), m.Name, "Cannot scale up from 1 to more than 1 in standalone mode")) @@ -90,11 +91,11 @@ func (m *MsSQL) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { return nil, nil } - return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kubedb.com", Kind: "MsSQL"}, m.Name, allErr) + return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kubedb.com", Kind: "MSSQL"}, m.Name, allErr) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type -func (m *MsSQL) ValidateDelete() (admission.Warnings, error) { +func (m *MSSQL) ValidateDelete() (admission.Warnings, error) { mssqllog.Info("validate delete", "name", m.Name) var allErr field.ErrorList @@ -102,12 +103,12 @@ func (m *MsSQL) ValidateDelete() (admission.Warnings, error) { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("terminationPolicy"), m.Name, "Can not delete as terminationPolicy is set to \"DoNotTerminate\"")) - return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kubedb.com", Kind: "MsSQL"}, m.Name, allErr) + return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kubedb.com", Kind: "MSSQL"}, m.Name, allErr) } return nil, nil } -func (m *MsSQL) ValidateCreateOrUpdate() field.ErrorList { +func (m *MSSQL) ValidateCreateOrUpdate() field.ErrorList { var allErr field.ErrorList if m.Spec.Version == "" { @@ -123,34 +124,61 @@ func (m *MsSQL) ValidateCreateOrUpdate() field.ErrorList { } } - if m.Spec.Topology == nil { - if *m.Spec.Replicas != 1 { + if m.IsStandalone() { + if ptr.Deref(m.Spec.Replicas, 0) != 1 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), m.Name, "number of replicas for standalone must be one ")) } - - err := mssqlValidateVolumes(m.Spec.PodTemplate) - if err != nil { - allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumes"), + } else { + if m.Spec.Topology.Mode == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("topology").Child("mode"), m.Name, - err.Error())) + ".spec.topology.mode can't be empty in cluster mode")) } - err = mssqlValidateVolumesMountPaths(m.Spec.PodTemplate) - if err != nil { - allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("containers"), + if m.Spec.Replicas == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), m.Name, - err.Error())) + ".spec.replicas can not be nil")) } - } else { - if m.Spec.Topology.Mode == nil { - allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("topology").Child("aggregator"), + if ptr.Deref(m.Spec.Replicas, 0) <= 0 { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), m.Name, - ".spec.topology.mode can't be empty")) + "number of replicas can not be less be 0 or less")) } - // TODO: Add validation logic for topology if needed + + if m.Spec.InternalAuth == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("internalAuth"), + m.Name, "spec.internalAuth, spec.internalAuth.endpointCert, spec.internalAuth.endpointCert.issuerRef' is missing")) + } else if m.Spec.InternalAuth.EndpointCert == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("internalAuth").Child("endpointCert"), + m.Name, "spec.internalAuth.endpointCert, spec.internalAuth.endpointCert.issuerRef' is missing")) + } else if m.Spec.InternalAuth.EndpointCert != nil { + if m.Spec.InternalAuth.EndpointCert.IssuerRef == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("internalAuth").Child("endpointCert").Child("issuerRef"), + m.Name, "spec.internalAuth.endpointCert.issuerRef' is missing")) + } + if len(m.Spec.InternalAuth.EndpointCert.Certificates) > 1 { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("internalAuth").Child("endpointCert").Child("certificates"), + m.Name, "spec.internalAuth.endpointCert.certificates' can have only one certificate")) + } + } + } + + err := mssqlValidateVolumes(m.Spec.PodTemplate) + if err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumes"), + m.Name, + err.Error())) + } + + err = mssqlValidateVolumesMountPaths(m.Spec.PodTemplate) + if err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("containers"), + m.Name, + err.Error())) } if m.Spec.StorageType == "" { @@ -174,19 +202,19 @@ func (m *MsSQL) ValidateCreateOrUpdate() field.ErrorList { // reserved volume and volumes mounts for mssql var mssqlReservedVolumes = []string{ - MsSQLVolumeNameData, - MsSQLVolumeNameInitScript, + MSSQLVolumeNameData, + MSSQLVolumeNameInitScript, // Add any additional reserved volume names here } var mssqlReservedVolumesMountPaths = []string{ - MsSQLVolumeMountPathData, - MsSQLVolumeMountPathInitScript, + MSSQLVolumeMountPathData, + MSSQLVolumeMountPathInitScript, // Add any additional reserved volume mount paths here } -func mssqlValidateVersion(m *MsSQL) error { - var mssqlVersion catalog.MsSQLVersion +func mssqlValidateVersion(m *MSSQL) error { + var mssqlVersion catalog.MSSQLVersion err := DefaultClient.Get(context.TODO(), types.NamespacedName{ Name: m.Spec.Version, }, &mssqlVersion) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go index 6aad23009..3da8b1d26 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go @@ -440,6 +440,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), @@ -496,6 +497,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway": schema_apimachinery_apis_kubedb_v1alpha2_Gateway(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.GitRepo": schema_apimachinery_apis_kubedb_v1alpha2_GitRepo(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec": schema_apimachinery_apis_kubedb_v1alpha2_InitSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InternalAuthentication": schema_apimachinery_apis_kubedb_v1alpha2_InternalAuthentication(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Kafka": schema_apimachinery_apis_kubedb_v1alpha2_Kafka(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaApp": schema_apimachinery_apis_kubedb_v1alpha2_KafkaApp(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaBrokerCapacity": schema_apimachinery_apis_kubedb_v1alpha2_KafkaBrokerCapacity(ref), @@ -506,6 +508,14 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaSpec": schema_apimachinery_apis_kubedb_v1alpha2_KafkaSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaStatus": schema_apimachinery_apis_kubedb_v1alpha2_KafkaStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KernelSettings": schema_apimachinery_apis_kubedb_v1alpha2_KernelSettings(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQL": schema_apimachinery_apis_kubedb_v1alpha2_MSSQL(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLApp": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLApp(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLAvailabilityGroupSpec": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLAvailabilityGroupSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLLeaderElectionConfig": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLLeaderElectionConfig(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLList": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLList(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLSpec": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLStatus": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLStatus(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLTopology": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLTopology(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDB": schema_apimachinery_apis_kubedb_v1alpha2_MariaDB(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBList": schema_apimachinery_apis_kubedb_v1alpha2_MariaDBList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBSpec": schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref), @@ -528,13 +538,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBSpec": schema_apimachinery_apis_kubedb_v1alpha2_MongoDBSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBStatus": schema_apimachinery_apis_kubedb_v1alpha2_MongoDBStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode": schema_apimachinery_apis_kubedb_v1alpha2_MongoHiddenNode(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQL": schema_apimachinery_apis_kubedb_v1alpha2_MsSQL(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLApp": schema_apimachinery_apis_kubedb_v1alpha2_MsSQLApp(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLAvailabilityGroupSpec": schema_apimachinery_apis_kubedb_v1alpha2_MsSQLAvailabilityGroupSpec(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLList": schema_apimachinery_apis_kubedb_v1alpha2_MsSQLList(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLSpec": schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLStatus": schema_apimachinery_apis_kubedb_v1alpha2_MsSQLStatus(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLTopology": schema_apimachinery_apis_kubedb_v1alpha2_MsSQLTopology(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MySQL": schema_apimachinery_apis_kubedb_v1alpha2_MySQL(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MySQLGroupSpec": schema_apimachinery_apis_kubedb_v1alpha2_MySQLGroupSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MySQLInnoDBClusterSpec": schema_apimachinery_apis_kubedb_v1alpha2_MySQLInnoDBClusterSpec(ref), @@ -21425,6 +21428,49 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -25149,6 +25195,28 @@ func schema_apimachinery_apis_kubedb_v1alpha2_InitSpec(ref common.ReferenceCallb } } +func schema_apimachinery_apis_kubedb_v1alpha2_InternalAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalAuthentication provides different way of endpoint authentication", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "endpointCert": { + SchemaProps: spec.SchemaProps{ + Description: "EndpointCert is used for endpoint authentication of MSSql Server", + Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), + }, + }, + }, + Required: []string{"endpointCert"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.TLSConfig"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_Kafka(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -25668,7 +25736,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_KernelSettings(ref common.Referenc } } -func schema_apimachinery_apis_kubedb_v1alpha2_MariaDB(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQL(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -25697,28 +25765,127 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDB(ref common.ReferenceCallba "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBStatus"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLStatus"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLApp(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "MSSQL": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQL"), + }, + }, + }, + Required: []string{"MSSQL"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQL"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLAvailabilityGroupSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MSSQLAvailabilityGroupSpec defines the availability group spec for MSSQL", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "databases": { + SchemaProps: spec.SchemaProps{ + Description: "AvailabilityDatabases is an array of databases to be included in the availability group", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"databases"}, + }, + }, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLLeaderElectionConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MSSQLLeaderElectionConfig contains essential attributes of leader election.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "period": { + SchemaProps: spec.SchemaProps{ + Description: "Period between Node.Tick invocations", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "electionTick": { + SchemaProps: spec.SchemaProps{ + Description: "ElectionTick is the number of Node.Tick invocations that must pass between\n\telections. That is, if a follower does not receive any message from the\n leader of current term before ElectionTick has elapsed, it will become\n\tcandidate and start an election. ElectionTick must be greater than\n HeartbeatTick. We suggest ElectionTick = 10 * HeartbeatTick to avoid\n unnecessary leader switching. default value is 10.", + Default: 10, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "heartbeatTick": { + SchemaProps: spec.SchemaProps{ + Description: "HeartbeatTick is the number of Node.Tick invocations that must pass between heartbeats. That is, a leader sends heartbeat messages to maintain its leadership every HeartbeatTick ticks. default value is 1.", + Default: 1, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "transferLeadershipInterval": { + SchemaProps: spec.SchemaProps{ + Description: "TransferLeadershipInterval retry interval for transfer leadership to the healthiest node", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "transferLeadershipTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "TransferLeadershipTimeout retry timeout for transfer leadership to the healthiest node", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MSSQLList contains a list of MSSQL", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -25742,42 +25909,36 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBList(ref common.ReferenceCa }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of MariaDB TPR objects", - Type: []string{"array"}, + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDB"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQL"), }, }, }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDB"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQL"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "MSSQLSpec defines the desired state of MSSQL", + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "autoOps": { - SchemaProps: spec.SchemaProps{ - Description: "AutoOps contains configuration of automatic ops-request-recommendation generation", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec"), - }, - }, "version": { SchemaProps: spec.SchemaProps{ - Description: "Version of MariaDB to be deployed.", + Description: "Version of MSSQL to be deployed.", Default: "", Type: []string{"string"}, Format: "", @@ -25785,11 +25946,17 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa }, "replicas": { SchemaProps: spec.SchemaProps{ - Description: "Number of instances to deploy for a MariaDB database.", + Description: "Number of instances to deploy for a MSSQL database. In case of MSSQL Availability Group (default 3).", Type: []string{"integer"}, Format: "int32", }, }, + "topology": { + SchemaProps: spec.SchemaProps{ + Description: "MSSQL cluster topology", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLTopology"), + }, + }, "storageType": { SchemaProps: spec.SchemaProps{ Description: "StorageType can be durable (default) or ephemeral", @@ -25809,11 +25976,10 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, - "wsrepSSTMethod": { + "internalAuth": { SchemaProps: spec.SchemaProps{ - Description: "WsrepSSTMethod is used to define the STATE-SNAPSHOT-TRANSFER method to be used in the Galera cluster default value : rsync", - Type: []string{"string"}, - Format: "", + Description: "InternalAuth is used to authenticate endpoint", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InternalAuthentication"), }, }, "init": { @@ -25822,23 +25988,10 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec"), }, }, - "monitor": { - SchemaProps: spec.SchemaProps{ - Description: "Monitor is used to monitor database instance", - Ref: ref("kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec"), - }, - }, - "configSecret": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-mysql.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, "podTemplate": { SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), }, }, "serviceTemplates": { @@ -25855,19 +26008,6 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa }, }, }, - "requireSSL": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the database server need to be encrypted connections(ssl)", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tls": { - SchemaProps: spec.SchemaProps{ - Description: "TLS contains tls configurations", - Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), - }, - }, "halted": { SchemaProps: spec.SchemaProps{ Description: "Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.", @@ -25889,10 +26029,10 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec"), }, }, - "allowedSchemas": { + "leaderElection": { SchemaProps: spec.SchemaProps{ - Description: "AllowedSchemas defines the types of database schemas that MAY refer to a database instance and the trusted namespaces where those schema resources MAY be present.", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers"), + Description: "Leader election configuration", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLLeaderElectionConfig"), }, }, "healthChecker": { @@ -25902,10 +26042,10 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa Ref: ref("kmodules.xyz/client-go/api/v1.HealthCheckSpec"), }, }, - "archiver": { + "podPlacementPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Archiver controls database backup using Archiver CR", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver"), + Description: "PodPlacementPolicy is the reference of the podPlacementPolicy", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, }, @@ -25913,15 +26053,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InternalAuthentication", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLLeaderElectionConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "MSSQLStatus defines the observed state of MSSQL", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "phase": { SchemaProps: spec.SchemaProps{ @@ -25951,51 +26092,42 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBStatus(ref common.Reference }, }, }, - "authSecret": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), - }, - }, - "gateway": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"), - }, - }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"}, + "kmodules.xyz/client-go/api/v1.Condition"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MemberSecret(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "peerSecret": { + "mode": { SchemaProps: spec.SchemaProps{ - Description: "PeerSecret is the secret containing TLS certs used by each etcd member pod for the communication between etcd peers.", + Description: "If set to - \"AvailabilityGroup\", MSSQLAvailabilityGroupSpec is required and MSSQL servers will start an Availability Group", Type: []string{"string"}, Format: "", }, }, - "serverSecret": { + "availabilityGroup": { SchemaProps: spec.SchemaProps{ - Description: "ServerSecret is the secret containing TLS certs used by each etcd member pod for the communication between etcd server and its clients.", - Type: []string{"string"}, - Format: "", + Description: "AvailabilityGroup info for MSSQL", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLAvailabilityGroupSpec"), }, }, }, }, }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLAvailabilityGroupSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_Memcached(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MariaDB(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -26024,24 +26156,24 @@ func schema_apimachinery_apis_kubedb_v1alpha2_Memcached(ref common.ReferenceCall "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedStatus"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBStatus"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedStatus"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDBStatus"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -26069,13 +26201,13 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedList(ref common.Reference }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of Memcached TPR objects", + Description: "Items is a list of MariaDB TPR objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Memcached"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDB"), }, }, }, @@ -26085,19 +26217,26 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedList(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Memcached"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MariaDB"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "version": { + "autoOps": { SchemaProps: spec.SchemaProps{ - Description: "Version of Memcached to be deployed.", + Description: "AutoOps contains configuration of automatic ops-request-recommendation generation", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec"), + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version of MariaDB to be deployed.", Default: "", Type: []string{"string"}, Format: "", @@ -26105,29 +26244,55 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedSpec(ref common.Reference }, "replicas": { SchemaProps: spec.SchemaProps{ - Description: "Number of instances to deploy for a Memcached database.", + Description: "Number of instances to deploy for a MariaDB database.", Type: []string{"integer"}, Format: "int32", }, }, + "storageType": { + SchemaProps: spec.SchemaProps{ + Description: "StorageType can be durable (default) or ephemeral", + Type: []string{"string"}, + Format: "", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage spec to specify how storage shall be used.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Description: "Database authentication secret", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), + }, + }, + "wsrepSSTMethod": { + SchemaProps: spec.SchemaProps{ + Description: "WsrepSSTMethod is used to define the STATE-SNAPSHOT-TRANSFER method to be used in the Galera cluster default value : rsync", + Type: []string{"string"}, + Format: "", + }, + }, + "init": { + SchemaProps: spec.SchemaProps{ + Description: "Init is used to initialize database", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec"), + }, + }, "monitor": { SchemaProps: spec.SchemaProps{ - Description: "Monitor is used monitor database instance", + Description: "Monitor is used to monitor database instance", Ref: ref("kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec"), }, }, "configSecret": { SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database. If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-mysql.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, - "dataVolume": { - SchemaProps: spec.SchemaProps{ - Description: "DataVolume is an optional field to add one volume to each memcached pod. The volume will be made available under /data and owned by the memcached user.\n\nWhile not mandated by the API and not configured automatically, the intended purpose is to use that volume for memcached's persistent memory support (https://memcached.org/blog/persistent-memory/) by adding the memory-file and memory-limit options to the config (https://github.com/memcached/memcached/wiki/WarmRestart).\n\nFor that purpose, a CSI inline volume provided by PMEM-CSI can be used, in which case each pod will get its own, empty volume. Warm restarts are not supported.\n\nFor testing, an empty dir can be used instead.", - Ref: ref("k8s.io/api/core/v1.VolumeSource"), - }, - }, "podTemplate": { SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", @@ -26149,6 +26314,13 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedSpec(ref common.Reference }, }, }, + "requireSSL": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the database server need to be encrypted connections(ssl)", + Type: []string{"boolean"}, + Format: "", + }, + }, "tls": { SchemaProps: spec.SchemaProps{ Description: "TLS contains tls configurations", @@ -26169,16 +26341,42 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedSpec(ref common.Reference Format: "", }, }, + "coordinator": { + SchemaProps: spec.SchemaProps{ + Description: "Coordinator defines attributes of the coordinator container", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec"), + }, + }, + "allowedSchemas": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedSchemas defines the types of database schemas that MAY refer to a database instance and the trusted namespaces where those schema resources MAY be present.", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers"), + }, + }, + "healthChecker": { + SchemaProps: spec.SchemaProps{ + Description: "HealthChecker defines attributes of the health checker", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.HealthCheckSpec"), + }, + }, + "archiver": { + SchemaProps: spec.SchemaProps{ + Description: "Archiver controls database backup using Archiver CR", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver"), + }, + }, }, Required: []string{"version"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.VolumeSource", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -26212,6 +26410,11 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedStatus(ref common.Referen }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, "gateway": { SchemaProps: spec.SchemaProps{ Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"), @@ -26221,27 +26424,27 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedStatus(ref common.Referen }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MetadataStorage(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MemberSecret(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "type": { + "peerSecret": { SchemaProps: spec.SchemaProps{ - Description: "If not KubeDB managed, then specify type of the metadata storage", + Description: "PeerSecret is the secret containing TLS certs used by each etcd member pod for the communication between etcd peers.", Type: []string{"string"}, Format: "", }, }, - "createTables": { + "serverSecret": { SchemaProps: spec.SchemaProps{ - Description: "If Druid has the permission to create new tables", - Type: []string{"boolean"}, + Description: "ServerSecret is the secret containing TLS certs used by each etcd member pod for the communication between etcd server and its clients.", + Type: []string{"string"}, Format: "", }, }, @@ -26251,34 +26454,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MetadataStorage(ref common.Referen } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoArbiterNode(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "configSecret": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "podTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "PodTemplate is an optional configuration for pods used to expose database", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, - } -} - -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDB(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_Memcached(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -26307,79 +26483,24 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDB(ref common.ReferenceCallba "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBStatus"}, - } -} - -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBConfigNode(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "prefix": { - SchemaProps: spec.SchemaProps{ - Description: "Prefix is the name prefix of this node.", - Type: []string{"string"}, - Format: "", - }, - }, - "configSecret": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "podTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "PodTemplate is an optional configuration for pods used to expose database", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), - }, - }, - "storage": { - SchemaProps: spec.SchemaProps{ - Description: "Storage to specify how storage shall be used.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), - }, - }, - "ephemeralStorage": { - SchemaProps: spec.SchemaProps{ - Description: "EphemeralStorage spec to specify the configuration of ephemeral storage type.", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedStatus"), }, }, }, - Required: []string{"replicas"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MemcachedStatus"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -26407,13 +26528,13 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBList(ref common.ReferenceCa }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is a list of MongoDB TPR objects", + Description: "Items is a list of Memcached TPR objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDB"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Memcached"), }, }, }, @@ -26423,37 +26544,49 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDB"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Memcached"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBMongosNode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version of Memcached to be deployed.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, "replicas": { SchemaProps: spec.SchemaProps{ - Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", - Default: 0, + Description: "Number of instances to deploy for a Memcached database.", Type: []string{"integer"}, Format: "int32", }, }, - "prefix": { + "monitor": { SchemaProps: spec.SchemaProps{ - Description: "Prefix is the name prefix of this node.", - Type: []string{"string"}, - Format: "", + Description: "Monitor is used monitor database instance", + Ref: ref("kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec"), }, }, "configSecret": { SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Description: "ConfigSecret is an optional field to provide custom configuration file for database. If specified, this file will be used as configuration file otherwise default configuration file will be used.", Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, + "dataVolume": { + SchemaProps: spec.SchemaProps{ + Description: "DataVolume is an optional field to add one volume to each memcached pod. The volume will be made available under /data and owned by the memcached user.\n\nWhile not mandated by the API and not configured automatically, the intended purpose is to use that volume for memcached's persistent memory support (https://memcached.org/blog/persistent-memory/) by adding the memory-file and memory-limit options to the config (https://github.com/memcached/memcached/wiki/WarmRestart).\n\nFor that purpose, a CSI inline volume provided by PMEM-CSI can be used, in which case each pod will get its own, empty volume. Warm restarts are not supported.\n\nFor testing, an empty dir can be used instead.", + Ref: ref("k8s.io/api/core/v1.VolumeSource"), + }, + }, "podTemplate": { SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", @@ -26461,108 +26594,128 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBMongosNode(ref common.Refer Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, - } -} - -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBNode(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "replicas": { + "serviceTemplates": { SchemaProps: spec.SchemaProps{ - Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "ServiceTemplates is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"), + }, + }, + }, }, }, - "prefix": { + "tls": { SchemaProps: spec.SchemaProps{ - Description: "Prefix is the name prefix of this node.", - Type: []string{"string"}, - Format: "", + Description: "TLS contains tls configurations", + Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), }, }, - "configSecret": { + "halted": { SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Description: "Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.", + Type: []string{"boolean"}, + Format: "", }, }, - "podTemplate": { + "terminationPolicy": { SchemaProps: spec.SchemaProps{ - Description: "PodTemplate is an optional configuration for pods used to expose database", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + Description: "TerminationPolicy controls the delete operation for database", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"replicas"}, + Required: []string{"version"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.VolumeSource", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MemcachedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "phase": { SchemaProps: spec.SchemaProps{ - Description: "Name of replicaset", - Default: "", + Description: "Specifies the current phase of the database", Type: []string{"string"}, Format: "", }, }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed for this resource. It corresponds to the resource's generation, which is updated on mutation by the API Server.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions applied to the database, such as approval or denial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.Condition"), + }, + }, + }, + }, + }, + "gateway": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"), + }, + }, }, - Required: []string{"name"}, }, }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBShardNode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MetadataStorage(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "shards": { - SchemaProps: spec.SchemaProps{ - Description: "Shards represents number of shards for shard type of node More info: https://docs.mongodb.com/manual/core/sharded-cluster-shards/", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "replicas": { + "type": { SchemaProps: spec.SchemaProps{ - Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", + Description: "If not KubeDB managed, then specify type of the metadata storage", + Type: []string{"string"}, + Format: "", }, }, - "prefix": { + "createTables": { SchemaProps: spec.SchemaProps{ - Description: "Prefix is the name prefix of this node.", - Type: []string{"string"}, + Description: "If Druid has the permission to create new tables", + Type: []string{"boolean"}, Format: "", }, }, + }, + }, + }, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_MongoArbiterNode(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ "configSecret": { SchemaProps: spec.SchemaProps{ Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", @@ -26576,113 +26729,97 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBShardNode(ref common.Refere Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, - "storage": { - SchemaProps: spec.SchemaProps{ - Description: "Storage to specify how storage shall be used.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), - }, - }, - "ephemeralStorage": { - SchemaProps: spec.SchemaProps{ - Description: "EphemeralStorage spec to specify the configuration of ephemeral storage type.", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, }, - Required: []string{"shards", "replicas"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBShardingTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDB(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "shard": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Shard component of mongodb. More info: https://docs.mongodb.com/manual/core/sharded-cluster-shards/", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardNode"), + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, - "configServer": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Config Server (metadata) component of mongodb. More info: https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBConfigNode"), + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", }, }, - "mongos": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Mongos (router) component of mongodb. More info: https://docs.mongodb.com/manual/core/sharded-cluster-query-router/", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBMongosNode"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBStatus"), }, }, }, - Required: []string{"shard", "configServer", "mongos"}, }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBConfigNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBMongosNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardNode"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBStatus"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBConfigNode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "autoOps": { - SchemaProps: spec.SchemaProps{ - Description: "AutoOps contains configuration of automatic ops-request-recommendation generation", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec"), - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "Version of MongoDB to be deployed.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, "replicas": { SchemaProps: spec.SchemaProps{ - Description: "Number of instances to deploy for a MongoDB database.", + Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, }, - "replicaSet": { + "prefix": { SchemaProps: spec.SchemaProps{ - Description: "MongoDB replica set", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBReplicaSet"), + Description: "Prefix is the name prefix of this node.", + Type: []string{"string"}, + Format: "", }, }, - "shardTopology": { + "configSecret": { SchemaProps: spec.SchemaProps{ - Description: "MongoDB sharding topology.", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardingTopology"), + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, - "storageType": { + "podTemplate": { SchemaProps: spec.SchemaProps{ - Description: "StorageType can be durable (default) or ephemeral", - Type: []string{"string"}, - Format: "", + Description: "PodTemplate is an optional configuration for pods used to expose database", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, "storage": { SchemaProps: spec.SchemaProps{ - Description: "Storage spec to specify how storage shall be used.", + Description: "Storage to specify how storage shall be used.", Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), }, }, @@ -26692,393 +26829,285 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBSpec(ref common.ReferenceCa Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), }, }, - "authSecret": { - SchemaProps: spec.SchemaProps{ - Description: "Database authentication secret", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), - }, - }, - "clusterAuthMode": { + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "ClusterAuthMode for replicaset or sharding. (default will be x509 if sslmode is not `disabled`.) See available ClusterAuthMode: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-clusterauthmode", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, - "sslMode": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "SSLMode for both standalone and clusters. (default, disabled.) See more options: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-sslmode", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, }, - "init": { - SchemaProps: spec.SchemaProps{ - Description: "Init is used to initialize database", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec"), - }, - }, - "monitor": { - SchemaProps: spec.SchemaProps{ - Description: "Monitor is used monitor database instance", - Ref: ref("kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec"), - }, - }, - "configSecret": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "podTemplate": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "PodTemplate is an optional configuration for pods used to expose database", - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "serviceTemplates": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "ServiceTemplates is an optional configuration for services used to expose database", + Description: "Items is a list of MongoDB TPR objects", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDB"), }, }, }, }, }, - "tls": { - SchemaProps: spec.SchemaProps{ - Description: "TLS contains tls configurations for client and server.", - Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), - }, - }, - "keyFileSecret": { - SchemaProps: spec.SchemaProps{ - Description: "Secret for KeyFileSecret. Contains keyfile `key.txt` if spec.clusterAuthMode == keyFile || sendKeyFile", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "halted": { - SchemaProps: spec.SchemaProps{ - Description: "Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "terminationPolicy": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDB"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBMongosNode(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { SchemaProps: spec.SchemaProps{ - Description: "TerminationPolicy controls the delete operation for database", - Type: []string{"string"}, - Format: "", + Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "storageEngine": { + "prefix": { SchemaProps: spec.SchemaProps{ - Description: "StorageEngine can be wiredTiger (default) or inMemory See available StorageEngine: https://docs.mongodb.com/manual/core/storage-engines/", + Description: "Prefix is the name prefix of this node.", Type: []string{"string"}, Format: "", }, }, - "coordinator": { - SchemaProps: spec.SchemaProps{ - Description: "Coordinator defines attributes of the coordinator container", - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec"), - }, - }, - "allowedSchemas": { - SchemaProps: spec.SchemaProps{ - Description: "AllowedSchemas defines the types of database schemas that MAY refer to a database instance and the trusted namespaces where those schema resources MAY be present.", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers"), - }, - }, - "arbiter": { - SchemaProps: spec.SchemaProps{ - Description: "Mongo Arbiter component of mongodb. More info: https://docs.mongodb.com/manual/core/replica-set-arbiter/", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoArbiterNode"), - }, - }, - "hidden": { + "configSecret": { SchemaProps: spec.SchemaProps{ - Description: "Hidden component of mongodb which is invisible to client applications More info: https://www.mongodb.com/docs/manual/core/replica-set-hidden-member/", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode"), + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, - "healthChecker": { + "podTemplate": { SchemaProps: spec.SchemaProps{ - Description: "HealthChecker defines attributes of the health checker", + Description: "PodTemplate is an optional configuration for pods used to expose database", Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.HealthCheckSpec"), - }, - }, - "archiver": { - SchemaProps: spec.SchemaProps{ - Description: "Archiver controls database backup using Archiver CR", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver"), + Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, }, - Required: []string{"version"}, + Required: []string{"replicas"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoArbiterNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBReplicaSet", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardingTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBNode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the current phase of the database", - Type: []string{"string"}, - Format: "", - }, - }, - "observedGeneration": { + "replicas": { SchemaProps: spec.SchemaProps{ - Description: "observedGeneration is the most recent generation observed for this resource. It corresponds to the resource's generation, which is updated on mutation by the API Server.", + Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", + Default: 0, Type: []string{"integer"}, - Format: "int64", + Format: "int32", }, }, - "conditions": { + "prefix": { SchemaProps: spec.SchemaProps{ - Description: "Conditions applied to the database, such as approval or denial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.Condition"), - }, - }, - }, + Description: "Prefix is the name prefix of this node.", + Type: []string{"string"}, + Format: "", }, }, - "authSecret": { + "configSecret": { SchemaProps: spec.SchemaProps{ - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, - "gateway": { + "podTemplate": { SchemaProps: spec.SchemaProps{ - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"), + Description: "PodTemplate is an optional configuration for pods used to expose database", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, }, + Required: []string{"replicas"}, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MongoHiddenNode(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBReplicaSet(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "configSecret": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "podTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "PodTemplate is an optional configuration for pods used to expose database", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "storage": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Storage to specify how storage shall be used.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Description: "Name of replicaset", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"replicas", "storage"}, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQL(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBShardNode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "shards": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", + Description: "Shards represents number of shards for shard type of node More info: https://docs.mongodb.com/manual/core/sharded-cluster-shards/", + Default: 0, + Type: []string{"integer"}, + Format: "int32", }, }, - "apiVersion": { + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "prefix": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Description: "Prefix is the name prefix of this node.", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "configSecret": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, - "spec": { + "podTemplate": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLSpec"), + Description: "PodTemplate is an optional configuration for pods used to expose database", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, - "status": { + "storage": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLStatus"), + Description: "Storage to specify how storage shall be used.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLStatus"}, - } -} - -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLApp(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "MsSQL": { + "ephemeralStorage": { SchemaProps: spec.SchemaProps{ - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQL"), + Description: "EphemeralStorage spec to specify the configuration of ephemeral storage type.", + Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), }, }, }, - Required: []string{"MsSQL"}, + Required: []string{"shards", "replicas"}, }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQL"}, - } -} - -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLAvailabilityGroupSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MsSQLAvailabilityGroupSpec defines the availability group spec for MsSQL", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "databases": { - SchemaProps: spec.SchemaProps{ - Description: "AvailabilityDatabases is an array of databases to be included in the availability group", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"databases"}, - }, - }, + "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBShardingTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLList contains a list of MsSQL", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { + "shard": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", + Description: "Shard component of mongodb. More info: https://docs.mongodb.com/manual/core/sharded-cluster-shards/", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardNode"), }, }, - "metadata": { + "configServer": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "Config Server (metadata) component of mongodb. More info: https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBConfigNode"), }, }, - "items": { + "mongos": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQL"), - }, - }, - }, + Description: "Mongos (router) component of mongodb. More info: https://docs.mongodb.com/manual/core/sharded-cluster-query-router/", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBMongosNode"), }, }, }, - Required: []string{"items"}, + Required: []string{"shard", "configServer", "mongos"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQL"}, + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBConfigNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBMongosNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardNode"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLSpec defines the desired state of MsSQL", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ + "autoOps": { + SchemaProps: spec.SchemaProps{ + Description: "AutoOps contains configuration of automatic ops-request-recommendation generation", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec"), + }, + }, "version": { SchemaProps: spec.SchemaProps{ - Description: "Version of MsSQL to be deployed.", + Description: "Version of MongoDB to be deployed.", Default: "", Type: []string{"string"}, Format: "", @@ -27086,15 +27115,21 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCall }, "replicas": { SchemaProps: spec.SchemaProps{ - Description: "Number of instances to deploy for a MsSQL database. In case of MsSQL Availability Group (default 3).", + Description: "Number of instances to deploy for a MongoDB database.", Type: []string{"integer"}, Format: "int32", }, }, - "topology": { + "replicaSet": { + SchemaProps: spec.SchemaProps{ + Description: "MongoDB replica set", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBReplicaSet"), + }, + }, + "shardTopology": { SchemaProps: spec.SchemaProps{ - Description: "MsSQL cluster topology", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLTopology"), + Description: "MongoDB sharding topology.", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardingTopology"), }, }, "storageType": { @@ -27110,22 +27145,54 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCall Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), }, }, + "ephemeralStorage": { + SchemaProps: spec.SchemaProps{ + Description: "EphemeralStorage spec to specify the configuration of ephemeral storage type.", + Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + }, + }, "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, + "clusterAuthMode": { + SchemaProps: spec.SchemaProps{ + Description: "ClusterAuthMode for replicaset or sharding. (default will be x509 if sslmode is not `disabled`.) See available ClusterAuthMode: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-clusterauthmode", + Type: []string{"string"}, + Format: "", + }, + }, + "sslMode": { + SchemaProps: spec.SchemaProps{ + Description: "SSLMode for both standalone and clusters. (default, disabled.) See more options: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-sslmode", + Type: []string{"string"}, + Format: "", + }, + }, "init": { SchemaProps: spec.SchemaProps{ Description: "Init is used to initialize database", Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec"), }, }, + "monitor": { + SchemaProps: spec.SchemaProps{ + Description: "Monitor is used monitor database instance", + Ref: ref("kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec"), + }, + }, + "configSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, "podTemplate": { SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", - Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), + Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), }, }, "serviceTemplates": { @@ -27142,6 +27209,18 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCall }, }, }, + "tls": { + SchemaProps: spec.SchemaProps{ + Description: "TLS contains tls configurations for client and server.", + Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), + }, + }, + "keyFileSecret": { + SchemaProps: spec.SchemaProps{ + Description: "Secret for KeyFileSecret. Contains keyfile `key.txt` if spec.clusterAuthMode == keyFile || sendKeyFile", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, "halted": { SchemaProps: spec.SchemaProps{ Description: "Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.", @@ -27156,6 +27235,13 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCall Format: "", }, }, + "storageEngine": { + SchemaProps: spec.SchemaProps{ + Description: "StorageEngine can be wiredTiger (default) or inMemory See available StorageEngine: https://docs.mongodb.com/manual/core/storage-engines/", + Type: []string{"string"}, + Format: "", + }, + }, "coordinator": { SchemaProps: spec.SchemaProps{ Description: "Coordinator defines attributes of the coordinator container", @@ -27163,6 +27249,24 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCall Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec"), }, }, + "allowedSchemas": { + SchemaProps: spec.SchemaProps{ + Description: "AllowedSchemas defines the types of database schemas that MAY refer to a database instance and the trusted namespaces where those schema resources MAY be present.", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers"), + }, + }, + "arbiter": { + SchemaProps: spec.SchemaProps{ + Description: "Mongo Arbiter component of mongodb. More info: https://docs.mongodb.com/manual/core/replica-set-arbiter/", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoArbiterNode"), + }, + }, + "hidden": { + SchemaProps: spec.SchemaProps{ + Description: "Hidden component of mongodb which is invisible to client applications More info: https://www.mongodb.com/docs/manual/core/replica-set-hidden-member/", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode"), + }, + }, "healthChecker": { SchemaProps: spec.SchemaProps{ Description: "HealthChecker defines attributes of the health checker", @@ -27170,21 +27274,26 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLSpec(ref common.ReferenceCall Ref: ref("kmodules.xyz/client-go/api/v1.HealthCheckSpec"), }, }, + "archiver": { + SchemaProps: spec.SchemaProps{ + Description: "Archiver controls database backup using Archiver CR", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver"), + }, + }, }, Required: []string{"version"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoArbiterNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBReplicaSet", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardingTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MsSQLStatus defines the observed state of MsSQL", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ "phase": { SchemaProps: spec.SchemaProps{ @@ -27214,38 +27323,64 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLStatus(ref common.ReferenceCa }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, + "gateway": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Gateway"}, } } -func schema_apimachinery_apis_kubedb_v1alpha2_MsSQLTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_MongoHiddenNode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "mode": { + "configSecret": { SchemaProps: spec.SchemaProps{ - Description: "If set to - \"AvailabilityGroup\", MsSQLAvailabilityGroupSpec is required and MsSQL servers will start an Availability Group", - Type: []string{"string"}, - Format: "", + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, - "availabilityGroup": { + "podTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "PodTemplate is an optional configuration for pods used to expose database", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas represents number of replicas of this specific node. If current node has replicaset enabled, then replicas is the amount of replicaset nodes.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "storage": { SchemaProps: spec.SchemaProps{ - Description: "AvailabilityGroup info for MsSQL", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLAvailabilityGroupSpec"), + Description: "Storage to specify how storage shall be used.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), }, }, }, + Required: []string{"replicas", "storage"}, }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MsSQLAvailabilityGroupSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"}, } } @@ -27798,7 +27933,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_NamedServiceStatus(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.ServicePort"), + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), }, }, }, @@ -27809,7 +27944,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_NamedServiceStatus(ref common.Refe }, }, Dependencies: []string{ - "kmodules.xyz/offshoot-api/api/v1.ServicePort"}, + "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, } } @@ -27872,6 +28007,12 @@ func schema_apimachinery_apis_kubedb_v1alpha2_NamedURL(ref common.ReferenceCallb Format: "", }, }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, "helmRelease": { SchemaProps: spec.SchemaProps{ Description: "HelmRelease is the name of the helm release used to deploy this ui The name format is typically -", @@ -27883,7 +28024,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_NamedURL(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/register.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/register.go index 88f8b9c20..01aae29e0 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/register.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/register.go @@ -94,8 +94,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ZooKeeperList{}, &Solr{}, &SolrList{}, - &MsSQL{}, - &MsSQLList{}, + &MSSQL{}, + &MSSQLList{}, ) scheme.AddKnownTypes(SchemeGroupVersion, diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go index 681233b1b..fa8a7cfa6 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go @@ -320,6 +320,16 @@ func (s *Solr) SetDefaults(slVersion *catalog.SolrVersion) { s.setDefaultContainerSecurityContext(slVersion, &s.Spec.PodTemplate) s.setDefaultContainerResourceLimits(&s.Spec.PodTemplate) } + + if s.Spec.Monitor != nil { + if s.Spec.Monitor.Prometheus == nil { + s.Spec.Monitor.Prometheus = &mona.PrometheusSpec{} + } + if s.Spec.Monitor.Prometheus != nil && s.Spec.Monitor.Prometheus.Exporter.Port == 0 { + s.Spec.Monitor.Prometheus.Exporter.Port = SolrExporterPort + } + s.Spec.Monitor.SetDefaults() + } } func (s *Solr) setDefaultContainerSecurityContext(slVersion *catalog.SolrVersion, podTemplate *ofst.PodTemplateSpec) { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go index 0fcbd5d56..6567c3e65 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go @@ -251,7 +251,7 @@ type NamedServiceStatus struct { // Alias represents the identifier of the service. Alias ServiceAlias `json:"alias"` - Ports []ofst.ServicePort `json:"ports"` + Ports []ofst.GatewayPort `json:"ports"` } type NamedURL struct { @@ -262,6 +262,9 @@ type NamedURL struct { // URL of the database ui URL string `json:"url"` + // +optional + Port ofst.GatewayPort `json:"port,omitempty"` + // HelmRelease is the name of the helm release used to deploy this ui // The name format is typically - // +optional diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go index e0db57535..ef4682a6f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go @@ -1459,6 +1459,27 @@ func (in *InitSpec) DeepCopy() *InitSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalAuthentication) DeepCopyInto(out *InternalAuthentication) { + *out = *in + if in.EndpointCert != nil { + in, out := &in.EndpointCert, &out.EndpointCert + *out = new(apiv1.TLSConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalAuthentication. +func (in *InternalAuthentication) DeepCopy() *InternalAuthentication { + if in == nil { + return nil + } + out := new(InternalAuthentication) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Kafka) DeepCopyInto(out *Kafka) { *out = *in @@ -1776,6 +1797,255 @@ func (in *KernelSettings) DeepCopy() *KernelSettings { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQL) DeepCopyInto(out *MSSQL) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQL. +func (in *MSSQL) DeepCopy() *MSSQL { + if in == nil { + return nil + } + out := new(MSSQL) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MSSQL) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLApp) DeepCopyInto(out *MSSQLApp) { + *out = *in + if in.MSSQL != nil { + in, out := &in.MSSQL, &out.MSSQL + *out = new(MSSQL) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLApp. +func (in *MSSQLApp) DeepCopy() *MSSQLApp { + if in == nil { + return nil + } + out := new(MSSQLApp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLAvailabilityGroupSpec) DeepCopyInto(out *MSSQLAvailabilityGroupSpec) { + *out = *in + if in.AvailabilityDatabases != nil { + in, out := &in.AvailabilityDatabases, &out.AvailabilityDatabases + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLAvailabilityGroupSpec. +func (in *MSSQLAvailabilityGroupSpec) DeepCopy() *MSSQLAvailabilityGroupSpec { + if in == nil { + return nil + } + out := new(MSSQLAvailabilityGroupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLLeaderElectionConfig) DeepCopyInto(out *MSSQLLeaderElectionConfig) { + *out = *in + out.Period = in.Period + if in.TransferLeadershipInterval != nil { + in, out := &in.TransferLeadershipInterval, &out.TransferLeadershipInterval + *out = new(v1.Duration) + **out = **in + } + if in.TransferLeadershipTimeout != nil { + in, out := &in.TransferLeadershipTimeout, &out.TransferLeadershipTimeout + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLLeaderElectionConfig. +func (in *MSSQLLeaderElectionConfig) DeepCopy() *MSSQLLeaderElectionConfig { + if in == nil { + return nil + } + out := new(MSSQLLeaderElectionConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLList) DeepCopyInto(out *MSSQLList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MSSQL, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLList. +func (in *MSSQLList) DeepCopy() *MSSQLList { + if in == nil { + return nil + } + out := new(MSSQLList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MSSQLList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLSpec) DeepCopyInto(out *MSSQLSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Topology != nil { + in, out := &in.Topology, &out.Topology + *out = new(MSSQLTopology) + (*in).DeepCopyInto(*out) + } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(corev1.PersistentVolumeClaimSpec) + (*in).DeepCopyInto(*out) + } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(SecretReference) + **out = **in + } + if in.InternalAuth != nil { + in, out := &in.InternalAuth, &out.InternalAuth + *out = new(InternalAuthentication) + (*in).DeepCopyInto(*out) + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = new(InitSpec) + (*in).DeepCopyInto(*out) + } + if in.PodTemplate != nil { + in, out := &in.PodTemplate, &out.PodTemplate + *out = new(v2.PodTemplateSpec) + (*in).DeepCopyInto(*out) + } + if in.ServiceTemplates != nil { + in, out := &in.ServiceTemplates, &out.ServiceTemplates + *out = make([]NamedServiceTemplateSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Coordinator.DeepCopyInto(&out.Coordinator) + if in.LeaderElection != nil { + in, out := &in.LeaderElection, &out.LeaderElection + *out = new(MSSQLLeaderElectionConfig) + (*in).DeepCopyInto(*out) + } + in.HealthChecker.DeepCopyInto(&out.HealthChecker) + if in.PodPlacementPolicy != nil { + in, out := &in.PodPlacementPolicy, &out.PodPlacementPolicy + *out = new(corev1.LocalObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLSpec. +func (in *MSSQLSpec) DeepCopy() *MSSQLSpec { + if in == nil { + return nil + } + out := new(MSSQLSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLStatus) DeepCopyInto(out *MSSQLStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]apiv1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLStatus. +func (in *MSSQLStatus) DeepCopy() *MSSQLStatus { + if in == nil { + return nil + } + out := new(MSSQLStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLTopology) DeepCopyInto(out *MSSQLTopology) { + *out = *in + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + *out = new(MSSQLMode) + **out = **in + } + if in.AvailabilityGroup != nil { + in, out := &in.AvailabilityGroup, &out.AvailabilityGroup + *out = new(MSSQLAvailabilityGroupSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLTopology. +func (in *MSSQLTopology) DeepCopy() *MSSQLTopology { + if in == nil { + return nil + } + out := new(MSSQLTopology) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MariaDB) DeepCopyInto(out *MariaDB) { *out = *in @@ -2495,213 +2765,6 @@ func (in *MongoHiddenNode) DeepCopy() *MongoHiddenNode { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQL) DeepCopyInto(out *MsSQL) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQL. -func (in *MsSQL) DeepCopy() *MsSQL { - if in == nil { - return nil - } - out := new(MsSQL) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MsSQL) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLApp) DeepCopyInto(out *MsSQLApp) { - *out = *in - if in.MsSQL != nil { - in, out := &in.MsSQL, &out.MsSQL - *out = new(MsSQL) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLApp. -func (in *MsSQLApp) DeepCopy() *MsSQLApp { - if in == nil { - return nil - } - out := new(MsSQLApp) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLAvailabilityGroupSpec) DeepCopyInto(out *MsSQLAvailabilityGroupSpec) { - *out = *in - if in.AvailabilityDatabases != nil { - in, out := &in.AvailabilityDatabases, &out.AvailabilityDatabases - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLAvailabilityGroupSpec. -func (in *MsSQLAvailabilityGroupSpec) DeepCopy() *MsSQLAvailabilityGroupSpec { - if in == nil { - return nil - } - out := new(MsSQLAvailabilityGroupSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLList) DeepCopyInto(out *MsSQLList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MsSQL, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLList. -func (in *MsSQLList) DeepCopy() *MsSQLList { - if in == nil { - return nil - } - out := new(MsSQLList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MsSQLList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLSpec) DeepCopyInto(out *MsSQLSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Topology != nil { - in, out := &in.Topology, &out.Topology - *out = new(MsSQLTopology) - (*in).DeepCopyInto(*out) - } - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = new(corev1.PersistentVolumeClaimSpec) - (*in).DeepCopyInto(*out) - } - if in.AuthSecret != nil { - in, out := &in.AuthSecret, &out.AuthSecret - *out = new(SecretReference) - **out = **in - } - if in.Init != nil { - in, out := &in.Init, &out.Init - *out = new(InitSpec) - (*in).DeepCopyInto(*out) - } - if in.PodTemplate != nil { - in, out := &in.PodTemplate, &out.PodTemplate - *out = new(v2.PodTemplateSpec) - (*in).DeepCopyInto(*out) - } - if in.ServiceTemplates != nil { - in, out := &in.ServiceTemplates, &out.ServiceTemplates - *out = make([]NamedServiceTemplateSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Coordinator.DeepCopyInto(&out.Coordinator) - in.HealthChecker.DeepCopyInto(&out.HealthChecker) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLSpec. -func (in *MsSQLSpec) DeepCopy() *MsSQLSpec { - if in == nil { - return nil - } - out := new(MsSQLSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLStatus) DeepCopyInto(out *MsSQLStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]apiv1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLStatus. -func (in *MsSQLStatus) DeepCopy() *MsSQLStatus { - if in == nil { - return nil - } - out := new(MsSQLStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MsSQLTopology) DeepCopyInto(out *MsSQLTopology) { - *out = *in - if in.Mode != nil { - in, out := &in.Mode, &out.Mode - *out = new(MsSQLMode) - **out = **in - } - if in.AvailabilityGroup != nil { - in, out := &in.AvailabilityGroup, &out.AvailabilityGroup - *out = new(MsSQLAvailabilityGroupSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MsSQLTopology. -func (in *MsSQLTopology) DeepCopy() *MsSQLTopology { - if in == nil { - return nil - } - out := new(MsSQLTopology) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MySQL) DeepCopyInto(out *MySQL) { *out = *in @@ -3034,7 +3097,7 @@ func (in *NamedServiceStatus) DeepCopyInto(out *NamedServiceStatus) { *out = *in if in.Ports != nil { in, out := &in.Ports, &out.Ports - *out = make([]offshootapiapiv1.ServicePort, len(*in)) + *out = make([]offshootapiapiv1.GatewayPort, len(*in)) copy(*out, *in) } return @@ -3070,6 +3133,7 @@ func (in *NamedServiceTemplateSpec) DeepCopy() *NamedServiceTemplateSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedURL) DeepCopyInto(out *NamedURL) { *out = *in + out.Port = in.Port if in.HelmRelease != nil { in, out := &in.HelmRelease, &out.HelmRelease *out = new(corev1.LocalObjectReference) diff --git a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mssqlversions.yaml b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mssqlversions.yaml index 2f85add7f..8802af4b9 100644 --- a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mssqlversions.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mssqlversions.yaml @@ -12,13 +12,13 @@ spec: - datastore - kubedb - appscode - kind: MsSQLVersion - listKind: MsSQLVersionList + kind: MSSQLVersion + listKind: MSSQLVersionList plural: mssqlversions shortNames: - msversion singular: mssqlversion - scope: Namespaced + scope: Cluster versions: - additionalPrinterColumns: - jsonPath: .spec.version diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml index 83ccef40b..54aa2dfdc 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml @@ -24660,6 +24660,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -24688,6 +24691,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml index 5f9c7caad..97bb6b15f 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml @@ -5850,6 +5850,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -5878,6 +5881,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml index 992ef57df..8fa07929d 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml @@ -3936,6 +3936,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3964,6 +3967,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_ferretdbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_ferretdbs.yaml index a0a38a774..428d282c0 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_ferretdbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_ferretdbs.yaml @@ -3980,6 +3980,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -4008,6 +4011,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_kafkas.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_kafkas.yaml index f9dc28fd0..5c279b9b1 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_kafkas.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_kafkas.yaml @@ -7654,6 +7654,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -7682,6 +7685,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml index fcc006421..e073cd1dc 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml @@ -4242,6 +4242,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -4270,6 +4273,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_memcacheds.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_memcacheds.yaml index 085031ea5..cf3f51687 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_memcacheds.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_memcacheds.yaml @@ -3712,6 +3712,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3740,6 +3743,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml index 11fa61f9e..c993ce417 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml @@ -17056,6 +17056,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -17084,6 +17087,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqls.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqls.yaml index 0779655b9..25fcbc05e 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqls.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqls.yaml @@ -13,8 +13,8 @@ spec: - kubedb - appscode - all - kind: MsSQL - listKind: MsSQLList + kind: MSSQL + listKind: MSSQLList plural: mssqls shortNames: - ms @@ -1133,6 +1133,141 @@ spec: waitForInitialRestore: type: boolean type: object + internalAuth: + nullable: true + properties: + endpointCert: + properties: + certificates: + items: + properties: + alias: + type: string + dnsNames: + items: + type: string + type: array + duration: + type: string + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + privateKey: + properties: + encoding: + enum: + - PKCS1 + - PKCS8 + type: string + type: object + renewBefore: + type: string + secretName: + type: string + subject: + properties: + countries: + items: + type: string + type: array + localities: + items: + type: string + type: array + organizationalUnits: + items: + type: string + type: array + organizations: + items: + type: string + type: array + postalCodes: + items: + type: string + type: array + provinces: + items: + type: string + type: array + serialNumber: + type: string + streetAddresses: + items: + type: string + type: array + type: object + uris: + items: + type: string + type: array + required: + - alias + type: object + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: object + required: + - endpointCert + type: object + leaderElection: + properties: + electionTick: + default: 10 + format: int32 + type: integer + heartbeatTick: + default: 1 + format: int32 + type: integer + period: + default: 100ms + type: string + transferLeadershipInterval: + default: 1s + type: string + transferLeadershipTimeout: + default: 60s + type: string + type: object + podPlacementPolicy: + default: + name: default + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic podTemplate: properties: controller: @@ -4669,8 +4804,8 @@ spec: type: object mode: enum: - - Standalone - AvailabilityGroup + - RemoteReplica type: string type: object version: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml index 3831f5e6b..204cb1c5f 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml @@ -6871,6 +6871,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -6899,6 +6902,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml index 5905c80f5..39baac9b3 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml @@ -4239,6 +4239,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -4267,6 +4270,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml index bdf30ae4c..cf10d5e00 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml @@ -3082,6 +3082,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3110,6 +3113,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgpools.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgpools.yaml index 952761bc6..df1320d51 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgpools.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgpools.yaml @@ -3782,6 +3782,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3810,6 +3813,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml index 54e9d3339..716915b28 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml @@ -4390,6 +4390,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -4418,6 +4421,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml index b25f2cdff..35ad65011 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml @@ -3058,6 +3058,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3086,6 +3089,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_rabbitmqs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_rabbitmqs.yaml index 4d80a16aa..adaccf401 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_rabbitmqs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_rabbitmqs.yaml @@ -3956,6 +3956,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3984,6 +3987,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml index d96640ee9..29af3b38b 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml @@ -4242,6 +4242,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -4270,6 +4273,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml index 0c74d85e6..33b51829d 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml @@ -11835,6 +11835,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -11863,6 +11866,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_solrs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_solrs.yaml index 6925b2753..11ec7d220 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_solrs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_solrs.yaml @@ -14415,6 +14415,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -14443,6 +14446,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_zookeepers.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_zookeepers.yaml index 75c6c6f97..8ae07021f 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_zookeepers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_zookeepers.yaml @@ -3853,6 +3853,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -3881,6 +3884,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlopsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlopsrequests.yaml new file mode 100644 index 000000000..76e1d703c --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlopsrequests.yaml @@ -0,0 +1,254 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: kubedb + name: mssqlopsrequests.ops.kubedb.com +spec: + group: ops.kubedb.com + names: + categories: + - datastore + - kubedb + - appscode + kind: MSSQLOpsRequest + listKind: MSSQLOpsRequestList + plural: mssqlopsrequests + shortNames: + - msops + singular: mssqlopsrequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.type + name: Type + type: string + - jsonPath: .status.phase + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + apply: + default: IfReady + enum: + - IfReady + - Always + type: string + configuration: + type: object + databaseRef: + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic + horizontalScaling: + type: object + restart: + type: object + timeout: + type: string + tls: + properties: + certificates: + items: + properties: + alias: + type: string + dnsNames: + items: + type: string + type: array + duration: + type: string + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + privateKey: + properties: + encoding: + enum: + - PKCS1 + - PKCS8 + type: string + type: object + renewBefore: + type: string + secretName: + type: string + subject: + properties: + countries: + items: + type: string + type: array + localities: + items: + type: string + type: array + organizationalUnits: + items: + type: string + type: array + organizations: + items: + type: string + type: array + postalCodes: + items: + type: string + type: array + provinces: + items: + type: string + type: array + serialNumber: + type: string + streetAddresses: + items: + type: string + type: array + type: object + uris: + items: + type: string + type: array + required: + - alias + type: object + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + remove: + type: boolean + rotateCertificates: + type: boolean + type: object + type: + enum: + - UpdateVersion + - HorizontalScaling + - VerticalScaling + - VolumeExpansion + - Restart + - Reconfigure + - ReconfigureTLS + type: string + updateVersion: + properties: + targetVersion: + type: string + type: object + verticalScaling: + type: object + volumeExpansion: + type: object + required: + - databaseRef + - type + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + observedGeneration: + format: int64 + type: integer + reason: + type: string + severity: + type: string + status: + type: string + type: + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + format: int64 + type: integer + pausedBackups: + items: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - name + type: object + type: array + phase: + enum: + - Pending + - Progressing + - Successful + - WaitingForApproval + - Failed + - Approved + - Denied + - Skipped + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml index 1a3d12915..05c96399e 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml @@ -132,6 +132,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -160,6 +163,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml index 37216e990..e7e492c29 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml @@ -125,6 +125,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -153,6 +156,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml index ef9c4b2fd..bcf0f8e74 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml @@ -156,6 +156,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -184,6 +187,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml index b9533a0bf..0fbf76998 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml @@ -125,6 +125,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -153,6 +156,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_pgbouncerinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_pgbouncerinsights.yaml index 87670a7b5..1ebf7ec1a 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_pgbouncerinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_pgbouncerinsights.yaml @@ -138,6 +138,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -166,6 +169,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml index e328ce061..8a63fbcc5 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml @@ -133,6 +133,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -161,6 +164,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_proxysqlinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_proxysqlinsights.yaml index f1f19c052..3f92f50a3 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_proxysqlinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_proxysqlinsights.yaml @@ -141,6 +141,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -169,6 +172,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml index a4e68567e..6e375ad6e 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml @@ -125,6 +125,9 @@ spec: ports: items: properties: + backendServicePort: + format: int32 + type: integer name: type: string nodePort: @@ -153,6 +156,22 @@ spec: type: string type: object x-kubernetes-map-type: atomic + port: + properties: + backendServicePort: + format: int32 + type: integer + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object url: type: string required: diff --git a/vendor/modules.txt b/vendor/modules.txt index 54851198c..d4cf7c061 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1004,7 +1004,7 @@ go.mongodb.org/mongo-driver/x/mongo/driver/operation go.mongodb.org/mongo-driver/x/mongo/driver/session go.mongodb.org/mongo-driver/x/mongo/driver/topology go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage -# golang.org/x/crypto v0.19.0 +# golang.org/x/crypto v0.21.0 ## explicit; go 1.18 golang.org/x/crypto/md4 golang.org/x/crypto/ocsp @@ -1013,7 +1013,7 @@ golang.org/x/crypto/scrypt # golang.org/x/exp v0.0.0-20230905200255-921286631fa9 ## explicit; go 1.20 golang.org/x/exp/maps -# golang.org/x/net v0.21.0 +# golang.org/x/net v0.23.0 ## explicit; go 1.18 golang.org/x/net/http/httpguts golang.org/x/net/http2 @@ -1029,12 +1029,12 @@ golang.org/x/oauth2/internal # golang.org/x/sync v0.6.0 ## explicit; go 1.18 golang.org/x/sync/errgroup -# golang.org/x/sys v0.17.0 +# golang.org/x/sys v0.18.0 ## explicit; go 1.18 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.17.0 +# golang.org/x/term v0.18.0 ## explicit; go 1.18 golang.org/x/term # golang.org/x/text v0.14.0 @@ -1447,11 +1447,11 @@ kmodules.xyz/custom-resources/crds # kmodules.xyz/monitoring-agent-api v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/monitoring-agent-api/api/v1 -# kmodules.xyz/offshoot-api v0.29.0 -## explicit; go 1.21.5 +# kmodules.xyz/offshoot-api v0.29.1 +## explicit; go 1.22.0 kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 -# kubedb.dev/apimachinery v0.44.1-0.20240319062303-406611de1d5f +# kubedb.dev/apimachinery v0.44.1-0.20240421070443-e0f277d34347 ## explicit; go 1.22.0 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/catalog