diff --git a/go.mod b/go.mod index f3ddaf5c2..d6b1330ba 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/prometheus/common v0.46.0 github.com/spf13/cobra v1.8.1 golang.org/x/text v0.21.0 - gomodules.xyz/go-sh v0.1.0 + gomodules.xyz/go-sh v0.1.1-0.20250117070215-e08594acad2a gomodules.xyz/logs v0.0.7 gomodules.xyz/pointer v0.1.0 gomodules.xyz/runtime v0.3.0 @@ -29,8 +29,8 @@ require ( kmodules.xyz/client-go v0.30.44 kmodules.xyz/custom-resources v0.30.0 kmodules.xyz/monitoring-agent-api v0.30.2 - kubedb.dev/apimachinery v0.51.0 - kubedb.dev/db-client-go v0.6.0 + kubedb.dev/apimachinery v0.52.0-rc.0 + kubedb.dev/db-client-go v0.7.0-rc.0 kubeops.dev/petset v0.0.7 sigs.k8s.io/controller-runtime v0.18.4 sigs.k8s.io/yaml v1.4.0 @@ -122,7 +122,7 @@ require ( golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/term v0.27.0 // indirect - golang.org/x/time v0.5.0 // indirect + golang.org/x/time v0.6.0 // indirect gomodules.xyz/clock v0.0.0-20200817085942-06523dba733f // indirect gomodules.xyz/encoding v0.0.8 // indirect gomodules.xyz/flags v0.1.3 // indirect @@ -146,10 +146,10 @@ require ( kmodules.xyz/objectstore-api v0.29.1 // indirect kmodules.xyz/offshoot-api v0.30.1 // indirect kmodules.xyz/prober v0.29.0 // indirect - kmodules.xyz/resource-metadata v0.24.1 // indirect + kmodules.xyz/resource-metadata v0.24.3 // indirect kubeops.dev/csi-driver-cacerts v0.1.0 // indirect kubeops.dev/sidekick v0.0.10 // indirect - kubestash.dev/apimachinery v0.15.0 // indirect + kubestash.dev/apimachinery v0.16.0-rc.0 // indirect sigs.k8s.io/gateway-api v1.1.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.17.2 // indirect diff --git a/go.sum b/go.sum index 7bbd16be4..af43cb917 100644 --- a/go.sum +++ b/go.sum @@ -565,8 +565,8 @@ golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -602,8 +602,8 @@ gomodules.xyz/encoding v0.0.8 h1:r2Koq0BJ4HQCCjPTHuti0ItJDXqWJoLRHcm14Ayyp10= gomodules.xyz/encoding v0.0.8/go.mod h1:tn9zeeM1vHMxwVIwJQo7gGfJSCOklnU11tZ+3gSbj08= gomodules.xyz/flags v0.1.3 h1:jQ06+EfmoMv5NvjXvJon03dOhLU+FF0TQMWN7I6qpzs= gomodules.xyz/flags v0.1.3/go.mod h1:e+kvBLnqdEWGG670SKOYag1CXStM2Slrxq01OIK3tFs= -gomodules.xyz/go-sh v0.1.0 h1:1BJAuGREh2RhePt7HRrpmjnkbgfpXlCzc42SiyZ5dkc= -gomodules.xyz/go-sh v0.1.0/go.mod h1:N8IrjNiYppUI/rxENYrWD6FOrSxSyEZnIekPEWM7LP0= +gomodules.xyz/go-sh v0.1.1-0.20250117070215-e08594acad2a h1:Pz5BeoJLbzDpkeVu/YUmfOpaJVq/CoQuZUFl0G5WnVM= +gomodules.xyz/go-sh v0.1.1-0.20250117070215-e08594acad2a/go.mod h1:N8IrjNiYppUI/rxENYrWD6FOrSxSyEZnIekPEWM7LP0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gomodules.xyz/logs v0.0.7 h1:dkhpdQuzj+pOS3S7VaOq+JV7BVU7f68/k3uDYufhPow= @@ -729,20 +729,20 @@ kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g= kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg= kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo= -kmodules.xyz/resource-metadata v0.24.1 h1:l4PmP+zbccPUQmSHKfEmmFLWMXtAHcgaRLWZ3v4WjYM= -kmodules.xyz/resource-metadata v0.24.1/go.mod h1:TIHbYsuqmLl8yhYwV/4Uwwm4CO4GdqGHy1KAOgKhpYY= -kubedb.dev/apimachinery v0.51.0 h1:kkd7P7lfp3qC10E0s78QI99nAdynSfubDU6pBg3nQpk= -kubedb.dev/apimachinery v0.51.0/go.mod h1:MLRK+0bdVef03iqlrT9Jc5Depkb4728LLWL+SmGC1I0= -kubedb.dev/db-client-go v0.6.0 h1:fN6ZYmjlusX7rnS2pLVg0uyAkKtk+LBU7AIvWbTEkw0= -kubedb.dev/db-client-go v0.6.0/go.mod h1:v1OVVO4tYeKHPnPVenDVWttnrm9ZpyULmUK1gTqRK68= +kmodules.xyz/resource-metadata v0.24.3 h1:yGXm6G1YIXru3mgDqDWsCPhGfotT3xBTKy+jd0bpF+E= +kmodules.xyz/resource-metadata v0.24.3/go.mod h1:rPUZSMR0e1Vi+gONQ2ZhOFW+GvUeK+1AI7h9fzTZoKI= +kubedb.dev/apimachinery v0.52.0-rc.0 h1:9DUShkQGjSINbxgj9/mC2/r6GtFZmJuBOc6RrxzCgB8= +kubedb.dev/apimachinery v0.52.0-rc.0/go.mod h1:5v0QfKvvx9/LasI3561/gIzz9Y9gwmvN3Xm94jdzfMI= +kubedb.dev/db-client-go v0.7.0-rc.0 h1:60XiKyCfOPwUmSpNMOJ4LUyBrKmeRMIxLWBD3PAEFe0= +kubedb.dev/db-client-go v0.7.0-rc.0/go.mod h1:qKTBugyuP+wXn49t7dCVwO8n8ikUPZgmKUpKhr9Eocc= kubeops.dev/csi-driver-cacerts v0.1.0 h1:WDgKNo5QAiMoVy4c/4ARWeCXJbqdcXdcn8VLImV4VZU= kubeops.dev/csi-driver-cacerts v0.1.0/go.mod h1:5a/ZOn5LFw26PPBpTKvsivBjcvVArOrJX24C+k+przk= kubeops.dev/petset v0.0.7 h1:F77BTRfUqRVO7kNc8q2oFSSviDmYBqni/osXqu0kgJ4= kubeops.dev/petset v0.0.7/go.mod h1:lt0SZV4ohRy7RiwLNUnMoauG4lCbcRbSqhMg20rdUQg= kubeops.dev/sidekick v0.0.10 h1:/lOT+yV920F6TTPLc7bKR9HLAG/Yx+sTRm1C7rUz744= kubeops.dev/sidekick v0.0.10/go.mod h1:VRyiiKGiJikv/8dNCkrXfkwZCv/2HoIhkmtNurs0gcM= -kubestash.dev/apimachinery v0.15.0 h1:2VX9WrLkJhytGA7tNC0yC4htuYJRT3ZlVMLceZ8PeBs= -kubestash.dev/apimachinery v0.15.0/go.mod h1:5N6yz/zo+0AJNhc+dUbs/R/pUf96GcTx47N1Hlhvc88= +kubestash.dev/apimachinery v0.16.0-rc.0 h1:J4KrLDZ5NTcwaKsWwQhQNsikSMcIGBUBKfF0NkPp03A= +kubestash.dev/apimachinery v0.16.0-rc.0/go.mod h1:JXx3GmrBhYGq2rt5JWsDOyGoyYHGEz07LuNr1GHq/uo= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= diff --git a/vendor/golang.org/x/time/LICENSE b/vendor/golang.org/x/time/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/time/LICENSE +++ b/vendor/golang.org/x/time/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/gomodules.xyz/go-sh/README.md b/vendor/gomodules.xyz/go-sh/README.md index 64c90dcec..7346a3d8d 100644 --- a/vendor/gomodules.xyz/go-sh/README.md +++ b/vendor/gomodules.xyz/go-sh/README.md @@ -25,6 +25,7 @@ These are some of its features: * pipe command * shell build-in commands echo & test * timeout support +* run multiple concurrent leaf commands using a single pipe input Examples are important: @@ -80,6 +81,48 @@ By default, pipeline returns error only if the last command exit with a non-zero By default, pipelines's std-error is set to last command's std-error. However, you can also combine std-errors of all commands into pipeline's std-error using `session.PipeStdErrors = true`. +By default, pipeline returns error only if the last command exit with a non-zero status. However, you can also enable `pipefail` option like `bash`. In that case, pipeline returns error if any of the commands fail and for multiple failed commands, it returns the error of rightmost failed command. + + session := sh.NewSession() + session.PipeFail = true + session.Command("cat", "unknown-file").Command("echo").Run() + + +Designing a Command Chain to Run Multiple Concurrent Leaf Commands Using a Single Pipe Input. + +Features be like: +* **Input Sharing**: All leaf commands take the same input from a pipe. +* **Separate Environments**: Each leaf command runs with its own environment variables. +* **Output Aggregation**: Outputs from all commands are combined into a single result. +* **Error Handling**: Errors are collected and included in the output (e.g., shell or variable). +* **Timeouts**: Each command has same timeout and will apply simultaneously. + +Below is an example of multiple concurrent leaf commands using a single pipe input + + s := sh.NewSession() + s.ShowCMD = true + s.Command("echo", "hello world").LeafCommand("xargs").LeafCommand("xargs") + s.Run() + +Below is an example of each leaf command runs with its own environment variables + + s := sh.NewSession() + s.ShowCMD = true + var args1,args2 []interface{} + + mp := make(map[string]string) + mp["COMPANY_NAME"] = "APPSCODE" + args1 = append(args1, "COMPANY_NAME") + args1 = append(args1, mp) + s.LeafCommand("printenv", args1...) + + mp["COMPANY_NAME"] = "GOOGLE" + args2 = append(args2, "COMPANY_NAME") + args2 = append(args2, mp) + s.LeafCommand("printenv", args2...) + + s.Run() + for more information, it better to see docs. [![Go Walker](http://gowalker.org/api/v1/badge)](http://gowalker.org/gomodules.xyz/go-sh) diff --git a/vendor/gomodules.xyz/go-sh/pipe.go b/vendor/gomodules.xyz/go-sh/pipe.go index e3a22bb78..83e31ed1d 100644 --- a/vendor/gomodules.xyz/go-sh/pipe.go +++ b/vendor/gomodules.xyz/go-sh/pipe.go @@ -7,6 +7,7 @@ import ( "errors" "io" "os" + "os/exec" "strings" "syscall" "time" @@ -17,8 +18,10 @@ var ErrExecTimeout = errors.New("execute timeout") // unmarshal shell output to decode json func (s *Session) UnmarshalJSON(data interface{}) (err error) { bufrw := bytes.NewBuffer(nil) - s.Stdout = bufrw - if err = s.Run(); err != nil { + s.Stdout, s.enableOutputBuffer = bufrw, true + err = s.Run() + err = errors.Join(err, s.writeCmdOutputToStdOut()) + if err != nil { return } return json.NewDecoder(bufrw).Decode(data) @@ -27,8 +30,10 @@ func (s *Session) UnmarshalJSON(data interface{}) (err error) { // unmarshal command output into xml func (s *Session) UnmarshalXML(data interface{}) (err error) { bufrw := bytes.NewBuffer(nil) - s.Stdout = bufrw - if err = s.Run(); err != nil { + s.Stdout, s.enableOutputBuffer = bufrw, true + err = s.Run() + err = errors.Join(err, s.writeCmdOutputToStdOut()) + if err != nil { return } return xml.NewDecoder(bufrw).Decode(data) @@ -37,60 +42,172 @@ func (s *Session) UnmarshalXML(data interface{}) (err error) { // start command func (s *Session) Start() (err error) { s.started = true - var rd *io.PipeReader - var wr *io.PipeWriter - var length = len(s.cmds) if s.ShowCMD { - var cmds = make([]string, 0, 4) - for _, cmd := range s.cmds { - cmds = append(cmds, strings.Join(cmd.Args, " ")) - } - s.writePrompt(strings.Join(cmds, " | ")) + s.displayCommandChain() } - for index, cmd := range s.cmds { - if index == 0 { - cmd.Stdin = s.Stdin - } else { - cmd.Stdin = rd - } - if index != length { - rd, wr = io.Pipe() // create pipe - cmd.Stdout = wr - if s.PipeStdErrors { - cmd.Stderr = s.Stderr - } else { - cmd.Stderr = os.Stderr - } - } - if index == length-1 { - cmd.Stdout = s.Stdout - cmd.Stderr = s.Stderr + + if len(s.cmds) == 0 { + return s.executeLeafCommands(nil) + } + return s.executeCommandChain(0, nil) +} + +func (s *Session) executeCommandChain(index int, stdin *io.PipeReader) error { + if index >= len(s.cmds) { + return nil + } + + pipeReaders, pipeWriters := createPipes(s.determinePipeCount(index)) + + cmd := s.cmds[index] + cmd.Stdin = s.selectCmdStdin(index, stdin) + cmd.Stdout, cmd.Stderr = s.configureCmdOutput(index, pipeWriters) + + s.pipeWriters = append(s.pipeWriters, pipeWriters...) + + if err := cmd.Start(); err != nil { + return err + } + + if s.isLastCommand(index) && len(s.leafCmds) != 0 { + return s.executeLeafCommands(pipeReaders) + } + return s.executeCommandChain(index+1, pipeReaders[0]) +} + +func (s *Session) selectCmdStdin(index int, stdin *io.PipeReader) io.Reader { + if index == 0 { + return s.Stdin + } + return stdin +} + +func (s *Session) configureCmdOutput(index int, pipeWriters []*io.PipeWriter) (io.Writer, io.Writer) { + if s.isLastCommand(index) && len(s.leafCmds) == 0 { + return s.Stdout, s.Stderr + } + + stdout := io.MultiWriter(pipeWritersToWriters(pipeWriters)...) + var stderr io.Writer = os.Stderr + if s.PipeStdErrors { + stderr = s.Stderr + } + + return stdout, stderr +} + +func pipeWritersToWriters(pipeWriters []*io.PipeWriter) []io.Writer { + var writers []io.Writer + for _, writer := range pipeWriters { + writers = append(writers, writer) + } + return writers +} + +func (s *Session) executeLeafCommands(readers []*io.PipeReader) error { + for idx, cmd := range s.leafCmds { + cmd.Stdin = s.selectLeafCmdStdin(idx, readers) + cmd.Stdout = s.selectLeafCmdStdout() + cmd.Stderr = s.selectLeafCmdStderr() + + if err := cmd.Start(); err != nil { + return err } - err = cmd.Start() - if err != nil { - return + } + return nil +} + +func (s *Session) selectLeafCmdStdin(index int, readers []*io.PipeReader) io.Reader { + if readers != nil { + return readers[index] + } + return s.Stdin +} + +func (s *Session) selectLeafCmdStderr() io.Writer { + if s.enableErrsBuffer { + return s.selectLeafCmdStdout() + } + return s.Stderr +} + +func (s *Session) selectLeafCmdStdout() io.Writer { + if s.enableOutputBuffer { + cmdOutput := &bytes.Buffer{} + s.leafOutputBuffer = append(s.leafOutputBuffer, cmdOutput) + return cmdOutput + } + return os.Stdout +} + +func createPipes(count int) ([]*io.PipeReader, []*io.PipeWriter) { + readers := make([]*io.PipeReader, count) + writers := make([]*io.PipeWriter, count) + + for i := 0; i < count; i++ { + r, w := io.Pipe() + readers[i] = r + writers[i] = w + } + + return readers, writers +} + +func (s *Session) determinePipeCount(index int) int { + if s.isLastCommand(index) && len(s.leafCmds) != 0 { + return len(s.leafCmds) + } + return 1 +} + +func (s *Session) isLastCommand(index int) bool { + return index == len(s.cmds)-1 +} + +func (s *Session) displayCommandChain() { + joinCmds := func(cmds []*exec.Cmd) []string { + result := make([]string, len(cmds)) + for i, cmd := range cmds { + result[i] = strings.Join(cmd.Args, " ") } + return result } - return + primaryCmds, leafCmds := joinCmds(s.cmds), joinCmds(s.leafCmds) + + totalCmd := strings.Join(primaryCmds, " | ") + if len(leafCmds) > 0 { + totalCmd += " | " + strings.Join(leafCmds, " , ") + } + + s.writePrompt(totalCmd) } // Should be call after Start() // only catch the last command error func (s *Session) Wait() error { var pipeErr, lastErr error - for _, cmd := range s.cmds { - if lastErr = cmd.Wait(); lastErr != nil { - pipeErr = lastErr + for idx, writter := range s.pipeWriters { + if idx < len(s.cmds) { + cmd := s.cmds[idx] + if lastErr = cmd.Wait(); lastErr != nil { + pipeErr = lastErr + } } - wr, ok := cmd.Stdout.(*io.PipeWriter) - if ok { - wr.Close() + writter.Close() + } + var combineErrs []error + for _, cmd := range s.leafCmds { + if err := cmd.Wait(); err != nil { + combineErrs = append(combineErrs, err) } } + if s.PipeFail { return pipeErr } - return lastErr + + combineErrs = append([]error{pipeErr}, combineErrs...) + return errors.Join(combineErrs...) } func (s *Session) Kill(sig os.Signal) { @@ -136,7 +253,9 @@ func (s *Session) Output() (out []byte, err error) { }() stdout := bytes.NewBuffer(nil) s.Stdout = stdout + s.enableOutputBuffer = true err = s.Run() + err = errors.Join(err, s.writeCmdOutputToStdOut()) out = stdout.Bytes() return } @@ -153,7 +272,10 @@ func (s *Session) WriteStdout(f string) error { } defer out.Close() s.Stdout = out - return s.Run() + s.enableOutputBuffer = true + err = s.Run() + err = errors.Join(err, s.writeCmdOutputToStdOut()) + return err } func (s *Session) AppendStdout(f string) error { @@ -168,7 +290,10 @@ func (s *Session) AppendStdout(f string) error { } defer out.Close() s.Stdout = out - return s.Run() + s.enableOutputBuffer = true + err = s.Run() + err = errors.Join(err, s.writeCmdOutputToStdOut()) + return err } func (s *Session) CombinedOutput() (out []byte, err error) { @@ -182,7 +307,21 @@ func (s *Session) CombinedOutput() (out []byte, err error) { s.Stdout = stdout s.Stderr = stdout + s.enableErrsBuffer = true + s.enableOutputBuffer = true err = s.Run() + err = errors.Join(err, s.writeCmdOutputToStdOut()) out = stdout.Bytes() return } + +func (s *Session) writeCmdOutputToStdOut() error { + var errs []error + for _, buffer := range s.leafOutputBuffer { + _, err := s.Stdout.Write(buffer.Bytes()) + if err != nil { + errs = append(errs, err) + } + } + return errors.Join(errs...) +} diff --git a/vendor/gomodules.xyz/go-sh/sh.go b/vendor/gomodules.xyz/go-sh/sh.go index a78583aff..df159d7c3 100644 --- a/vendor/gomodules.xyz/go-sh/sh.go +++ b/vendor/gomodules.xyz/go-sh/sh.go @@ -28,6 +28,7 @@ Why I love golang so much, because the usage of golang is simple, but the power package sh import ( + "bytes" "fmt" "io" "os" @@ -42,21 +43,28 @@ import ( type Dir string type Session struct { - inj inject.Injector - alias map[string][]string - cmds []*exec.Cmd - dir Dir - started bool - Env map[string]string - Stdin io.Reader - Stdout io.Writer - Stderr io.Writer - ShowCMD bool // enable for debug - timeout time.Duration + inj inject.Injector + alias map[string][]string + cmds []*exec.Cmd + dir Dir + started bool + Env map[string]string + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer + ShowCMD bool // enable for debug + timeout time.Duration + pipeWriters []*io.PipeWriter // List of all pipe writers // additional pipe options PipeFail bool // returns error of rightmost no-zero command PipeStdErrors bool // combine std errors of all pipe commands + + // Options related to leaf commands + leafCmds []*exec.Cmd // List of commands + leafOutputBuffer []*bytes.Buffer // Buffers to store the output of each command + enableOutputBuffer bool // If true, collect all command outputs in buffers + enableErrsBuffer bool // If true, collect all command errors in buffers } func (s *Session) writePrompt(args ...interface{}) { @@ -185,6 +193,9 @@ func (s *Session) appendCmd(cmd string, args []string, cwd Dir, env map[string]s if s.started { s.started = false s.cmds = make([]*exec.Cmd, 0) + s.leafCmds = make([]*exec.Cmd, 0) + s.pipeWriters = make([]*io.PipeWriter, 0) + s.leafOutputBuffer = make([]*bytes.Buffer, 0) } for k, v := range s.Env { if _, ok := env[k]; !ok { @@ -202,3 +213,49 @@ func (s *Session) appendCmd(cmd string, args []string, cwd Dir, env map[string]s c.Dir = string(cwd) s.cmds = append(s.cmds, c) } + +func (s *Session) LeafCommand(name string, a ...interface{}) *Session { + var args = make([]string, 0) + var sType = reflect.TypeOf("") + + // init cmd, args, dir, envs + // if not init, program may panic + s.inj.Map(name).Map(args).Map(s.dir).Map(map[string]string{}) + + for _, v := range a { + switch reflect.TypeOf(v) { + case sType: + args = append(args, v.(string)) + default: + s.inj.Map(v) + } + } + if len(args) != 0 { + s.inj.Map(args) + } + s.inj.Invoke(s.appendLeafCmd) + return s +} + +func (s *Session) appendLeafCmd(cmd string, args []string, cwd Dir, env map[string]string) { + if s.started { + s.started = false + s.leafCmds = make([]*exec.Cmd, 0) + s.pipeWriters = make([]*io.PipeWriter, 0) + } + for k, v := range s.Env { + if _, ok := env[k]; !ok { + env[k] = v + } + } + environ := newEnviron(env, true) // true: inherit sys-env + v, ok := s.alias[cmd] + if ok { + cmd = v[0] + args = append(v[1:], args...) + } + c := exec.Command(cmd, args...) + c.Env = environ + c.Dir = string(cwd) + s.leafCmds = append(s.leafCmds, c) +} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml index 66dc2cb4f..607554959 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml @@ -144,6 +144,158 @@ spec: type: string name: type: string + pods: + items: + properties: + containers: + items: + properties: + name: + type: string + resource: + description: ResourceRequirements describes the compute + resource requirements. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used by + this container. \n This is an alpha field and requires + enabling the DynamicResourceAllocation feature gate. + \n This field is immutable. It can only be set for + containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one + entry in pod.spec.resourceClaims of the Pod + where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. Requests cannot exceed Limits. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: ContainerRestartPolicy is the restart policy + for a single container. This may only be set for init + containers and only allowed value is "Always". + type: string + required: + - name + type: object + type: array + creationTimestamp: + format: date-time + type: string + initContainers: + items: + properties: + name: + type: string + resource: + description: ResourceRequirements describes the compute + resource requirements. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used by + this container. \n This is an alpha field and requires + enabling the DynamicResourceAllocation feature gate. + \n This field is immutable. It can only be set for + containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one + entry in pod.spec.resourceClaims of the Pod + where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. Requests cannot exceed Limits. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: ContainerRestartPolicy is the restart policy + for a single container. This may only be set for init + containers and only allowed value is "Always". + type: string + required: + - name + type: object + type: array + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias + to string. Being a type captures intent and helps make sure + that UIDs and names do not get conflated. + type: string + required: + - name + type: object + type: array replicas: format: int64 type: integer @@ -185,6 +337,52 @@ spec: description: Status type: string type: object + storage: + items: + properties: + creationTimestamp: + format: date-time + type: string + name: + type: string + resources: + description: VolumeResourceRequirements describes the storage + resource requirements for a volume. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias + to string. Being a type captures intent and helps make sure + that UIDs and names do not get conflated. + type: string + required: + - name + type: object + type: array totalResource: description: ResourceRequirements describes the compute resource requirements. properties: diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml index 3f31fc4eb..43aadb917 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml @@ -50,6 +50,10 @@ spec: type: string fieldPath: type: string + filters: + additionalProperties: + type: boolean + type: object icons: items: description: ImageSpec contains information about an image used @@ -300,6 +304,10 @@ spec: type: string fieldPath: type: string + filters: + additionalProperties: + type: boolean + type: object icons: items: description: ImageSpec contains information about @@ -571,6 +579,10 @@ spec: type: string fieldPath: type: string + filters: + additionalProperties: + type: boolean + type: object icons: items: description: ImageSpec contains information about @@ -815,6 +827,10 @@ spec: type: string fieldPath: type: string + filters: + additionalProperties: + type: boolean + type: object icons: items: description: ImageSpec contains information about @@ -1096,6 +1112,10 @@ spec: type: string fieldPath: type: string + filters: + additionalProperties: + type: boolean + type: object icons: items: description: ImageSpec contains information about an image used diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcemanifests.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcemanifests.yaml new file mode 100644 index 000000000..e2c07f279 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcemanifests.yaml @@ -0,0 +1,45 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: resourcemanifests.meta.k8s.appscode.com +spec: + group: meta.k8s.appscode.com + names: + kind: ResourceManifests + listKind: ResourceManifestsList + plural: resourcemanifests + singular: resourcemanifests + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + 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 + kind: + 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 + metadata: + type: object + spec: + properties: + objects: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + required: + - objects + type: object + type: object + served: true + storage: true diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mariadbarchiver_types.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mariadbarchiver_types.go index c39a5f98d..f99e1fedf 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mariadbarchiver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mariadbarchiver_types.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + storageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" ) const ( @@ -72,7 +73,7 @@ type MariaDBArchiverSpec struct { BackupStorage *BackupStorage `json:"backupStorage"` // DeletionPolicy defines the DeletionPolicy for the backup repository // +optional - DeletionPolicy *DeletionPolicy `json:"deletionPolicy"` + DeletionPolicy *storageapi.BackupConfigDeletionPolicy `json:"deletionPolicy"` } // MariaDBArchiverStatus defines the observed state of MariaDBArchiver diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mongodbarchiver_types.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mongodbarchiver_types.go index 91ca2019d..85981a61d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mongodbarchiver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mongodbarchiver_types.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + storageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" ) const ( @@ -72,7 +73,7 @@ type MongoDBArchiverSpec struct { BackupStorage *BackupStorage `json:"backupStorage"` // DeletionPolicy defines the created repository's deletionPolicy // +optional - DeletionPolicy *DeletionPolicy `json:"deletionPolicy"` + DeletionPolicy *storageapi.BackupConfigDeletionPolicy `json:"deletionPolicy"` } // MongoDBArchiverStatus defines the observed state of MongoDBArchiver diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_helpers.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_helpers.go new file mode 100644 index 000000000..98d6cd0af --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_helpers.go @@ -0,0 +1,43 @@ +/* +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 v1alpha1 + +import ( + api "kubedb.dev/apimachinery/apis/kubedb/v1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var _ Accessor = &MSSQLServerArchiver{} + +func (m *MSSQLServerArchiver) GetObjectMeta() metav1.ObjectMeta { + return m.ObjectMeta +} + +func (m *MSSQLServerArchiver) GetConsumers() *api.AllowedConsumers { + return m.Spec.Databases +} + +var _ ListAccessor = MSSQLServerArchiverList{} + +func (l MSSQLServerArchiverList) GetItems() []Accessor { + var accessors []Accessor + for _, item := range l.Items { + accessors = append(accessors, &item) + } + return accessors +} diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_types.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_types.go index 714d6813b..1830a8bc7 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mssqlserverarchiver_types.go @@ -17,10 +17,11 @@ limitations under the License. package v1alpha1 import ( - dbapi "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" + dbapi "kubedb.dev/apimachinery/apis/kubedb/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + storageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" ) const ( @@ -72,7 +73,7 @@ type MSSQLServerArchiverSpec struct { BackupStorage *BackupStorage `json:"backupStorage"` // DeletionPolicy defines the created repository's deletionPolicy // +optional - DeletionPolicy *DeletionPolicy `json:"deletionPolicy"` + DeletionPolicy *storageapi.BackupConfigDeletionPolicy `json:"deletionPolicy"` } // MSSQLServerArchiverStatus defines the observed state of MSSQLServerArchiver diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mysqlarchiver_types.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mysqlarchiver_types.go index 28ade4e10..c0782ee94 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mysqlarchiver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/mysqlarchiver_types.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + storageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" ) const ( @@ -72,7 +73,7 @@ type MySQLArchiverSpec struct { BackupStorage *BackupStorage `json:"backupStorage"` // DeletionPolicy defines the created repository's deletionPolicy // +optional - DeletionPolicy *DeletionPolicy `json:"deletionPolicy"` + DeletionPolicy *storageapi.BackupConfigDeletionPolicy `json:"deletionPolicy"` } // MySQLArchiverStatus defines the observed state of MySQLArchiver diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/openapi_generated.go index 15ed5884d..478db3f2f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/openapi_generated.go @@ -25724,7 +25724,7 @@ func schema_apimachinery_apis_archiver_v1alpha1_MSSQLServerArchiverSpec(ref comm "databases": { SchemaProps: spec.SchemaProps{ Description: "Databases define which MSSQLServer databases are allowed to consume this archiver", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1.AllowedConsumers"), }, }, "pause": { @@ -25781,7 +25781,7 @@ func schema_apimachinery_apis_archiver_v1alpha1_MSSQLServerArchiverSpec(ref comm }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ObjectReference", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.BackupStorage", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.FullBackupOptions", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.LogBackupOptions", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.ManifestBackupOptions", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers"}, + "kmodules.xyz/client-go/api/v1.ObjectReference", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.BackupStorage", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.FullBackupOptions", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.LogBackupOptions", "kubedb.dev/apimachinery/apis/archiver/v1alpha1.ManifestBackupOptions", "kubedb.dev/apimachinery/apis/kubedb/v1.AllowedConsumers"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/postgresarchiver_types.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/postgresarchiver_types.go index b795cc8b7..acd335b50 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/postgresarchiver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/postgresarchiver_types.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + storageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" ) const ( @@ -72,7 +73,7 @@ type PostgresArchiverSpec struct { BackupStorage *BackupStorage `json:"backupStorage"` // DeletionPolicy defines the created repository's deletionPolicy // +optional - DeletionPolicy *DeletionPolicy `json:"deletionPolicy"` + DeletionPolicy *storageapi.BackupConfigDeletionPolicy `json:"deletionPolicy"` } // PostgresArchiverStatus defines the observed state of PostgresArchiver diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/types.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/types.go index c52a23c22..0d4961888 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/types.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/types.go @@ -101,16 +101,6 @@ type BackupStorage struct { SubDir string `json:"subDir,omitempty"` } -// +kubebuilder:validation:Enum=Delete;WipeOut;DoNotDelete -type DeletionPolicy string - -const ( - // Deletes archiver, removes the backup jobs and walg sidecar containers, but keeps the backup data - DeletionPolicyDelete DeletionPolicy = "Delete" - // Deletes everything including the backup data - DeletionPolicyWipeOut DeletionPolicy = "WipeOut" -) - type SchedulerOptions struct { Schedule string `json:"schedule"` // +optional diff --git a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/zz_generated.deepcopy.go index 5554da4f7..539279a2d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/archiver/v1alpha1/zz_generated.deepcopy.go @@ -23,13 +23,13 @@ package v1alpha1 import ( kubedbv1 "kubedb.dev/apimachinery/apis/kubedb/v1" - v1alpha2 "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" v1 "kmodules.xyz/client-go/api/v1" apiv1 "kmodules.xyz/offshoot-api/api/v1" corev1alpha1 "kubestash.dev/apimachinery/apis/core/v1alpha1" + storagev1alpha1 "kubestash.dev/apimachinery/apis/storage/v1alpha1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -230,7 +230,7 @@ func (in *MSSQLServerArchiverSpec) DeepCopyInto(out *MSSQLServerArchiverSpec) { *out = *in if in.Databases != nil { in, out := &in.Databases, &out.Databases - *out = new(v1alpha2.AllowedConsumers) + *out = new(kubedbv1.AllowedConsumers) (*in).DeepCopyInto(*out) } if in.RetentionPolicy != nil { @@ -265,7 +265,7 @@ func (in *MSSQLServerArchiverSpec) DeepCopyInto(out *MSSQLServerArchiverSpec) { } if in.DeletionPolicy != nil { in, out := &in.DeletionPolicy, &out.DeletionPolicy - *out = new(DeletionPolicy) + *out = new(storagev1alpha1.BackupConfigDeletionPolicy) **out = **in } return @@ -444,7 +444,7 @@ func (in *MariaDBArchiverSpec) DeepCopyInto(out *MariaDBArchiverSpec) { } if in.DeletionPolicy != nil { in, out := &in.DeletionPolicy, &out.DeletionPolicy - *out = new(DeletionPolicy) + *out = new(storagev1alpha1.BackupConfigDeletionPolicy) **out = **in } return @@ -582,7 +582,7 @@ func (in *MongoDBArchiverSpec) DeepCopyInto(out *MongoDBArchiverSpec) { } if in.DeletionPolicy != nil { in, out := &in.DeletionPolicy, &out.DeletionPolicy - *out = new(DeletionPolicy) + *out = new(storagev1alpha1.BackupConfigDeletionPolicy) **out = **in } return @@ -720,7 +720,7 @@ func (in *MySQLArchiverSpec) DeepCopyInto(out *MySQLArchiverSpec) { } if in.DeletionPolicy != nil { in, out := &in.DeletionPolicy, &out.DeletionPolicy - *out = new(DeletionPolicy) + *out = new(storagev1alpha1.BackupConfigDeletionPolicy) **out = **in } return @@ -858,7 +858,7 @@ func (in *PostgresArchiverSpec) DeepCopyInto(out *PostgresArchiverSpec) { } if in.DeletionPolicy != nil { in, out := &in.DeletionPolicy, &out.DeletionPolicy - *out = new(DeletionPolicy) + *out = new(storagev1alpha1.BackupConfigDeletionPolicy) **out = **in } return diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mariadb_version_types.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mariadb_version_types.go index f7abbd684..a70ddceb7 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mariadb_version_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mariadb_version_types.go @@ -54,6 +54,9 @@ type MariaDBVersionSpec struct { Version string `json:"version"` // Database Image DB MariaDBVersionDatabase `json:"db"` + // Maxscale Image + // +optional + Maxscale MariaDBVersionMaxscale `json:"maxscale"` // Exporter Image Exporter MariaDBVersionExporter `json:"exporter"` // Coordinator Image @@ -87,6 +90,14 @@ type MariaDBVersionDatabase struct { Image string `json:"image"` } +// MariaDBVersionMaxscale is the mariadb maxscale image +type MariaDBVersionMaxscale struct { + Image string `json:"image"` + // SecurityContext is for the additional config for the maxscale container + // +optional + SecurityContext SecurityContext `json:"securityContext"` +} + // MariaDBVersionExporter is the image for the MariaDB exporter type MariaDBVersionExporter struct { Image string `json:"image"` 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 50e37f5f8..5b01106cd 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go @@ -566,6 +566,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionExporter(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionInitContainer(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionList": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionList(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionMaxscale": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionMaxscale(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionPodSecurityPolicy(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MemcachedVersion": schema_apimachinery_apis_catalog_v1alpha1_MemcachedVersion(ref), @@ -626,6 +627,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionList": schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionList(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionPodSecurityPolicy(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionSpec(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionTLSSpec": schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionTLSSpec(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ProxySQLVersion": schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersion(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ProxySQLVersionExporter": schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersionExporter(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ProxySQLVersionList": schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersionList(ref), @@ -28138,6 +28140,36 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionList(ref common.Ref } } +func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionMaxscale(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MariaDBVersionMaxscale is the mariadb maxscale image", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext is for the additional config for the maxscale container", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"), + }, + }, + }, + Required: []string{"image"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"}, + } +} + func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionPodSecurityPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -28181,6 +28213,13 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.Ref Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase"), }, }, + "maxscale": { + SchemaProps: spec.SchemaProps{ + Description: "Maxscale Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionMaxscale"), + }, + }, "exporter": { SchemaProps: spec.SchemaProps{ Description: "Exporter Image", @@ -28268,7 +28307,7 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.Ref }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "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"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "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.MariaDBVersionMaxscale", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } @@ -30417,6 +30456,12 @@ func schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionSpec(ref common.Re Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresSecurityContext"), }, }, + "tls": { + SchemaProps: spec.SchemaProps{ + Description: "PostgresVersionTLSSpec is used to set postgres version specific tls settings", + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionTLSSpec"), + }, + }, "updateConstraints": { SchemaProps: spec.SchemaProps{ Description: "update constraints", @@ -30455,7 +30500,27 @@ func schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionSpec(ref common.Re }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ArchiverSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionPodSecurityPolicy", "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.ChartInfo", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionTLSSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionTLSSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PostgresVersionTLSSpec is used to set postgres version specific tls settings", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "disableSSLSessionResumption": { + SchemaProps: spec.SchemaProps{ + Description: "DisableSSLSessionResumption determines whether to disable or enable Envoy Session Resumption", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/postgres_version_types.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/postgres_version_types.go index 2846e67ca..2fade65f0 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/postgres_version_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/postgres_version_types.go @@ -74,6 +74,9 @@ type PostgresVersionSpec struct { // SecurityContext is for the additional config for postgres DB container // +optional SecurityContext PostgresSecurityContext `json:"securityContext"` + // PostgresVersionTLSSpec is used to set postgres version specific tls settings + // +optional + TLS *PostgresVersionTLSSpec `json:"tls,omitempty"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` // +optional @@ -110,6 +113,13 @@ type PostgresVersionPodSecurityPolicy struct { DatabasePolicyName string `json:"databasePolicyName"` } +// PostgresVersionTLSSpec is used to set postgres version specific tls settings +type PostgresVersionTLSSpec struct { + // DisableSSLSessionResumption determines whether to disable or enable Envoy Session Resumption + // +optional + DisableSSLSessionResumption bool `json:"disableSSLSessionResumption,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // PostgresVersionList is a list of PostgresVersions 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 8d1ebcb34..d39f4f919 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 @@ -1573,6 +1573,23 @@ func (in *MariaDBVersionList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MariaDBVersionMaxscale) DeepCopyInto(out *MariaDBVersionMaxscale) { + *out = *in + in.SecurityContext.DeepCopyInto(&out.SecurityContext) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariaDBVersionMaxscale. +func (in *MariaDBVersionMaxscale) DeepCopy() *MariaDBVersionMaxscale { + if in == nil { + return nil + } + out := new(MariaDBVersionMaxscale) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MariaDBVersionPodSecurityPolicy) DeepCopyInto(out *MariaDBVersionPodSecurityPolicy) { *out = *in @@ -1593,6 +1610,7 @@ func (in *MariaDBVersionPodSecurityPolicy) DeepCopy() *MariaDBVersionPodSecurity func (in *MariaDBVersionSpec) DeepCopyInto(out *MariaDBVersionSpec) { *out = *in out.DB = in.DB + in.Maxscale.DeepCopyInto(&out.Maxscale) out.Exporter = in.Exporter out.Coordinator = in.Coordinator out.InitContainer = in.InitContainer @@ -2874,6 +2892,11 @@ func (in *PostgresVersionSpec) DeepCopyInto(out *PostgresVersionSpec) { out.PodSecurityPolicies = in.PodSecurityPolicies in.Stash.DeepCopyInto(&out.Stash) in.SecurityContext.DeepCopyInto(&out.SecurityContext) + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(PostgresVersionTLSSpec) + **out = **in + } in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) out.GitSyncer = in.GitSyncer out.Archiver = in.Archiver @@ -2897,6 +2920,22 @@ func (in *PostgresVersionSpec) DeepCopy() *PostgresVersionSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PostgresVersionTLSSpec) DeepCopyInto(out *PostgresVersionTLSSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresVersionTLSSpec. +func (in *PostgresVersionTLSSpec) DeepCopy() *PostgresVersionTLSSpec { + if in == nil { + return nil + } + out := new(PostgresVersionTLSSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxySQLVersion) DeepCopyInto(out *ProxySQLVersion) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/license_constraints_types.go b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/license_constraints_types.go new file mode 100644 index 000000000..822f692a9 --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/license_constraints_types.go @@ -0,0 +1,25 @@ +/* +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 v1alpha1 + +type LicenseRestrictions map[string]Restriction + +type Restriction struct { + VersionConstraint string `json:"versionConstraint"` + // +optional + Distributions []string `json:"distributions,omitempty"` +} diff --git a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go index ccffd7686..067acce1e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go @@ -497,6 +497,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/config/v1alpha1.GaleraArbitratorConfiguration": schema_apimachinery_apis_config_v1alpha1_GaleraArbitratorConfiguration(ref), "kubedb.dev/apimachinery/apis/config/v1alpha1.MongoDBConfiguration": schema_apimachinery_apis_config_v1alpha1_MongoDBConfiguration(ref), "kubedb.dev/apimachinery/apis/config/v1alpha1.RedisConfiguration": schema_apimachinery_apis_config_v1alpha1_RedisConfiguration(ref), + "kubedb.dev/apimachinery/apis/config/v1alpha1.Restriction": schema_apimachinery_apis_config_v1alpha1_Restriction(ref), "kubedb.dev/apimachinery/apis/config/v1alpha1.SinglestoreConfiguration": schema_apimachinery_apis_config_v1alpha1_SinglestoreConfiguration(ref), } } @@ -25573,6 +25574,40 @@ func schema_apimachinery_apis_config_v1alpha1_RedisConfiguration(ref common.Refe } } +func schema_apimachinery_apis_config_v1alpha1_Restriction(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "versionConstraint": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "distributions": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"versionConstraint"}, + }, + }, + } +} + func schema_apimachinery_apis_config_v1alpha1_SinglestoreConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go index 880bee29a..a9ab84da2 100644 --- a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -52,6 +52,28 @@ func (in *GaleraArbitratorConfiguration) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in LicenseRestrictions) DeepCopyInto(out *LicenseRestrictions) { + { + in := &in + *out = make(LicenseRestrictions, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LicenseRestrictions. +func (in LicenseRestrictions) DeepCopy() LicenseRestrictions { + if in == nil { + return nil + } + out := new(LicenseRestrictions) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MongoDBConfiguration) DeepCopyInto(out *MongoDBConfiguration) { *out = *in @@ -116,6 +138,27 @@ func (in *RedisConfiguration) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Restriction) DeepCopyInto(out *Restriction) { + *out = *in + if in.Distributions != nil { + in, out := &in.Distributions, &out.Distributions + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restriction. +func (in *Restriction) DeepCopy() *Restriction { + if in == nil { + return nil + } + out := new(Restriction) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SinglestoreConfiguration) DeepCopyInto(out *SinglestoreConfiguration) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/helpers.go b/vendor/kubedb.dev/apimachinery/apis/helpers.go index 8b87f220e..576695591 100644 --- a/vendor/kubedb.dev/apimachinery/apis/helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/helpers.go @@ -43,10 +43,10 @@ func SetDefaultResourceLimits(req *core.ResourceRequirements, defaultResources c // - return limit // else // - return default + calLimit := func(name core.ResourceName, defaultValue resource.Quantity) resource.Quantity { if r, ok := req.Requests[name]; ok { - // l is greater than r == 1. - if l, exist := req.Limits[name]; exist && l.Cmp(r) == 1 { + if l, exist := req.Limits[name]; exist && l.Cmp(r) > 0 { return l } return r @@ -56,6 +56,7 @@ func SetDefaultResourceLimits(req *core.ResourceRequirements, defaultResources c } return defaultValue } + // if request is not set, // - if limit exists: // - copy limit @@ -64,15 +65,15 @@ func SetDefaultResourceLimits(req *core.ResourceRequirements, defaultResources c // else // - return request // endif - calRequest := func(name core.ResourceName, defaultValue resource.Quantity) resource.Quantity { - if r, ok := req.Requests[name]; !ok { - if l, exist := req.Limits[name]; exist { - return l - } - return defaultValue - } else { + calRequest := func(name core.ResourceName, defaultValue resource.Quantity, originalLimit resource.Quantity) resource.Quantity { + if r, ok := req.Requests[name]; ok { return r } + if originalLimit.Value() > 0 { + // If original Limits existed, use them for Requests + return originalLimit + } + return defaultValue } if req.Limits == nil { @@ -82,13 +83,19 @@ func SetDefaultResourceLimits(req *core.ResourceRequirements, defaultResources c req.Requests = core.ResourceList{} } - // Calculate the limits first + // Store the original Limits to differentiate between newly set and existing values + originalLimits := make(map[core.ResourceName]resource.Quantity) + for l := range req.Limits { + originalLimits[l] = req.Limits[l] + } + + // Calculate limits first for l := range defaultResources.Limits { req.Limits[l] = calLimit(l, defaultResources.Limits[l]) } - // Once the limit is calculated, Calculate requests + // Calculate requests after limits for r := range defaultResources.Requests { - req.Requests[r] = calRequest(r, defaultResources.Requests[r]) + req.Requests[r] = calRequest(r, defaultResources.Requests[r], originalLimits[r]) } } 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 01d6b799c..1593ee83a 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/openapi_generated.go @@ -511,6 +511,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistry": schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistry(ref), "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistryApp": schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistryApp(ref), "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistryList": schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistryList(ref), + "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistryRef": schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistryRef(ref), "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistrySpec": schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistrySpec(ref), "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistryStatus": schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistryStatus(ref), "kubedb.dev/apimachinery/apis/kafka/v1alpha1.connectClusterStatsService": schema_apimachinery_apis_kafka_v1alpha1_connectClusterStatsService(ref), @@ -26043,6 +26044,12 @@ func schema_apimachinery_apis_kafka_v1alpha1_RestProxySpec(ref common.ReferenceC Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), }, }, + "schemaRegistryRef": { + SchemaProps: spec.SchemaProps{ + Description: "SchemaRegistryRef provides a reference to the Schema Registry configuration. the REST Proxy will connect to the Schema Registry if SchemaRegistryRef is provided.", + Ref: ref("kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistryRef"), + }, + }, "serviceTemplates": { SchemaProps: spec.SchemaProps{ Description: "ServiceTemplates is an optional configuration for services used to expose database", @@ -26076,7 +26083,7 @@ func schema_apimachinery_apis_kafka_v1alpha1_RestProxySpec(ref common.ReferenceC }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.NamedServiceTemplateSpec"}, + "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kafka/v1alpha1.SchemaRegistryRef", "kubedb.dev/apimachinery/apis/kubedb/v1.NamedServiceTemplateSpec"}, } } @@ -26238,6 +26245,26 @@ func schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistryList(ref common.Refer } } +func schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistryRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SchemaRegistryRef provides a reference to the Schema Registry configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "internallyManaged": { + SchemaProps: spec.SchemaProps{ + Description: "InternallyManaged true specifies if the schema registry runs internally along with the rest proxy", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_apimachinery_apis_kafka_v1alpha1_SchemaRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_types.go b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_types.go index 8941a850f..7784f7030 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_types.go @@ -70,6 +70,11 @@ type RestProxySpec struct { // +optional PodTemplate ofst.PodTemplateSpec `json:"podTemplate,omitempty"` + // SchemaRegistryRef provides a reference to the Schema Registry configuration. + // the REST Proxy will connect to the Schema Registry if SchemaRegistryRef is provided. + // +optional + SchemaRegistryRef *SchemaRegistryRef `json:"schemaRegistryRef,omitempty"` + // ServiceTemplates is an optional configuration for services used to expose database // +optional ServiceTemplates []dbapi.NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"` @@ -84,6 +89,19 @@ type RestProxySpec struct { HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"` } +// SchemaRegistryRef provides a reference to the Schema Registry configuration. +type SchemaRegistryRef struct { + // Name and namespace of appbinding of schema registry + // If this is provided, the REST Proxy will connect to the Schema Registry + // InternallyManaged must be set to false in this case + // +optional + *kmapi.ObjectReference `json:",omitempty"` + + // InternallyManaged true specifies if the schema registry runs internally along with the rest proxy + // +optional + InternallyManaged bool `json:"internallyManaged,omitempty"` +} + // RestProxyStatus defines the observed state of RestProxy type RestProxyStatus struct { // Specifies the current phase of the database diff --git a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_webhook.go b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_webhook.go index 7568eb19b..d86309f07 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/restproxy_webhook.go @@ -96,6 +96,19 @@ func (k *RestProxy) ValidateCreateOrUpdate() field.ErrorList { return allErr } + if k.Spec.SchemaRegistryRef != nil { + if k.Spec.SchemaRegistryRef.InternallyManaged && k.Spec.SchemaRegistryRef.ObjectReference != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("schemaRegistryRef").Child("objectReference"), + k.Name, + "ObjectReference should be nil when InternallyManaged is true")) + } + if !k.Spec.SchemaRegistryRef.InternallyManaged && k.Spec.SchemaRegistryRef.ObjectReference == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("schemaRegistryRef").Child("objectReference"), + k.Name, + "ObjectReference should not be nil when InternallyManaged is false")) + } + } + if k.Spec.DeletionPolicy == dbapi.DeletionPolicyHalt { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("deletionPolicy"), k.Name, diff --git a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/zz_generated.deepcopy.go index 84e26a739..0264b08b3 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/zz_generated.deepcopy.go @@ -406,6 +406,11 @@ func (in *RestProxySpec) DeepCopyInto(out *RestProxySpec) { **out = **in } in.PodTemplate.DeepCopyInto(&out.PodTemplate) + if in.SchemaRegistryRef != nil { + in, out := &in.SchemaRegistryRef, &out.SchemaRegistryRef + *out = new(SchemaRegistryRef) + (*in).DeepCopyInto(*out) + } if in.ServiceTemplates != nil { in, out := &in.ServiceTemplates, &out.ServiceTemplates *out = make([]kubedbv1.NamedServiceTemplateSpec, len(*in)) @@ -532,6 +537,27 @@ func (in *SchemaRegistryList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryRef) DeepCopyInto(out *SchemaRegistryRef) { + *out = *in + if in.ObjectReference != nil { + in, out := &in.ObjectReference, &out.ObjectReference + *out = new(v1.ObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryRef. +func (in *SchemaRegistryRef) DeepCopy() *SchemaRegistryRef { + if in == nil { + return nil + } + out := new(SchemaRegistryRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SchemaRegistrySpec) DeepCopyInto(out *SchemaRegistrySpec) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go index d72051d08..8b0fb31fb 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go @@ -358,6 +358,23 @@ const ( MariaDBMetricsExporterTLSVolumeName = "metrics-exporter-config" MariaDBMetricsExporterConfigPath = "/etc/mysql/config/exporter" MariaDBDataVolumeName = "data" + DatabasePodPrimaryComponent = "Primary" + DatabasePodMasterComponent = "Master" + DatabasePodSlaveComponent = "Slave" + + // Maxscale + MaxscaleCommonName = "mx" + MaxscaleContainerName = "maxscale" + MaxscaleInitContainerName = "maxscale-init" + MaxscaleServerName = "server" + MaxscaleConfigName = "config" + MaxscaleConfigPath = "/etc/maxscale.cnf.d" + MaxscaleDefaultConfigName = "default-config" + MaxscaleDefaultConfigPath = "/etc/maxscale" + MaxscaleDataVolumeName = "data" + MaxscaleDataVolumePath = "/var/lib/maxscale" + MaxscaleUIPort = 8989 + MaxscaleUIPortName = "ui" // =========================== SingleStore Constants ============================ SinglestoreDatabasePortName = "db" @@ -416,9 +433,12 @@ const ( MSSQLDatabasePortName = "db" MSSQLPrimaryServicePortName = "primary" MSSQLSecondaryServicePortName = "secondary" + MSSQLCoordinatorPortName = "coordinator" + MSSQLCoordinatorClientPortName = "coordinatclient" MSSQLDatabasePort = 1433 MSSQLDatabaseMirroringEndpointPort = 5022 - MSSQLCoordinatorPort = 2381 + MSSQLCoordinatorPort = 2380 + MSSQLCoordinatorClientPort = 2379 MSSQLMonitoringDefaultServicePort = 9399 // environment variables @@ -626,6 +646,7 @@ const ( EnvSkipPasswdEncryption = "PGPOOL_SKIP_PASSWORD_ENCRYPTION" PgpoolConfigSecretMountPath = "/config" PgpoolConfigVolumeName = "pgpool-config" + PgpoolPcpConfigVolumeName = "pgpool-pcp-config" PgpoolContainerName = "pgpool" PgpoolDefaultServicePort = 9999 PgpoolMonitoringDefaultServicePort = 9719 @@ -649,6 +670,9 @@ const ( PgpoolDatabasePortName = "db" PgpoolPcpPortName = "pcp" PgpoolCustomConfigFile = "pgpool.conf" + PgpoolCustomHBAConfigFile = "pool_hba.conf" + PgpoolCustomPCPFile = "pcp.conf" + PGPOOL_INSTALL_DIR = "/opt/pgpool-II" // ========================================== ZooKeeper Constants =================================================// KubeDBZooKeeperRoleName = "kubedb:zookeeper-version-reader" @@ -1691,7 +1715,7 @@ var ( core.ResourceMemory: resource.MustParse("1.5Gi"), }, Limits: core.ResourceList{ - core.ResourceMemory: resource.MustParse("4Gi"), + core.ResourceMemory: resource.MustParse("2Gi"), }, } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_helpers.go index a4138500e..e3c36e1fb 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_helpers.go @@ -58,6 +58,10 @@ func (m MariaDB) OffshootName() string { return m.Name } +func (m MariaDB) OffshootMaxscaleName() string { + return meta_util.NameWithSuffix(m.Name, kubedb.MaxscaleCommonName) +} + func (m MariaDB) OffshootSelectors() map[string]string { return map[string]string{ meta_util.NameLabelKey: m.ResourceFQN(), @@ -66,18 +70,38 @@ func (m MariaDB) OffshootSelectors() map[string]string { } } +func (m MariaDB) OffshootMaxscaleSelectors() map[string]string { + return map[string]string{ + meta_util.NameLabelKey: m.ResourceFQN(), + meta_util.InstanceLabelKey: m.OffshootMaxscaleName(), + meta_util.ManagedByLabelKey: kubedb.GroupName, + } +} + func (m MariaDB) OffshootLabels() map[string]string { return m.offshootLabels(m.OffshootSelectors(), nil) } +func (m MariaDB) OffshootMaxscaleLabels() map[string]string { + return m.offshootLabels(m.OffshootMaxscaleSelectors(), nil) +} + func (m MariaDB) PodLabels() map[string]string { return m.offshootLabels(m.OffshootSelectors(), m.Spec.PodTemplate.Labels) } +func (m MariaDB) MaxscalePodLabels() map[string]string { + return m.offshootLabels(m.OffshootMaxscaleSelectors(), m.Spec.PodTemplate.Labels) +} + func (m MariaDB) PodControllerLabels() map[string]string { return m.offshootLabels(m.OffshootSelectors(), m.Spec.PodTemplate.Controller.Labels) } +func (m MariaDB) MaxscalePodControllerLabels() map[string]string { + return m.offshootLabels(m.OffshootMaxscaleSelectors(), m.Spec.PodTemplate.Controller.Labels) +} + func (m MariaDB) SidekickLabels(skName string) map[string]string { return meta_util.OverwriteKeys(nil, kubedb.CommonSidekickLabels(), map[string]string{ meta_util.InstanceLabelKey: skName, @@ -124,10 +148,26 @@ func (m MariaDB) IsCluster() bool { return pointer.Int32(m.Spec.Replicas) > 1 } +func (m MariaDB) IsGaleraCluster() bool { + return m.Spec.Topology != nil && + m.Spec.Topology.Mode != nil && + *m.Spec.Topology.Mode == MariaDBModeGaleraCluster +} + +func (m MariaDB) IsMariaDBReplication() bool { + return m.Spec.Topology != nil && + m.Spec.Topology.Mode != nil && + *m.Spec.Topology.Mode == MariaDBModeReplication +} + func (m MariaDB) GoverningServiceName() string { return meta_util.NameWithSuffix(m.ServiceName(), "pods") } +func (m MariaDB) MaxscaleGoverningServiceName() string { + return meta_util.NameWithSuffix(m.OffshootMaxscaleName(), "pods") +} + func (m MariaDB) PeerName(idx int) string { return fmt.Sprintf("%s-%d.%s.%s", m.OffshootName(), idx, m.GoverningServiceName(), m.Namespace) } @@ -218,7 +258,11 @@ func (m *MariaDB) SetDefaults(mdVersion *v1alpha1.MariaDBVersion) { if m.Spec.Replicas == nil { m.Spec.Replicas = pointer.Int32P(1) } - + if *m.Spec.Replicas > 1 && m.Spec.Topology == nil { + m.Spec.Topology = &MariaDBTopology{ + Mode: ptr.To(MariaDBModeGaleraCluster), + } + } if m.Spec.PodTemplate.Spec.ServiceAccountName == "" { m.Spec.PodTemplate.Spec.ServiceAccountName = m.OffshootName() } @@ -239,6 +283,30 @@ func (m *MariaDB) SetDefaults(mdVersion *v1alpha1.MariaDBVersion) { m.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsGroup = mdVersion.Spec.SecurityContext.RunAsUser } } + if m.IsCluster() && m.IsMariaDBReplication() { + m.SetDefaultsMaxscale(mdVersion, m.Spec.Topology.MaxScale) + } +} + +func (m *MariaDB) SetDefaultsMaxscale(mdVersion *v1alpha1.MariaDBVersion, maxscale *MaxScaleSpec) { + if maxscale == nil { + return + } + if maxscale.StorageType == "" { + maxscale.StorageType = StorageTypeDurable + } + + if maxscale.Replicas == nil { + maxscale.Replicas = pointer.Int32P(1) + } + if maxscale.PodTemplate.Spec.ServiceAccountName == "" { + maxscale.PodTemplate.Spec.ServiceAccountName = m.OffshootName() + } + if maxscale.EnableUI == nil { + maxscale.EnableUI = pointer.BoolP(true) + } + m.setMaxscaleDefaultContainerSecurityContext(mdVersion, &maxscale.PodTemplate) + m.setMaxscaleDefaultContainerResourceLimits(&maxscale.PodTemplate) } func (m *MariaDB) setDefaultContainerSecurityContext(mdVersion *v1alpha1.MariaDBVersion, podTemplate *ofstv2.PodTemplateSpec) { @@ -291,6 +359,41 @@ func (m *MariaDB) setDefaultContainerSecurityContext(mdVersion *v1alpha1.MariaDB } } +func (m *MariaDB) setMaxscaleDefaultContainerSecurityContext(mdVersion *v1alpha1.MariaDBVersion, podTemplate *ofstv2.PodTemplateSpec) { + if podTemplate == nil { + return + } + if podTemplate.Spec.SecurityContext == nil { + podTemplate.Spec.SecurityContext = &core.PodSecurityContext{} + } + if podTemplate.Spec.SecurityContext.FSGroup == nil { + podTemplate.Spec.SecurityContext.FSGroup = mdVersion.Spec.Maxscale.SecurityContext.RunAsUser + } + dbContainer := core_util.GetContainerByName(podTemplate.Spec.Containers, kubedb.MaxscaleContainerName) + if dbContainer == nil { + dbContainer = &core.Container{ + Name: kubedb.MaxscaleContainerName, + } + } + if dbContainer.SecurityContext == nil { + dbContainer.SecurityContext = &core.SecurityContext{} + } + m.assignMaxscaleDefaultContainerSecurityContext(mdVersion, dbContainer.SecurityContext) + podTemplate.Spec.Containers = core_util.UpsertContainer(podTemplate.Spec.Containers, *dbContainer) + + initContainer := core_util.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.MaxscaleInitContainerName) + if initContainer == nil { + initContainer = &core.Container{ + Name: kubedb.MaxscaleInitContainerName, + } + } + if initContainer.SecurityContext == nil { + initContainer.SecurityContext = &core.SecurityContext{} + } + m.assignMaxscaleDefaultContainerSecurityContext(mdVersion, initContainer.SecurityContext) + podTemplate.Spec.InitContainers = core_util.UpsertContainer(podTemplate.Spec.InitContainers, *initContainer) +} + func (m *MariaDB) assignDefaultContainerSecurityContext(mdVersion *v1alpha1.MariaDBVersion, sc *core.SecurityContext) { if sc.AllowPrivilegeEscalation == nil { sc.AllowPrivilegeEscalation = pointer.BoolP(false) @@ -314,6 +417,29 @@ func (m *MariaDB) assignDefaultContainerSecurityContext(mdVersion *v1alpha1.Mari } } +func (m *MariaDB) assignMaxscaleDefaultContainerSecurityContext(mdVersion *v1alpha1.MariaDBVersion, 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 = mdVersion.Spec.Maxscale.SecurityContext.RunAsUser + } + if sc.RunAsGroup == nil { + sc.RunAsUser = mdVersion.Spec.Maxscale.SecurityContext.RunAsUser + } + if sc.SeccompProfile == nil { + sc.SeccompProfile = secomp.DefaultSeccompProfile() + } +} + func (m *MariaDB) setDefaultContainerResourceLimits(podTemplate *ofstv2.PodTemplateSpec) { dbContainer := core_util.GetContainerByName(podTemplate.Spec.Containers, kubedb.MariaDBContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { @@ -332,6 +458,18 @@ func (m *MariaDB) setDefaultContainerResourceLimits(podTemplate *ofstv2.PodTempl } } +func (m *MariaDB) setMaxscaleDefaultContainerResourceLimits(podTemplate *ofstv2.PodTemplateSpec) { + dbContainer := core_util.GetContainerByName(podTemplate.Spec.Containers, kubedb.MaxscaleCommonName) + if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { + apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResources) + } + + initContainer := core_util.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.MaxscaleInitContainerName) + if initContainer != nil && (initContainer.Resources.Requests == nil && initContainer.Resources.Limits == nil) { + apis.SetDefaultResourceLimits(&initContainer.Resources, kubedb.DefaultInitContainerResource) + } +} + func (m *MariaDB) SetHealthCheckerDefaults() { if m.Spec.HealthChecker.PeriodSeconds == nil { m.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(10) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_types.go index 0d73d58ef..412a99101 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_types.go @@ -31,6 +31,14 @@ const ( ResourcePluralMariaDB = "mariadbs" ) +// +kubebuilder:validation:Enum=MariaDBReplication;GaleraCluster +type MariaDBMode string + +const ( + MariaDBModeReplication MariaDBMode = "MariaDBReplication" + MariaDBModeGaleraCluster MariaDBMode = "GaleraCluster" +) + // MariaDB defines a MariaDB database. // +genclient @@ -62,6 +70,9 @@ type MariaDBSpec struct { // Number of instances to deploy for a MariaDB database. Replicas *int32 `json:"replicas,omitempty"` + // MariaDB cluster topology + Topology *MariaDBTopology `json:"topology,omitempty"` + // StorageType can be durable (default) or ephemeral StorageType StorageType `json:"storageType,omitempty"` @@ -172,3 +183,28 @@ type MariaDBList struct { // Items is a list of MariaDB TPR objects Items []MariaDB `json:"items,omitempty"` } + +type MariaDBTopology struct { + // If set to - + // mode of the topology, possible values MariaDBReplication,GaleraCluster. + // Must be set for topology set up + Mode *MariaDBMode `json:"mode,omitempty"` + // must set for MariaDBReplication mode + // +optional + MaxScale *MaxScaleSpec `json:"maxscale,omitempty"` +} + +type MaxScaleSpec struct { + // Number of instances to deploy for a MariaDB database. + Replicas *int32 `json:"replicas,omitempty"` + // PodTemplate is an optional configuration for pods used to expose database + // +optional + PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"` + // Storage spec to specify how storage shall be used. + Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` + // StorageType can be durable (default) or ephemeral + StorageType StorageType `json:"storageType,omitempty"` + // enable/disable MaxscaleUI + // +optional + EnableUI *bool `json:"enableUI,omitempty"` +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go index 439d95685..f879ba10d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go @@ -523,10 +523,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1.KafkaSpec": schema_apimachinery_apis_kubedb_v1_KafkaSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.KafkaStatus": schema_apimachinery_apis_kubedb_v1_KafkaStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.KernelSettings": schema_apimachinery_apis_kubedb_v1_KernelSettings(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1.ManifestOptions": schema_apimachinery_apis_kubedb_v1_ManifestOptions(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.MariaDB": schema_apimachinery_apis_kubedb_v1_MariaDB(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.MariaDBList": schema_apimachinery_apis_kubedb_v1_MariaDBList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.MariaDBSpec": schema_apimachinery_apis_kubedb_v1_MariaDBSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.MariaDBStatus": schema_apimachinery_apis_kubedb_v1_MariaDBStatus(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1.MariaDBTopology": schema_apimachinery_apis_kubedb_v1_MariaDBTopology(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1.MaxScaleSpec": schema_apimachinery_apis_kubedb_v1_MaxScaleSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.Memcached": schema_apimachinery_apis_kubedb_v1_Memcached(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.MemcachedList": schema_apimachinery_apis_kubedb_v1_MemcachedList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1.MemcachedSpec": schema_apimachinery_apis_kubedb_v1_MemcachedSpec(ref), @@ -25693,12 +25696,18 @@ func schema_apimachinery_apis_kubedb_v1_ArchiverRecovery(ref common.ReferenceCal Format: "", }, }, + "manifestOptions": { + SchemaProps: spec.SchemaProps{ + Description: "ManifestOptions provide options to select particular manifest object to restore", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1.ManifestOptions"), + }, + }, }, Required: []string{"recoveryTimestamp"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kmodules.xyz/client-go/api/v1.ObjectReference"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kmodules.xyz/client-go/api/v1.ObjectReference", "kubedb.dev/apimachinery/apis/kubedb/v1.ManifestOptions"}, } } @@ -27174,6 +27183,40 @@ func schema_apimachinery_apis_kubedb_v1_KernelSettings(ref common.ReferenceCallb } } +func schema_apimachinery_apis_kubedb_v1_ManifestOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "archiver": { + SchemaProps: spec.SchemaProps{ + Description: "Archiver specifies whether to restore the Archiver manifest or not", + Type: []string{"boolean"}, + Format: "", + }, + }, + "archiverRef": { + SchemaProps: spec.SchemaProps{ + Description: "ArchiverRef specifies the new name and namespace of the Archiver yaml after restore", + Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), + }, + }, + "initScript": { + SchemaProps: spec.SchemaProps{ + Description: "InitScript specifies whether to restore the InitScript or not", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.ObjectReference"}, + } +} + func schema_apimachinery_apis_kubedb_v1_MariaDB(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -27296,6 +27339,12 @@ func schema_apimachinery_apis_kubedb_v1_MariaDBSpec(ref common.ReferenceCallback Format: "int32", }, }, + "topology": { + SchemaProps: spec.SchemaProps{ + Description: "MariaDB cluster topology", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1.MariaDBTopology"), + }, + }, "storageType": { SchemaProps: spec.SchemaProps{ Description: "StorageType can be durable (default) or ephemeral", @@ -27412,7 +27461,7 @@ func schema_apimachinery_apis_kubedb_v1_MariaDBSpec(ref common.ReferenceCallback }, }, 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/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.SecretReference"}, + "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/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.MariaDBTopology", "kubedb.dev/apimachinery/apis/kubedb/v1.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.SecretReference"}, } } @@ -27463,6 +27512,81 @@ func schema_apimachinery_apis_kubedb_v1_MariaDBStatus(ref common.ReferenceCallba } } +func schema_apimachinery_apis_kubedb_v1_MariaDBTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "If set to - mode of the topology, possible values MariaDBReplication,GaleraCluster. Must be set for topology set up", + Type: []string{"string"}, + Format: "", + }, + }, + "maxscale": { + SchemaProps: spec.SchemaProps{ + Description: "must set for MariaDBReplication mode", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1.MaxScaleSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1.MaxScaleSpec"}, + } +} + +func schema_apimachinery_apis_kubedb_v1_MaxScaleSpec(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: "Number of instances to deploy for a MariaDB database.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "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/v2.PodTemplateSpec"), + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage spec to specify how storage shall be used.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "storageType": { + SchemaProps: spec.SchemaProps{ + Description: "StorageType can be durable (default) or ephemeral", + Type: []string{"string"}, + Format: "", + }, + }, + "enableUI": { + SchemaProps: spec.SchemaProps{ + Description: "enable/disable MaxscaleUI", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"}, + } +} + func schema_apimachinery_apis_kubedb_v1_Memcached(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go index 60d29ed89..7fa8fc5be 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go @@ -232,8 +232,8 @@ const ( ) // PgBouncerClientAuthMode represents the ClientAuthMode of PgBouncer clusters ( replicaset ) -// We are allowing md5, scram-sha-256, cert as ClientAuthMode -// +kubebuilder:validation:Enum=md5;scram-sha-256;cert; +// We are allowing md5, scram-sha-256 as ClientAuthMode +// +kubebuilder:validation:Enum=md5;scram-sha-256; type PgBouncerClientAuthMode string const ( @@ -248,9 +248,4 @@ const ( // and supports storing passwords on the server in a cryptographically hashed form that is thought to be secure. // This is the most secure of the currently provided methods, but it is not supported by older client libraries. PgBouncerClientAuthModeScram PgBouncerClientAuthMode = "scram-sha-256" - - // ClientAuthModeCert represents `cert clientcert=1` auth mode where client need to provide cert and private key for authentication. - // When server is config with this auth method. Client can't connect with pgbouncer server with password. They need - // to Send the client cert and client key certificate for authentication. - PgBouncerClientAuthModeCert PgBouncerClientAuthMode = "cert" ) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_helpers.go index 747991b51..a58998e96 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_helpers.go @@ -24,6 +24,8 @@ import ( "kubedb.dev/apimachinery/apis/kubedb" "kubedb.dev/apimachinery/crds" + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" promapi "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "gomodules.xyz/pointer" core "k8s.io/api/core/v1" @@ -206,9 +208,31 @@ func (r Redis) StatsServiceLabels() map[string]string { return r.ServiceLabels(StatsServiceAlias, map[string]string{kubedb.LabelRole: kubedb.RoleStats}) } -func (r *Redis) SetDefaults(rdVersion *catalog.RedisVersion) { +func (r *Redis) SetDefaults(rdVersion *catalog.RedisVersion) error { if r == nil { - return + return nil + } + + curVersion, err := semver.NewVersion(rdVersion.Spec.Version) + if err != nil { + return fmt.Errorf("can't get the semvar version from RedisVersion spec. err: %v", err) + } + if curVersion.Major() <= 4 { + r.Spec.DisableAuth = true + } + + if r.Spec.Halted { + if r.Spec.DeletionPolicy == DeletionPolicyDoNotTerminate { + return errors.New(`Can't halt, since termination policy is 'DoNotTerminate'`) + } + r.Spec.DeletionPolicy = DeletionPolicyHalt + } + if r.Spec.DeletionPolicy == "" { + r.Spec.DeletionPolicy = DeletionPolicyDelete + } + + if r.Spec.Replicas == nil && r.Spec.Mode != RedisModeCluster { + r.Spec.Replicas = pointer.Int32P(1) } // perform defaulting @@ -224,13 +248,16 @@ func (r *Redis) SetDefaults(rdVersion *catalog.RedisVersion) { if r.Spec.Cluster.Replicas == nil { r.Spec.Cluster.Replicas = pointer.Int32P(2) } + } else if r.Spec.Mode == RedisModeSentinel { + if r.Spec.SentinelRef != nil && r.Spec.SentinelRef.Namespace == "" { + r.Spec.SentinelRef.Namespace = r.Namespace + } } + if r.Spec.StorageType == "" { r.Spec.StorageType = StorageTypeDurable } - if r.Spec.DeletionPolicy == "" { - r.Spec.DeletionPolicy = DeletionPolicyDelete - } + r.setDefaultContainerSecurityContext(rdVersion, &r.Spec.PodTemplate) r.setDefaultContainerResourceLimits(&r.Spec.PodTemplate) @@ -245,6 +272,7 @@ func (r *Redis) SetDefaults(rdVersion *catalog.RedisVersion) { r.SetTLSDefaults() r.SetHealthCheckerDefaults() + r.Spec.Monitor.SetDefaults() if r.Spec.Monitor != nil && r.Spec.Monitor.Prometheus != nil { if r.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser == nil { @@ -254,6 +282,8 @@ func (r *Redis) SetDefaults(rdVersion *catalog.RedisVersion) { r.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsGroup = rdVersion.Spec.SecurityContext.RunAsUser } } + + return nil } func (r *Redis) SetHealthCheckerDefaults() { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_sentinel_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_sentinel_helpers.go index 0b4774125..47b298796 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_sentinel_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/redis_sentinel_helpers.go @@ -24,6 +24,8 @@ import ( "kubedb.dev/apimachinery/apis/kubedb" "kubedb.dev/apimachinery/crds" + "github.com/Masterminds/semver/v3" + "github.com/pkg/errors" promapi "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "gomodules.xyz/pointer" core "k8s.io/api/core/v1" @@ -181,18 +183,36 @@ func (rs RedisSentinel) StatsServiceLabels() map[string]string { return rs.ServiceLabels(StatsServiceAlias, map[string]string{kubedb.LabelRole: kubedb.RoleStats}) } -func (rs *RedisSentinel) SetDefaults(rdVersion *catalog.RedisVersion) { +func (rs *RedisSentinel) SetDefaults(rdVersion *catalog.RedisVersion) error { if rs == nil { - return + return nil } - if rs.Spec.StorageType == "" { - rs.Spec.StorageType = StorageTypeDurable + curVersion, err := semver.NewVersion(rdVersion.Spec.Version) + if err != nil { + return fmt.Errorf("can't get the semvar version from RedisVersion spec. err: %v", err) + } + if curVersion.Major() <= 4 { + rs.Spec.DisableAuth = true + } + if rs.Spec.Halted { + if rs.Spec.DeletionPolicy == DeletionPolicyDoNotTerminate { + return errors.New(`Can't halt, since termination policy is 'DoNotTerminate'`) + } + rs.Spec.DeletionPolicy = DeletionPolicyHalt } if rs.Spec.DeletionPolicy == "" { rs.Spec.DeletionPolicy = DeletionPolicyDelete } + if rs.Spec.Replicas == nil { + rs.Spec.Replicas = pointer.Int32P(1) + } + + if rs.Spec.StorageType == "" { + rs.Spec.StorageType = StorageTypeDurable + } + rs.setDefaultContainerSecurityContext(rdVersion, &rs.Spec.PodTemplate) rs.setDefaultContainerResourceLimits(&rs.Spec.PodTemplate) @@ -211,6 +231,8 @@ func (rs *RedisSentinel) SetDefaults(rdVersion *catalog.RedisVersion) { rs.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsGroup = rdVersion.Spec.SecurityContext.RunAsUser } } + + return nil } func (rs *RedisSentinel) SetHealthCheckerDefaults() { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/types.go index 3ee92588c..7d49ba131 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/types.go @@ -237,4 +237,24 @@ type ArchiverRecovery struct { // FullDBRepository means db restore + manifest restore FullDBRepository *kmapi.ObjectReference `json:"fullDBRepository,omitempty"` ReplicationStrategy *PITRReplicationStrategy `json:"replicationStrategy,omitempty"` + + // ManifestOptions provide options to select particular manifest object to restore + // +optional + ManifestOptions *ManifestOptions `json:"manifestOptions,omitempty"` +} + +type ManifestOptions struct { + // Archiver specifies whether to restore the Archiver manifest or not + // +kubebuilder:default=false + // +optional + Archiver *bool `json:"archiver,omitempty"` + + // ArchiverRef specifies the new name and namespace of the Archiver yaml after restore + // +optional + ArchiverRef *kmapi.ObjectReference `json:"archiverRef,omitempty"` + + // InitScript specifies whether to restore the InitScript or not + // +kubebuilder:default=false + // +optional + InitScript *bool `json:"initScript,omitempty"` } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/zz_generated.deepcopy.go index 0308843ca..b88468807 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/zz_generated.deepcopy.go @@ -146,6 +146,11 @@ func (in *ArchiverRecovery) DeepCopyInto(out *ArchiverRecovery) { *out = new(PITRReplicationStrategy) **out = **in } + if in.ManifestOptions != nil { + in, out := &in.ManifestOptions, &out.ManifestOptions + *out = new(ManifestOptions) + (*in).DeepCopyInto(*out) + } return } @@ -1018,6 +1023,37 @@ 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 *ManifestOptions) DeepCopyInto(out *ManifestOptions) { + *out = *in + if in.Archiver != nil { + in, out := &in.Archiver, &out.Archiver + *out = new(bool) + **out = **in + } + if in.ArchiverRef != nil { + in, out := &in.ArchiverRef, &out.ArchiverRef + *out = new(apiv1.ObjectReference) + **out = **in + } + if in.InitScript != nil { + in, out := &in.InitScript, &out.InitScript + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestOptions. +func (in *ManifestOptions) DeepCopy() *ManifestOptions { + if in == nil { + return nil + } + out := new(ManifestOptions) + 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 @@ -1088,6 +1124,11 @@ func (in *MariaDBSpec) DeepCopyInto(out *MariaDBSpec) { *out = new(int32) **out = **in } + if in.Topology != nil { + in, out := &in.Topology, &out.Topology + *out = new(MariaDBTopology) + (*in).DeepCopyInto(*out) + } if in.Storage != nil { in, out := &in.Storage, &out.Storage *out = new(corev1.PersistentVolumeClaimSpec) @@ -1178,6 +1219,64 @@ func (in *MariaDBStatus) DeepCopy() *MariaDBStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MariaDBTopology) DeepCopyInto(out *MariaDBTopology) { + *out = *in + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + *out = new(MariaDBMode) + **out = **in + } + if in.MaxScale != nil { + in, out := &in.MaxScale, &out.MaxScale + *out = new(MaxScaleSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariaDBTopology. +func (in *MariaDBTopology) DeepCopy() *MariaDBTopology { + if in == nil { + return nil + } + out := new(MariaDBTopology) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaxScaleSpec) DeepCopyInto(out *MaxScaleSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.PodTemplate.DeepCopyInto(&out.PodTemplate) + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(corev1.PersistentVolumeClaimSpec) + (*in).DeepCopyInto(*out) + } + if in.EnableUI != nil { + in, out := &in.EnableUI, &out.EnableUI + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaxScaleSpec. +func (in *MaxScaleSpec) DeepCopy() *MaxScaleSpec { + if in == nil { + return nil + } + out := new(MaxScaleSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Memcached) DeepCopyInto(out *Memcached) { *out = *in 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 db03e2582..e3a6e3078 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go @@ -803,3 +803,26 @@ func (d *Druid) CertSecretVolumeName(alias DruidCertificateAlias) string { func (d *Druid) CertSecretVolumeMountPath(configDir string, cert string) string { return filepath.Join(configDir, cert) } + +type DruidBind struct { + *Druid +} + +var _ DBBindInterface = &DruidBind{} + +func (d *DruidBind) ServiceNames() (string, string) { + return d.ServiceName(), d.ServiceName() +} + +func (d *DruidBind) Ports() (int, int) { + p := int(d.DruidNodeContainerPort(DruidNodeRoleRouters)) + return p, p +} + +func (d *DruidBind) SecretName() string { + return d.GetAuthSecretName() +} + +func (d *DruidBind) CertSecretName() string { + return d.GetCertSecretName(DruidClientCert) +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go index 9eb763a93..9553a57a8 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go @@ -35,6 +35,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" + "k8s.io/utils/ptr" kmapi "kmodules.xyz/client-go/api/v1" "kmodules.xyz/client-go/apiextensions" coreutil "kmodules.xyz/client-go/core/v1" @@ -383,6 +384,8 @@ func (m *MSSQLServer) SetDefaults() { return } + m.SetArbiterDefault() + m.setDefaultContainerSecurityContext(&mssqlVersion, m.Spec.PodTemplate) m.SetTLSDefaults() @@ -509,6 +512,15 @@ func (m *MSSQLServer) setDefaultContainerResourceLimits(podTemplate *ofst.PodTem } } +func (m *MSSQLServer) SetArbiterDefault() { + if m.IsAvailabilityGroup() && ptr.Deref(m.Spec.Replicas, 0)%2 == 0 && m.Spec.Arbiter == nil { + m.Spec.Arbiter = &ArbiterSpec{ + Resources: core.ResourceRequirements{}, + } + apis.SetDefaultResourceLimits(&m.Spec.Arbiter.Resources, kubedb.DefaultArbiter(false)) + } +} + func (m *MSSQLServer) SetTLSDefaults() { if m.Spec.TLS == nil || m.Spec.TLS.IssuerRef == nil { return diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go index 618748951..d22b0baa7 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go @@ -130,6 +130,10 @@ type MSSQLServerSpec struct { // Archiver controls database backup using Archiver CR // +optional Archiver *Archiver `json:"archiver,omitempty"` + + // Arbiter controls spec for arbiter pods + // +optional + Arbiter *ArbiterSpec `json:"arbiter,omitempty"` } type MSSQLServerTLSConfig struct { 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 3ee030843..839140570 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go @@ -524,6 +524,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DeepStorageSpec": schema_apimachinery_apis_kubedb_v1alpha2_DeepStorageSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Druid": schema_apimachinery_apis_kubedb_v1alpha2_Druid(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidApp": schema_apimachinery_apis_kubedb_v1alpha2_DruidApp(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidBind": schema_apimachinery_apis_kubedb_v1alpha2_DruidBind(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidClusterTopology": schema_apimachinery_apis_kubedb_v1alpha2_DruidClusterTopology(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidDataNode": schema_apimachinery_apis_kubedb_v1alpha2_DruidDataNode(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidList": schema_apimachinery_apis_kubedb_v1alpha2_DruidList(ref), @@ -571,6 +572,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerStatus": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTLSConfig": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerTLSConfig(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTopology": schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerTopology(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ManifestOptions": schema_apimachinery_apis_kubedb_v1alpha2_ManifestOptions(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), @@ -629,6 +631,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLSpec": schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLStatus": schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQ(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQBind": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQBind(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQList": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQSpec": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQStatus": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQStatus(ref), @@ -651,6 +654,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference": schema_apimachinery_apis_kubedb_v1alpha2_SecretReference(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SemiSyncSpec": schema_apimachinery_apis_kubedb_v1alpha2_SemiSyncSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Singlestore": schema_apimachinery_apis_kubedb_v1alpha2_Singlestore(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SinglestoreBind": schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreBind(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SinglestoreList": schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SinglestoreNode": schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreNode(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SinglestoreSpec": schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreSpec(ref), @@ -658,6 +662,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SinglestoreTopology": schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreTopology(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Solr": schema_apimachinery_apis_kubedb_v1alpha2_Solr(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SolrApp": schema_apimachinery_apis_kubedb_v1alpha2_SolrApp(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SolrBind": schema_apimachinery_apis_kubedb_v1alpha2_SolrBind(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SolrClusterTopology": schema_apimachinery_apis_kubedb_v1alpha2_SolrClusterTopology(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SolrList": schema_apimachinery_apis_kubedb_v1alpha2_SolrList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SolrNode": schema_apimachinery_apis_kubedb_v1alpha2_SolrNode(ref), @@ -25785,12 +25790,18 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ArchiverRecovery(ref common.Refere Format: "", }, }, + "manifestOptions": { + SchemaProps: spec.SchemaProps{ + Description: "ManifestOptions provide options to select particular manifest object to restore", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ManifestOptions"), + }, + }, }, Required: []string{"recoveryTimestamp"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kmodules.xyz/client-go/api/v1.ObjectReference"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "kmodules.xyz/client-go/api/v1.ObjectReference", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ManifestOptions"}, } } @@ -26862,6 +26873,26 @@ func schema_apimachinery_apis_kubedb_v1alpha2_DruidApp(ref common.ReferenceCallb } } +func schema_apimachinery_apis_kubedb_v1alpha2_DruidBind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Druid": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Druid"), + }, + }, + }, + Required: []string{"Druid"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Druid"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_DruidClusterTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -29487,12 +29518,18 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerSpec(ref common.Referen Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver"), }, }, + "arbiter": { + SchemaProps: spec.SchemaProps{ + Description: "Arbiter controls spec for arbiter pods", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ArbiterSpec"), + }, + }, }, Required: []string{"version"}, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTLSConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTopology", "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/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ArbiterSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTLSConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -29606,6 +29643,40 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerTopology(ref common.Ref } } +func schema_apimachinery_apis_kubedb_v1alpha2_ManifestOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "archiver": { + SchemaProps: spec.SchemaProps{ + Description: "Archiver specifies whether to restore the Archiver manifest or not", + Type: []string{"boolean"}, + Format: "", + }, + }, + "archiverRef": { + SchemaProps: spec.SchemaProps{ + Description: "ArchiverRef specifies the new name and namespace of the Archiver yaml after restore", + Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), + }, + }, + "initScript": { + SchemaProps: spec.SchemaProps{ + Description: "InitScript specifies whether to restore the InitScript or not", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.ObjectReference"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_MariaDB(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -33101,6 +33172,26 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQ(ref common.ReferenceCallb } } +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQBind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "RabbitMQ": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"), + }, + }, + }, + Required: []string{"RabbitMQ"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -34410,6 +34501,26 @@ func schema_apimachinery_apis_kubedb_v1alpha2_Singlestore(ref common.ReferenceCa } } +func schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreBind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Singlestore": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Singlestore"), + }, + }, + }, + Required: []string{"Singlestore"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Singlestore"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_SinglestoreList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -34758,6 +34869,26 @@ func schema_apimachinery_apis_kubedb_v1alpha2_SolrApp(ref common.ReferenceCallba } } +func schema_apimachinery_apis_kubedb_v1alpha2_SolrBind(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Solr": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Solr"), + }, + }, + }, + Required: []string{"Solr"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Solr"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_SolrClusterTopology(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/pgpool_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/pgpool_helpers.go index 9fc3e1454..2fab05093 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/pgpool_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/pgpool_helpers.go @@ -160,6 +160,10 @@ func (p *Pgpool) GetAuthSecretName() string { return meta_util.NameWithSuffix(p.OffshootName(), "auth") } +func (p *Pgpool) GetPcpConfigSecretName() string { + return meta_util.NameWithSuffix(p.OffshootName(), "pcp-config") +} + func (p *Pgpool) SetHealthCheckerDefaults() { if p.Spec.HealthChecker.PeriodSeconds == nil { p.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(10) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go index dbbf37dd7..89a69881c 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go @@ -188,21 +188,6 @@ type PostgresReplication struct { MaxSlotWALKeepSizeInMegaBytes *int32 `json:"maxSlotWALKeepSize,omitempty"` } -type ArbiterSpec struct { - // Compute Resources required by the sidecar container. - // +optional - Resources core.ResourceRequirements `json:"resources,omitempty"` - // NodeSelector is a selector which must be true for the pod to fit on a node. - // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - // +optional - // +mapType=atomic - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // If specified, the pod's tolerations. - // +optional - Tolerations []core.Toleration `json:"tolerations,omitempty"` -} - // PostgreLeaderElectionConfig contains essential attributes of leader election. type PostgreLeaderElectionConfig struct { // LeaseDuration is the duration in second that non-leader candidates will diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/rabbitmq_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/rabbitmq_helpers.go index ae3ae7808..d61cb0e58 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/rabbitmq_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/rabbitmq_helpers.go @@ -422,3 +422,31 @@ func (r *RabbitMQ) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, expectedItems := 1 return checkReplicasOfPetSet(lister.PetSets(r.Namespace), labels.SelectorFromSet(r.OffshootLabels()), expectedItems) } + +type RabbitMQBind struct { + *RabbitMQ +} + +var _ DBBindInterface = &RabbitMQBind{} + +func (d *RabbitMQBind) ServiceNames() (string, string) { + return d.ServiceName(), d.DashboardServiceName() +} + +func (d *RabbitMQBind) Ports() (int, int) { + dbPort := kubedb.RabbitMQAMQPPort + uiPort := kubedb.RabbitMQManagementUIPort + if d.Spec.TLS != nil { + dbPort = kubedb.RabbitMQAMQPSPort + uiPort = kubedb.RabbitMQManagementUIPortWithSSL + } + return dbPort, uiPort +} + +func (d *RabbitMQBind) SecretName() string { + return d.GetAuthSecretName() +} + +func (d *RabbitMQBind) CertSecretName() string { + return d.GetCertSecretName(RabbitmqClientCert) +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/singlestore_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/singlestore_helpers.go index 617317a65..1702ca52a 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/singlestore_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/singlestore_helpers.go @@ -519,3 +519,25 @@ func (s *Singlestore) ReplicasAreReady(lister pslister.PetSetLister) (bool, stri } return checkReplicasOfPetSet(lister.PetSets(s.Namespace), labels.SelectorFromSet(s.OffshootLabels()), expectedItems) } + +type SinglestoreBind struct { + *Singlestore +} + +var _ DBBindInterface = &SinglestoreBind{} + +func (d *SinglestoreBind) ServiceNames() (string, string) { + return d.ServiceName(), d.ServiceName() +} + +func (d *SinglestoreBind) Ports() (int, int) { + return kubedb.SinglestoreDatabasePort, kubedb.SinglestoreStudioPort +} + +func (d *SinglestoreBind) SecretName() string { + return d.DefaultUserCredSecretName("root") +} + +func (d *SinglestoreBind) CertSecretName() string { + return d.GetCertSecretName(SinglestoreClientCert) +} 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 265e7fb48..c37ccd3b5 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go @@ -518,3 +518,25 @@ func (s *Solr) CertSecretVolumeName(alias SolrCertificateAlias) string { func (s *Solr) CertSecretVolumeMountPath(configDir string, cert string) string { return filepath.Join(configDir, cert) } + +type SolrBind struct { + *Solr +} + +var _ DBBindInterface = &SolrBind{} + +func (d *SolrBind) ServiceNames() (string, string) { + return d.ServiceName(), d.ServiceName() +} + +func (d *SolrBind) Ports() (int, int) { + return kubedb.SolrRestPort, kubedb.SolrRestPort +} + +func (d *SolrBind) SecretName() string { + return d.GetAuthSecretName() +} + +func (d *SolrBind) CertSecretName() string { + return d.GetCertSecretName(SolrClientCert) +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go index 3a8aab79e..c819f353a 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go @@ -254,4 +254,46 @@ type ArchiverRecovery struct { // FullDBRepository means db restore + manifest restore FullDBRepository *kmapi.ObjectReference `json:"fullDBRepository,omitempty"` ReplicationStrategy *PITRReplicationStrategy `json:"replicationStrategy,omitempty"` + + // ManifestOptions provide options to select particular manifest object to restore + // +optional + ManifestOptions *ManifestOptions `json:"manifestOptions,omitempty"` +} + +type ManifestOptions struct { + // Archiver specifies whether to restore the Archiver manifest or not + // +kubebuilder:default=false + // +optional + Archiver *bool `json:"archiver,omitempty"` + + // ArchiverRef specifies the new name and namespace of the Archiver yaml after restore + // +optional + ArchiverRef *kmapi.ObjectReference `json:"archiverRef,omitempty"` + + // InitScript specifies whether to restore the InitScript or not + // +kubebuilder:default=false + // +optional + InitScript *bool `json:"initScript,omitempty"` +} + +type ArbiterSpec struct { + // Compute Resources required by the sidecar container. + // +optional + Resources core.ResourceRequirements `json:"resources,omitempty"` + // NodeSelector is a selector which must be true for the pod to fit on a node. + // Selector which must match a node's labels for the pod to be scheduled on that node. + // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + // +optional + // +mapType=atomic + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // If specified, the pod's tolerations. + // +optional + Tolerations []core.Toleration `json:"tolerations,omitempty"` +} + +type DBBindInterface interface { + ServiceNames() (string, string) // (DBServiceName, UIServiceName) + Ports() (int, int) // (DBPort, UIPort) + SecretName() string + CertSecretName() string } 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 392318a88..5c20fa3fe 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 @@ -147,6 +147,11 @@ func (in *ArchiverRecovery) DeepCopyInto(out *ArchiverRecovery) { *out = new(PITRReplicationStrategy) **out = **in } + if in.ManifestOptions != nil { + in, out := &in.ManifestOptions, &out.ManifestOptions + *out = new(ManifestOptions) + (*in).DeepCopyInto(*out) + } return } @@ -884,6 +889,27 @@ func (in *DruidApp) DeepCopy() *DruidApp { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DruidBind) DeepCopyInto(out *DruidBind) { + *out = *in + if in.Druid != nil { + in, out := &in.Druid, &out.Druid + *out = new(Druid) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DruidBind. +func (in *DruidBind) DeepCopy() *DruidBind { + if in == nil { + return nil + } + out := new(DruidBind) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DruidClusterTopology) DeepCopyInto(out *DruidClusterTopology) { *out = *in @@ -2446,6 +2472,11 @@ func (in *MSSQLServerSpec) DeepCopyInto(out *MSSQLServerSpec) { *out = new(Archiver) **out = **in } + if in.Arbiter != nil { + in, out := &in.Arbiter, &out.Arbiter + *out = new(ArbiterSpec) + (*in).DeepCopyInto(*out) + } return } @@ -2530,6 +2561,37 @@ func (in *MSSQLServerTopology) DeepCopy() *MSSQLServerTopology { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestOptions) DeepCopyInto(out *ManifestOptions) { + *out = *in + if in.Archiver != nil { + in, out := &in.Archiver, &out.Archiver + *out = new(bool) + **out = **in + } + if in.ArchiverRef != nil { + in, out := &in.ArchiverRef, &out.ArchiverRef + *out = new(apiv1.ObjectReference) + **out = **in + } + if in.InitScript != nil { + in, out := &in.InitScript, &out.InitScript + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestOptions. +func (in *ManifestOptions) DeepCopy() *ManifestOptions { + if in == nil { + return nil + } + out := new(ManifestOptions) + 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 @@ -4547,6 +4609,27 @@ func (in *RabbitMQ) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQBind) DeepCopyInto(out *RabbitMQBind) { + *out = *in + if in.RabbitMQ != nil { + in, out := &in.RabbitMQ, &out.RabbitMQ + *out = new(RabbitMQ) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQBind. +func (in *RabbitMQBind) DeepCopy() *RabbitMQBind { + if in == nil { + return nil + } + out := new(RabbitMQBind) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RabbitMQList) DeepCopyInto(out *RabbitMQList) { *out = *in @@ -5220,6 +5303,27 @@ func (in *Singlestore) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SinglestoreBind) DeepCopyInto(out *SinglestoreBind) { + *out = *in + if in.Singlestore != nil { + in, out := &in.Singlestore, &out.Singlestore + *out = new(Singlestore) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SinglestoreBind. +func (in *SinglestoreBind) DeepCopy() *SinglestoreBind { + if in == nil { + return nil + } + out := new(SinglestoreBind) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SinglestoreList) DeepCopyInto(out *SinglestoreList) { *out = *in @@ -5456,6 +5560,27 @@ func (in *SolrApp) DeepCopy() *SolrApp { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SolrBind) DeepCopyInto(out *SolrBind) { + *out = *in + if in.Solr != nil { + in, out := &in.Solr, &out.Solr + *out = new(Solr) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SolrBind. +func (in *SolrBind) DeepCopy() *SolrBind { + if in == nil { + return nil + } + out := new(SolrBind) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SolrClusterTopology) DeepCopyInto(out *SolrClusterTopology) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go index 4ccc60179..0dd262681 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go @@ -220,7 +220,8 @@ const ( // RabbitMQ Constants const ( - UpdateNodePVCs = "UpdateNodePVCs" + UpdateNodePVCs = "UpdateNodePVCs" + EnableAllFeatureFlags = "EnableAllFeatureFlags" ) // MongoDB Constants @@ -358,3 +359,8 @@ const ( UpdatePgBouncerBackendSecret = "UpdateBackendSecret" ConfigSecretDelete = "ConfigSecretDeleted" ) + +// Pgpool Constants +const ( + UpdateConfigSecret = "UpdateConfigSecret" +) diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go index 95fd5fffb..85df45281 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go @@ -622,6 +622,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerOpsRequest": schema_apimachinery_apis_ops_v1alpha1_PgBouncerOpsRequest(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerOpsRequestList": schema_apimachinery_apis_ops_v1alpha1_PgBouncerOpsRequestList(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerOpsRequestSpec": schema_apimachinery_apis_ops_v1alpha1_PgBouncerOpsRequestSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerTLSSpec": schema_apimachinery_apis_ops_v1alpha1_PgBouncerTLSSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerUpdateVersionSpec": schema_apimachinery_apis_ops_v1alpha1_PgBouncerUpdateVersionSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_PgBouncerVerticalScalingSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgpoolCustomConfigurationSpec": schema_apimachinery_apis_ops_v1alpha1_PgpoolCustomConfigurationSpec(ref), @@ -30809,7 +30810,7 @@ func schema_apimachinery_apis_ops_v1alpha1_PgBouncerOpsRequestSpec(ref common.Re "tls": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for configuring TLS", - Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.TLSSpec"), + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerTLSSpec"), }, }, "authentication": { @@ -30842,7 +30843,69 @@ func schema_apimachinery_apis_ops_v1alpha1_PgBouncerOpsRequestSpec(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.AuthSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.TLSSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.AuthSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerTLSSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PgBouncerVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"}, + } +} + +func schema_apimachinery_apis_ops_v1alpha1_PgBouncerTLSSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "issuerRef": { + SchemaProps: spec.SchemaProps{ + Description: "IssuerRef is a reference to a Certificate Issuer.", + Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + }, + }, + "certificates": { + SchemaProps: spec.SchemaProps{ + Description: "Certificate provides server and/or client certificate options used by application pods. These options are passed to a cert-manager Certificate object. xref: https://github.com/jetstack/cert-manager/blob/v0.16.0/pkg/apis/certmanager/v1beta1/types_certificate.go#L82-L162", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.CertificateSpec"), + }, + }, + }, + }, + }, + "rotateCertificates": { + SchemaProps: spec.SchemaProps{ + Description: "RotateCertificates tells operator to initiate certificate rotation", + Type: []string{"boolean"}, + Format: "", + }, + }, + "remove": { + SchemaProps: spec.SchemaProps{ + Description: "Remove tells operator to remove TLS configuration", + Type: []string{"boolean"}, + Format: "", + }, + }, + "sslMode": { + SchemaProps: spec.SchemaProps{ + Description: "SSLMode for both standalone and clusters. [disable;allow;prefer;require;verify-ca;verify-full]", + Type: []string{"string"}, + Format: "", + }, + }, + "clientAuthMode": { + SchemaProps: spec.SchemaProps{ + Description: "ClientAuthMode for sidecar or sharding. (default will be md5. [md5;scram])", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.TypedLocalObjectReference", "kmodules.xyz/client-go/api/v1.CertificateSpec"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types.go index ad4890f4d..a4b0ae417 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types.go @@ -18,6 +18,8 @@ limitations under the License. package v1alpha1 import ( + dbapi "kubedb.dev/apimachinery/apis/kubedb/v1" + core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -63,7 +65,7 @@ type PgBouncerOpsRequestSpec struct { // Specifies information necessary for custom configuration of PgBouncer Configuration *PgBouncerCustomConfigurationSpec `json:"configuration,omitempty"` // Specifies information necessary for configuring TLS - TLS *TLSSpec `json:"tls,omitempty"` + TLS *PgBouncerTLSSpec `json:"tls,omitempty"` // Specifies information necessary for configuring authSecret of the database Authentication *AuthSpec `json:"authentication,omitempty"` // Specifies information necessary for restarting database @@ -75,8 +77,8 @@ type PgBouncerOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } -// +kubebuilder:validation:Enum=HorizontalScaling;VerticalScaling;UpdateVersion;Reconfigure;RotateAuth;Restart -// ENUM(HorizontalScaling, VerticalScaling, UpdateVersion, Reconfigure, RotateAuth, Restart) +// +kubebuilder:validation:Enum=HorizontalScaling;VerticalScaling;UpdateVersion;Reconfigure;RotateAuth;Restart;ReconfigureTLS +// ENUM(HorizontalScaling, VerticalScaling, UpdateVersion, Reconfigure, RotateAuth, Restart, ReconfigureTLS) type PgBouncerOpsRequestType string type PgBouncerUpdateVersionSpec struct { @@ -105,6 +107,18 @@ type PgBouncerCustomConfiguration struct { RemoveCustomConfig bool `json:"removeCustomConfig,omitempty"` } +type PgBouncerTLSSpec struct { + TLSSpec `json:",inline,omitempty"` + + // SSLMode for both standalone and clusters. [disable;allow;prefer;require;verify-ca;verify-full] + // +optional + SSLMode dbapi.PgBouncerSSLMode `json:"sslMode,omitempty"` + + // ClientAuthMode for sidecar or sharding. (default will be md5. [md5;scram]) + // +optional + ClientAuthMode dbapi.PgBouncerClientAuthMode `json:"clientAuthMode,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // PgBouncerOpsRequestList is a list of PgBouncerOpsRequests diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go index 915da9881..76751a48c 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/pgbouncer_ops_types_enum.go @@ -24,6 +24,8 @@ const ( PgBouncerOpsRequestTypeRotateAuth PgBouncerOpsRequestType = "RotateAuth" // PgBouncerOpsRequestTypeRestart is a PgBouncerOpsRequestType of type Restart. PgBouncerOpsRequestTypeRestart PgBouncerOpsRequestType = "Restart" + // PgBouncerOpsRequestTypeReconfigureTLS is a PgBouncerOpsRequestType of type ReconfigureTLS. + PgBouncerOpsRequestTypeReconfigureTLS PgBouncerOpsRequestType = "ReconfigureTLS" ) var ErrInvalidPgBouncerOpsRequestType = fmt.Errorf("not a valid PgBouncerOpsRequestType, try [%s]", strings.Join(_PgBouncerOpsRequestTypeNames, ", ")) @@ -35,6 +37,7 @@ var _PgBouncerOpsRequestTypeNames = []string{ string(PgBouncerOpsRequestTypeReconfigure), string(PgBouncerOpsRequestTypeRotateAuth), string(PgBouncerOpsRequestTypeRestart), + string(PgBouncerOpsRequestTypeReconfigureTLS), } // PgBouncerOpsRequestTypeNames returns a list of possible string values of PgBouncerOpsRequestType. @@ -53,6 +56,7 @@ func PgBouncerOpsRequestTypeValues() []PgBouncerOpsRequestType { PgBouncerOpsRequestTypeReconfigure, PgBouncerOpsRequestTypeRotateAuth, PgBouncerOpsRequestTypeRestart, + PgBouncerOpsRequestTypeReconfigureTLS, } } @@ -75,6 +79,7 @@ var _PgBouncerOpsRequestTypeValue = map[string]PgBouncerOpsRequestType{ "Reconfigure": PgBouncerOpsRequestTypeReconfigure, "RotateAuth": PgBouncerOpsRequestTypeRotateAuth, "Restart": PgBouncerOpsRequestTypeRestart, + "ReconfigureTLS": PgBouncerOpsRequestTypeReconfigureTLS, } // ParsePgBouncerOpsRequestType attempts to convert a string to a PgBouncerOpsRequestType. diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go index 3e720bf22..486797d2f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go @@ -3839,7 +3839,7 @@ func (in *PgBouncerOpsRequestSpec) DeepCopyInto(out *PgBouncerOpsRequestSpec) { } if in.TLS != nil { in, out := &in.TLS, &out.TLS - *out = new(TLSSpec) + *out = new(PgBouncerTLSSpec) (*in).DeepCopyInto(*out) } if in.Authentication != nil { @@ -3870,6 +3870,23 @@ func (in *PgBouncerOpsRequestSpec) DeepCopy() *PgBouncerOpsRequestSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PgBouncerTLSSpec) DeepCopyInto(out *PgBouncerTLSSpec) { + *out = *in + in.TLSSpec.DeepCopyInto(&out.TLSSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PgBouncerTLSSpec. +func (in *PgBouncerTLSSpec) DeepCopy() *PgBouncerTLSSpec { + if in == nil { + return nil + } + out := new(PgBouncerTLSSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PgBouncerUpdateVersionSpec) DeepCopyInto(out *PgBouncerUpdateVersionSpec) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/database_connection_types.go b/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/database_connection_types.go index f62a5d4c7..9112d4248 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/database_connection_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/database_connection_types.go @@ -61,7 +61,6 @@ type DatabaseConnectionSpec struct { // // And some language specific template strings. Like: Java, C#, Go, Python, Javascript, Ruby etc. ConnectOptions map[string]string `json:"connectOptions,omitempty"` - CACert []byte `json:"caCert,omitempty"` } //type ConnectOption struct { @@ -84,6 +83,7 @@ type DatabaseConnectionSpec struct { type GatewayConnection struct { *ofst.Gateway `json:",inline"` SecretRef *kmapi.ObjectReference `json:"secretRef,omitempty"` + CACert []byte `json:"caCert,omitempty"` } type InClusterConnection struct { @@ -93,6 +93,7 @@ type InClusterConnection struct { // Example: kubectl exec -it -n default service/mongo-test1 -c mongodb -- bash -c '' Exec string `json:"exec,omitempty"` SecretRef *kmapi.ObjectReference `json:"secretRef,omitempty"` + CACert []byte `json:"caCert,omitempty"` } // DatabaseConnectionList contains a list of DatabaseConnection diff --git a/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go index c39d5d2db..7b887af50 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go @@ -25696,12 +25696,6 @@ func schema_apimachinery_apis_ui_v1alpha1_DatabaseConnectionSpec(ref common.Refe }, }, }, - "caCert": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, }, }, }, @@ -26445,6 +26439,12 @@ func schema_apimachinery_apis_ui_v1alpha1_GatewayConnection(ref common.Reference Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), }, }, + "caCert": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, }, Required: []string{"name", "namespace"}, }, @@ -26542,6 +26542,12 @@ func schema_apimachinery_apis_ui_v1alpha1_InClusterConnection(ref common.Referen Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), }, }, + "caCert": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "byte", + }, + }, }, }, }, diff --git a/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/zz_generated.deepcopy.go index e9b1c6fcf..7de3b860b 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/ui/v1alpha1/zz_generated.deepcopy.go @@ -112,11 +112,6 @@ func (in *DatabaseConnectionSpec) DeepCopyInto(out *DatabaseConnectionSpec) { (*out)[key] = val } } - if in.CACert != nil { - in, out := &in.CACert, &out.CACert - *out = make([]byte, len(*in)) - copy(*out, *in) - } return } @@ -546,6 +541,11 @@ func (in *GatewayConnection) DeepCopyInto(out *GatewayConnection) { *out = new(apiv1.ObjectReference) **out = **in } + if in.CACert != nil { + in, out := &in.CACert, &out.CACert + *out = make([]byte, len(*in)) + copy(*out, *in) + } return } @@ -621,6 +621,11 @@ func (in *InClusterConnection) DeepCopyInto(out *InClusterConnection) { *out = new(apiv1.ObjectReference) **out = **in } + if in.CACert != nil { + in, out := &in.CACert, &out.CACert + *out = make([]byte, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/elasticsearch.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/elasticsearch.go index 42d42437a..47139c507 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/elasticsearch.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/elasticsearch.go @@ -95,7 +95,6 @@ func TryUpdateElasticsearch(ctx context.Context, c cs.KubedbV1Interface, meta me klog.Errorf("Attempt %d failed to update Elasticsearch %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update Elasticsearch %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateElasticsearchStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of Elasticsearch %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mariadb.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mariadb.go index 7d03268ea..eadd91771 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mariadb.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mariadb.go @@ -95,7 +95,6 @@ func TryUpdateMariaDB(ctx context.Context, c cs.KubedbV1Interface, meta metav1.O klog.Errorf("Attempt %d failed to update MariaDB %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update MariaDB %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateMariaDBStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of MariaDB %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/memcached.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/memcached.go index 458e73df5..83d7d21de 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/memcached.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/memcached.go @@ -95,7 +95,6 @@ func TryUpdateMemcached(ctx context.Context, c cs.KubedbV1Interface, meta metav1 klog.Errorf("Attempt %d failed to update Memcached %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update Memcached %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateMemcachedStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of Memcached %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mongodb.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mongodb.go index 0550f4017..c7e67461d 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mongodb.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mongodb.go @@ -95,7 +95,6 @@ func TryUpdateMongoDB(ctx context.Context, c cs.KubedbV1Interface, meta metav1.O klog.Errorf("Attempt %d failed to update MongoDB %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update MongoDB %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateMongoDBStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of MongoDB %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mysql.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mysql.go index f15660e88..572d5a0c0 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mysql.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/mysql.go @@ -95,7 +95,6 @@ func TryUpdateMySQL(ctx context.Context, c cs.KubedbV1Interface, meta metav1.Obj klog.Errorf("Attempt %d failed to update MySQL %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update MySQL %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateMySQLStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of MySQL %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/perconaxtradb.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/perconaxtradb.go index 7a3a53ccc..f1bc30fef 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/perconaxtradb.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/perconaxtradb.go @@ -95,7 +95,6 @@ func TryUpdatePerconaXtraDB(ctx context.Context, c cs.KubedbV1Interface, meta me klog.Errorf("Attempt %d failed to update PerconaXtraDB %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update PerconaXtraDB %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdatePerconaXtraDBStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of PerconaXtraDB %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/pgbouncer.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/pgbouncer.go index 3e2563d32..b0a45b983 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/pgbouncer.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/pgbouncer.go @@ -95,7 +95,6 @@ func TryUpdatePgBouncer(ctx context.Context, c cs.KubedbV1Interface, meta metav1 klog.Errorf("Attempt %d failed to update PgBouncer %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update PgBouncer %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdatePgBouncerStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of PgBouncer %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/postgres.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/postgres.go index b6a695660..05cc862ae 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/postgres.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/postgres.go @@ -95,7 +95,6 @@ func TryUpdatePostgres(ctx context.Context, c cs.KubedbV1Interface, meta metav1. klog.Errorf("Attempt %d failed to update Postgres %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update Postgres %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdatePostgresStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of Postgres %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/proxysql.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/proxysql.go index ec1b11c3a..a2199254a 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/proxysql.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/proxysql.go @@ -95,7 +95,6 @@ func TryUpdateProxySQL(ctx context.Context, c cs.KubedbV1Interface, meta metav1. klog.Errorf("Attempt %d failed to update ProxySQL %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update ProxySQL %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateProxySQLStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of ProxySQL %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis.go index 6bf79da1b..05b6e6c7d 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis.go @@ -95,7 +95,6 @@ func TryUpdateRedis(ctx context.Context, c cs.KubedbV1Interface, meta metav1.Obj klog.Errorf("Attempt %d failed to update Redis %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update Redis %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateRedisStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of Redis %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis_sentinel.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis_sentinel.go index 6c585063d..b95630207 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis_sentinel.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/kubedb/v1/util/redis_sentinel.go @@ -95,7 +95,6 @@ func TryUpdateRedisSentinel(ctx context.Context, c cs.KubedbV1Interface, meta me klog.Errorf("Attempt %d failed to update Redis Sentinel %s/%s due to %v.", attempt, cur.Namespace, cur.Name, e2) return false, nil }) - if err != nil { err = fmt.Errorf("failed to update Redis Sentinel %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } @@ -148,7 +147,6 @@ func UpdateRedisSentinelStatus( } return e2 == nil, nil }) - if err != nil { err = fmt.Errorf("failed to update status of Redis Sentinel %s/%s after %d attempts due to %v", meta.Namespace, meta.Name, attempt, err) } diff --git a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mariadbarchivers.yaml b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mariadbarchivers.yaml index 909030a77..98a303c53 100644 --- a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mariadbarchivers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mariadbarchivers.yaml @@ -117,7 +117,7 @@ spec: enum: - Delete - WipeOut - - DoNotDelete + - Retain type: string encryptionSecret: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mongodbarchivers.yaml b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mongodbarchivers.yaml index 3ec063d1f..addd3fb97 100644 --- a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mongodbarchivers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mongodbarchivers.yaml @@ -117,7 +117,7 @@ spec: enum: - Delete - WipeOut - - DoNotDelete + - Retain type: string encryptionSecret: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mssqlserverarchivers.yaml b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mssqlserverarchivers.yaml index b1ae37ade..1f044bbb7 100644 --- a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mssqlserverarchivers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mssqlserverarchivers.yaml @@ -117,7 +117,7 @@ spec: enum: - Delete - WipeOut - - DoNotDelete + - Retain type: string encryptionSecret: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mysqlarchivers.yaml b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mysqlarchivers.yaml index 7a19f0aeb..6a33ed240 100644 --- a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mysqlarchivers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_mysqlarchivers.yaml @@ -117,7 +117,7 @@ spec: enum: - Delete - WipeOut - - DoNotDelete + - Retain type: string encryptionSecret: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_postgresarchivers.yaml b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_postgresarchivers.yaml index dc1e42b9b..872b420b3 100644 --- a/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_postgresarchivers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/archiver.kubedb.com_postgresarchivers.yaml @@ -117,7 +117,7 @@ spec: enum: - Delete - WipeOut - - DoNotDelete + - Retain type: string encryptionSecret: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mariadbversions.yaml b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mariadbversions.yaml index a5c1b76f6..506e0635e 100644 --- a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mariadbversions.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_mariadbversions.yaml @@ -141,6 +141,19 @@ spec: required: - image type: object + maxscale: + properties: + image: + type: string + securityContext: + properties: + runAsUser: + format: int64 + type: integer + type: object + required: + - image + type: object podSecurityPolicies: properties: databasePolicyName: diff --git a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_postgresversions.yaml b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_postgresversions.yaml index fe4a99650..61f08ac1f 100644 --- a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_postgresversions.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_postgresversions.yaml @@ -216,6 +216,11 @@ spec: - restoreTask type: object type: object + tls: + properties: + disableSSLSessionResumption: + type: boolean + type: object ui: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kafka.kubedb.com_restproxies.yaml b/vendor/kubedb.dev/apimachinery/crds/kafka.kubedb.com_restproxies.yaml index eb1c9668f..2639b630a 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kafka.kubedb.com_restproxies.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kafka.kubedb.com_restproxies.yaml @@ -3152,6 +3152,17 @@ spec: replicas: format: int32 type: integer + schemaRegistryRef: + properties: + internallyManaged: + type: boolean + name: + type: string + namespace: + type: string + required: + - name + type: object serviceTemplates: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml index 07ba49b0d..fc82f981b 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml @@ -142,6 +142,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml index 813f73f2b..581d0f3f8 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml @@ -134,6 +134,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -39766,6 +39784,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml index 83bb72c7c..293e5de3e 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml @@ -93,6 +93,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml index d0a57fb3f..4d13357d8 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml @@ -212,6 +212,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -4737,251 +4755,3424 @@ spec: type: object x-kubernetes-map-type: atomic type: object - version: - type: string - wsrepSSTMethod: - default: rsync - enum: - - rsync - - mariabackup - type: string - required: - - version - type: object - status: - properties: - authSecret: - properties: - lastUpdateTimestamp: - format: date-time - type: string - type: object - 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 - phase: - enum: - - Provisioning - - DataRestoring - - Ready - - Critical - - NotReady - - Halted - - Unknown - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.version - name: Version - type: string - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha2 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - allowedSchemas: - default: - namespaces: - from: Same + topology: properties: - namespaces: - default: - from: Same + maxscale: properties: - from: - default: Same - enum: - - All - - Selector - - Same - type: string - selector: + enableUI: + type: boolean + podTemplate: properties: - matchExpressions: - items: - properties: - key: + controller: + properties: + annotations: + additionalProperties: type: string - operator: + type: object + labels: + additionalProperties: type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string + type: object type: object - type: object - x-kubernetes-map-type: atomic - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - type: object - archiver: - properties: - pause: - type: boolean - ref: - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - required: - - ref - type: object - authSecret: - properties: - activeFrom: - format: date-time - type: string - externallyManaged: - type: boolean - name: - default: "" - type: string - rotateAfter: - type: string - type: object - x-kubernetes-map-type: atomic - autoOps: - properties: - disabled: - type: boolean - type: object - configSecret: - properties: - name: - default: "" - type: string - type: object - x-kubernetes-map-type: atomic - coordinator: - properties: - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - appArmorProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - capabilities: - properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostUsers: + type: boolean + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + os: + properties: + name: + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + podPlacementPolicy: + default: + name: default + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + type: string + setHostnameAsFQDN: + type: boolean + shareProcessNamespace: + type: boolean + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + generateName: + type: string + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + ownerReferences: + items: + properties: + apiVersion: + type: string + blockOwnerDeletion: + type: boolean + controller: + type: boolean + kind: + type: string + name: + type: string + uid: + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic + type: array + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + type: object + replicas: + format: int32 + type: integer + storage: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + storageType: + enum: + - Durable + - Ephemeral + type: string + type: object + mode: + enum: + - MariaDBReplication + - GaleraCluster + type: string + type: object + version: + type: string + wsrepSSTMethod: + default: rsync + enum: + - rsync + - mariabackup + type: string + required: + - version + type: object + status: + properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object + 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 + phase: + enum: + - Provisioning + - DataRestoring + - Ready + - Critical + - NotReady + - Halted + - Unknown + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.phase + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + allowedSchemas: + default: + namespaces: + from: Same + properties: + namespaces: + default: + from: Same + properties: + from: + default: Same + enum: + - All + - Selector + - Same + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + type: object + archiver: + properties: + pause: + type: boolean + ref: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + required: + - ref + type: object + authSecret: + properties: + activeFrom: + format: date-time + type: string + externallyManaged: + type: boolean + name: + default: "" + type: string + rotateAfter: + type: string + type: object + x-kubernetes-map-type: atomic + autoOps: + properties: + disabled: + type: boolean + type: object + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + coordinator: + properties: + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: add: items: type: string @@ -5085,6 +8276,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml index 8994a5994..4b9fb495e 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml @@ -6474,6 +6474,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -26212,6 +26230,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml index c61e5d671..23801402a 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml @@ -43,6 +43,61 @@ spec: type: object spec: properties: + arbiter: + properties: + nodeSelector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + type: object archiver: properties: pause: @@ -132,6 +187,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml index 54425a75d..6cbc3e7c6 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml @@ -282,6 +282,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -8370,6 +8388,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml index da5c471af..b898ba921 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml @@ -196,6 +196,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -5078,6 +5096,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml index e9e8a9617..3f67e0eaf 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml @@ -80,7 +80,6 @@ spec: enum: - md5 - scram-sha-256 - - cert type: string defaultPoolSize: format: int64 diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml index ccae41078..f52d01514 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml @@ -275,6 +275,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -5296,6 +5314,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml index e0c8bf42d..21a929086 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml @@ -207,6 +207,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: @@ -5080,6 +5098,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml index 8febae831..f059028c2 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_singlestores.yaml @@ -119,6 +119,24 @@ spec: required: - name type: object + manifestOptions: + properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + initScript: + default: false + type: boolean + type: object manifestRepository: properties: name: diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml index 55eabd91f..ce5d91506 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml @@ -183,6 +183,11 @@ spec: - alias type: object type: array + clientAuthMode: + enum: + - md5 + - scram-sha-256 + type: string issuerRef: properties: apiGroup: @@ -200,6 +205,15 @@ spec: type: boolean rotateCertificates: type: boolean + sslMode: + enum: + - disable + - allow + - prefer + - require + - verify-ca + - verify-full + type: string type: object type: enum: @@ -209,6 +223,7 @@ spec: - Reconfigure - RotateAuth - Restart + - ReconfigureTLS type: string updateVersion: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_databaseconnections.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_databaseconnections.yaml index 7af6c25e9..1c70ff8e6 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_databaseconnections.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_databaseconnections.yaml @@ -26,9 +26,6 @@ spec: type: object spec: properties: - caCert: - format: byte - type: string connectOptions: additionalProperties: type: string @@ -40,6 +37,9 @@ spec: gateway: items: properties: + caCert: + format: byte + type: string hostname: type: string ip: @@ -128,6 +128,9 @@ spec: type: array inCluster: properties: + caCert: + format: byte + type: string exec: type: string host: diff --git a/vendor/kubestash.dev/apimachinery/apis/constant.go b/vendor/kubestash.dev/apimachinery/apis/constant.go index 1030dabe8..13f518279 100644 --- a/vendor/kubestash.dev/apimachinery/apis/constant.go +++ b/vendor/kubestash.dev/apimachinery/apis/constant.go @@ -178,17 +178,3 @@ const ( VolumeClone = "volume-clone" ) - -// KubeDB managed databases Kind -const ( - KindMySQL = "MySQL" - KindPostgres = "Postgres" - KindMongoDB = "MongoDB" - KindMariaDB = "MariaDB" - KindRedis = "Redis" - KindMSSQLServer = "MSSQLServer" - KindDruid = "Druid" - KindZooKeeper = "ZooKeeper" - KindSinglestore = "Singlestore" - KindElasticsearch = "Elasticsearch" -) diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go index 44213219b..c6c3ee6bc 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go @@ -285,7 +285,7 @@ type RepositoryInfo struct { // DeletionPolicy specifies what to do when you delete a Repository CR. // +optional - DeletionPolicy v1alpha1.DeletionPolicy `json:"deletionPolicy,omitempty"` + DeletionPolicy v1alpha1.BackupConfigDeletionPolicy `json:"deletionPolicy,omitempty"` } // BackupHooks specifies the hooks that will be executed before and/or after backup diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go index 7e436410d..fd2b78c57 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go @@ -23,6 +23,8 @@ import ( "kmodules.xyz/client-go/apiextensions" cutil "kmodules.xyz/client-go/conditions" meta_util "kmodules.xyz/client-go/meta" + dbapi "kubedb.dev/apimachinery/apis/kubedb/v1" + olddbapi "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" "kubestash.dev/apimachinery/apis" "kubestash.dev/apimachinery/apis/storage/v1alpha1" "kubestash.dev/apimachinery/crds" @@ -239,39 +241,39 @@ func (rs *RestoreSession) getTargetRef(appRef kmapi.TypedObjectReference) *kmapi } switch appRef.Kind { - case apis.KindMySQL: + case dbapi.ResourceKindMySQL: if opt.MySQL != nil { overrideTargetRef(opt.MySQL.DBName, opt.MySQL.RestoreNamespace) } - case apis.KindPostgres: + case dbapi.ResourceKindPostgres: if opt.Postgres != nil { overrideTargetRef(opt.Postgres.DBName, opt.Postgres.RestoreNamespace) } - case apis.KindMongoDB: + case dbapi.ResourceKindMongoDB: if opt.MongoDB != nil { overrideTargetRef(opt.MongoDB.DBName, opt.MongoDB.RestoreNamespace) } - case apis.KindMariaDB: + case dbapi.ResourceKindMariaDB: if opt.MariaDB != nil { overrideTargetRef(opt.MariaDB.DBName, opt.MariaDB.RestoreNamespace) } - case apis.KindRedis: + case dbapi.ResourceKindRedis: if opt.Redis != nil { overrideTargetRef(opt.Redis.DBName, opt.Redis.RestoreNamespace) } - case apis.KindMSSQLServer: + case olddbapi.ResourceKindMSSQLServer: if opt.MSSQLServer != nil { overrideTargetRef(opt.MSSQLServer.DBName, opt.MSSQLServer.RestoreNamespace) } - case apis.KindDruid: + case olddbapi.ResourceKindDruid: if opt.Druid != nil { overrideTargetRef(opt.Druid.DBName, opt.Druid.RestoreNamespace) } - case apis.KindZooKeeper: + case olddbapi.ResourceKindZooKeeper: if opt.ZooKeeper != nil { overrideTargetRef(opt.ZooKeeper.DBName, opt.ZooKeeper.RestoreNamespace) } - case apis.KindSinglestore: + case olddbapi.ResourceKindSinglestore: if opt.Singlestore != nil { overrideTargetRef(opt.Singlestore.DBName, opt.Singlestore.RestoreNamespace) } diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go index ab08d6987..983226a5c 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go @@ -175,6 +175,20 @@ type MSSQLServerManifestOptions struct { // +optional AuthSecretName string `json:"authSecretName,omitempty"` + // InitScript specifies whether to restore the InitScript manifest or not + // +kubebuilder:default=true + // +optional + InitScript *bool `json:"initScript,omitempty"` + + // Archiver specifies whether to restore the Archiver manifest or not + // +kubebuilder:default=false + // +optional + Archiver *bool `json:"archiver,omitempty"` + + // ArchiverRef specifies the new name and namespace of the Archiver yaml after restore + // +optional + ArchiverRef *kmapi.ObjectReference `json:"archiverRef,omitempty"` + // TLSIssuerRef specifies the name of the IssuerRef used for TLS configurations for both client and server. // +optional TLSIssuerRef *core.TypedLocalObjectReference `json:"tlsIssuerRef,omitempty"` @@ -241,6 +255,15 @@ type KubeDBManifestOptions struct { // +optional AuthSecretName string `json:"authSecretName,omitempty"` + // Archiver specifies whether to restore the Archiver manifest or not + // +kubebuilder:default=false + // +optional + Archiver *bool `json:"archiver,omitempty"` + + // ArchiverRef specifies the new name and namespace of the Archiver yaml after restore + // +optional + ArchiverRef *kmapi.ObjectReference `json:"archiverRef,omitempty"` + // ConfigSecret specifies whether to restore the ConfigSecret manifest or not // +kubebuilder:default=true // +optional diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go index c3b15f2ac..cf50812ba 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go @@ -1292,6 +1292,16 @@ func (in *KubeDBManifestOptions) DeepCopyInto(out *KubeDBManifestOptions) { *out = new(bool) **out = **in } + if in.Archiver != nil { + in, out := &in.Archiver, &out.Archiver + *out = new(bool) + **out = **in + } + if in.ArchiverRef != nil { + in, out := &in.ArchiverRef, &out.ArchiverRef + *out = new(v1.ObjectReference) + **out = **in + } if in.ConfigSecret != nil { in, out := &in.ConfigSecret, &out.ConfigSecret *out = new(bool) @@ -1332,6 +1342,21 @@ func (in *MSSQLServerManifestOptions) DeepCopyInto(out *MSSQLServerManifestOptio *out = new(bool) **out = **in } + if in.InitScript != nil { + in, out := &in.InitScript, &out.InitScript + *out = new(bool) + **out = **in + } + if in.Archiver != nil { + in, out := &in.Archiver, &out.Archiver + *out = new(bool) + **out = **in + } + if in.ArchiverRef != nil { + in, out := &in.ArchiverRef, &out.ArchiverRef + *out = new(v1.ObjectReference) + **out = **in + } if in.TLSIssuerRef != nil { in, out := &in.TLSIssuerRef, &out.TLSIssuerRef *out = new(corev1.TypedLocalObjectReference) diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/backupstorage_webhook.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/backupstorage_webhook.go index fdfc3dd36..f8fbf5881 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/backupstorage_webhook.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/backupstorage_webhook.go @@ -27,6 +27,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + "strings" ) // log is for logging in this package. @@ -51,6 +52,22 @@ func (r *BackupStorage) Default() { if r.Spec.UsagePolicy == nil { r.setDefaultUsagePolicy() } + r.removeTrailingSlash() +} + +func (r *BackupStorage) removeTrailingSlash() { + if r.Spec.Storage.S3 != nil { + r.Spec.Storage.S3.Bucket = strings.TrimSuffix(r.Spec.Storage.S3.Bucket, "/") + r.Spec.Storage.S3.Endpoint = strings.TrimSuffix(r.Spec.Storage.S3.Endpoint, "/") + r.Spec.Storage.S3.Prefix = strings.TrimSuffix(r.Spec.Storage.S3.Prefix, "/") + } + if r.Spec.Storage.GCS != nil { + r.Spec.Storage.GCS.Bucket = strings.TrimSuffix(r.Spec.Storage.GCS.Bucket, "/") + r.Spec.Storage.GCS.Prefix = strings.TrimSuffix(r.Spec.Storage.GCS.Prefix, "/") + } + if r.Spec.Storage.Azure != nil { + r.Spec.Storage.Azure.Prefix = strings.TrimSuffix(r.Spec.Storage.Azure.Prefix, "/") + } } // TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation. diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/types.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/types.go index 807ac03de..89743d597 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/types.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/types.go @@ -29,6 +29,15 @@ const ( DeletionPolicyWipeOut DeletionPolicy = "WipeOut" ) +// +kubebuilder:validation:Enum=Delete;WipeOut;Retain +type BackupConfigDeletionPolicy string + +const ( + BackupConfigDeletionPolicyDelete BackupConfigDeletionPolicy = "Delete" + BackupConfigDeletionPolicyWipeOut BackupConfigDeletionPolicy = "WipeOut" + BackupConfigDeletionPolicyRetain BackupConfigDeletionPolicy = "Retain" +) + type StorageProvider string const ( diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml index b2b6c1713..b8cb7c5be 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml @@ -12046,6 +12046,7 @@ spec: enum: - Delete - WipeOut + - Retain type: string directory: type: string diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml index 44c6d11db..b4e557fc9 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml @@ -9358,6 +9358,7 @@ spec: enum: - Delete - WipeOut + - Retain type: string directory: type: string diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml index f6d8d3a52..46cd87545 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml @@ -9360,6 +9360,7 @@ spec: enum: - Delete - WipeOut + - Retain type: string directory: type: string diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml index 7e9e34ece..460ef0827 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml @@ -9368,6 +9368,18 @@ spec: type: object mariaDB: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9404,6 +9416,18 @@ spec: type: object mongoDB: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9440,6 +9464,18 @@ spec: type: object msSQLServer: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9450,6 +9486,9 @@ spec: type: boolean dbName: type: string + initScript: + default: true + type: boolean restoreNamespace: type: string tlsIssuerRef: @@ -9468,6 +9507,18 @@ spec: type: object mySQL: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9504,6 +9555,18 @@ spec: type: object postgres: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9540,6 +9603,18 @@ spec: type: object redis: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9604,6 +9679,18 @@ spec: type: object singlestore: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean @@ -9645,6 +9732,18 @@ spec: type: object zooKeeper: properties: + archiver: + default: false + type: boolean + archiverRef: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object authSecret: default: true type: boolean diff --git a/vendor/modules.txt b/vendor/modules.txt index d6e1e86eb..12984e121 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -985,7 +985,7 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/time v0.5.0 +# golang.org/x/time v0.6.0 ## explicit; go 1.18 golang.org/x/time/rate # gomodules.xyz/clock v0.0.0-20200817085942-06523dba733f @@ -998,7 +998,7 @@ gomodules.xyz/encoding/json/types # gomodules.xyz/flags v0.1.3 ## explicit; go 1.16 gomodules.xyz/flags -# gomodules.xyz/go-sh v0.1.0 +# gomodules.xyz/go-sh v0.1.1-0.20250117070215-e08594acad2a ## explicit; go 1.15 gomodules.xyz/go-sh # gomodules.xyz/jsonpatch/v2 v2.4.0 @@ -1509,12 +1509,12 @@ kmodules.xyz/offshoot-api/util # kmodules.xyz/prober v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/prober/api/v1 -# kmodules.xyz/resource-metadata v0.24.1 +# kmodules.xyz/resource-metadata v0.24.3 ## explicit; go 1.22.1 kmodules.xyz/resource-metadata/apis/node kmodules.xyz/resource-metadata/apis/node/v1alpha1 kmodules.xyz/resource-metadata/crds -# kubedb.dev/apimachinery v0.51.0 +# kubedb.dev/apimachinery v0.52.0-rc.0 ## explicit; go 1.22.1 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/archiver/v1alpha1 @@ -1558,7 +1558,7 @@ kubedb.dev/apimachinery/crds kubedb.dev/apimachinery/pkg/double_optin kubedb.dev/apimachinery/pkg/factory kubedb.dev/apimachinery/pkg/validator -# kubedb.dev/db-client-go v0.6.0 +# kubedb.dev/db-client-go v0.7.0-rc.0 ## explicit; go 1.22.1 kubedb.dev/db-client-go/elasticsearch kubedb.dev/db-client-go/redis @@ -1581,8 +1581,8 @@ kubeops.dev/petset/pkg/features kubeops.dev/sidekick/apis/apps kubeops.dev/sidekick/apis/apps/v1alpha1 kubeops.dev/sidekick/crds -# kubestash.dev/apimachinery v0.15.0 -## explicit; go 1.22.0 +# kubestash.dev/apimachinery v0.16.0-rc.0 +## explicit; go 1.22.1 kubestash.dev/apimachinery/apis kubestash.dev/apimachinery/apis/core/v1alpha1 kubestash.dev/apimachinery/apis/storage/v1alpha1