diff --git a/go.mod b/go.mod index 86b1f7c50..bae2ee62a 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module kubedb.dev/cli -go 1.23.0 +go 1.23.6 -toolchain go1.24.1 +toolchain go1.24.5 require ( github.com/Masterminds/semver/v3 v3.3.1 - github.com/cert-manager/cert-manager v1.17.1 + github.com/cert-manager/cert-manager v1.18.2 github.com/fatih/camelcase v1.0.0 github.com/go-sql-driver/mysql v1.9.0 github.com/prometheus/client_golang v1.20.5 @@ -26,12 +26,12 @@ require ( k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.32.3 kmodules.xyz/cert-manager-util v0.29.0 - kmodules.xyz/client-go v0.32.6 + kmodules.xyz/client-go v0.32.7 kmodules.xyz/custom-resources v0.32.0 - kmodules.xyz/monitoring-agent-api v0.32.0 - kubedb.dev/apimachinery v0.56.0 - kubedb.dev/db-client-go v0.11.0 - kubeops.dev/petset v0.0.10 + kmodules.xyz/monitoring-agent-api v0.32.1 + kubedb.dev/apimachinery v0.57.0-rc.0 + kubedb.dev/db-client-go v0.12.0-rc.0 + kubeops.dev/petset v0.0.11 sigs.k8s.io/controller-runtime v0.20.4 sigs.k8s.io/yaml v1.4.0 stash.appscode.dev/apimachinery v0.39.0 @@ -118,7 +118,7 @@ require ( github.com/zeebo/xxh3 v1.0.2 // indirect go.virtual-secrets.dev/apimachinery v0.0.1 // indirect golang.org/x/net v0.40.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect + golang.org/x/oauth2 v0.28.0 // indirect golang.org/x/sync v0.14.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/term v0.32.0 // indirect @@ -145,10 +145,11 @@ require ( kmodules.xyz/objectstore-api v0.32.0 // indirect kmodules.xyz/offshoot-api v0.32.0 // indirect kmodules.xyz/prober v0.32.0 // indirect - kmodules.xyz/resource-metadata v0.30.1 // indirect + kmodules.xyz/resource-metadata v0.32.1 // indirect kubeops.dev/csi-driver-cacerts v0.1.0 // indirect kubeops.dev/sidekick v0.0.11 // indirect kubestash.dev/apimachinery v0.19.0 // indirect + open-cluster-management.io/api v1.0.0 // indirect sigs.k8s.io/gateway-api v1.1.0 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/kustomize/api v0.18.0 // indirect diff --git a/go.sum b/go.sum index 8d2211ca5..39ef978be 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/cert-manager/cert-manager v1.17.1 h1:Aig+lWMoLsmpGd9TOlTvO4t0Ah3D+/vGB37x/f+ZKt0= -github.com/cert-manager/cert-manager v1.17.1/go.mod h1:zeG4D+AdzqA7hFMNpYCJgcQ2VOfFNBa+Jzm3kAwiDU4= +github.com/cert-manager/cert-manager v1.18.2 h1:H2P75ycGcTMauV3gvpkDqLdS3RSXonWF2S49QGA1PZE= +github.com/cert-manager/cert-manager v1.18.2/go.mod h1:icDJx4kG9BCNpGjBvrmsFd99d+lXUvWdkkcrSSQdIiw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -489,8 +489,8 @@ golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= +golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -690,32 +690,34 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= kmodules.xyz/cert-manager-util v0.29.0 h1:HjEaEsv66xeMKiI8LwfTRls0z9V9L0qEvPBdOcX/CsI= kmodules.xyz/cert-manager-util v0.29.0/go.mod h1:0YuaPwp+P3Pw7Spxf6eDhOCMDDNXfNV2xIuxIexT1QU= -kmodules.xyz/client-go v0.32.6 h1:/V9T0aLfe38PsyF+5FeU5QaC3GcqD8hQoWSCZw/uOpI= -kmodules.xyz/client-go v0.32.6/go.mod h1:ZwLnc7UqEXUNSe43n/SnER6+7YAQCu38L2te6YefoHU= +kmodules.xyz/client-go v0.32.7 h1:vBAbp8vs4coYRhY4wqm1Hw/eBEDiVU238AyMLSoRJ1c= +kmodules.xyz/client-go v0.32.7/go.mod h1:ZwLnc7UqEXUNSe43n/SnER6+7YAQCu38L2te6YefoHU= kmodules.xyz/custom-resources v0.32.0 h1:wzmJTtswO+OmvtqYc70pVoopZyt5UJHKTom4Jh6bfhM= kmodules.xyz/custom-resources v0.32.0/go.mod h1:aLFrfbUKS+AkKtxFYWpPGzuLNarRtGlkHwC07APHba8= -kmodules.xyz/monitoring-agent-api v0.32.0 h1:cMQbWvbTc4JWeLI/zYE0HLefsdFYBzqvATLx16qCzxo= -kmodules.xyz/monitoring-agent-api v0.32.0/go.mod h1:zgRKiJcuK7FOHy0Y1TsONRbJfgnPCs8t4Zh/6Afr+yU= +kmodules.xyz/monitoring-agent-api v0.32.1 h1:F0cm5NJWfgiANw3eiKkXXSXoClMBpAolMXE/N7Xts74= +kmodules.xyz/monitoring-agent-api v0.32.1/go.mod h1:zgRKiJcuK7FOHy0Y1TsONRbJfgnPCs8t4Zh/6Afr+yU= kmodules.xyz/objectstore-api v0.32.0 h1:A45lWKNb+02fJV1Mo4IDIpC1hWvLh/wuHKErovxKmQw= kmodules.xyz/objectstore-api v0.32.0/go.mod h1:N2SXdUU+YjXwG64UATYg+OoFYQ+p2MhX8B5TTKBeTf8= kmodules.xyz/offshoot-api v0.32.0 h1:gogc5scSZe2JoXtZof72UGRl3Tit0kFaFRMkLLT1D8o= kmodules.xyz/offshoot-api v0.32.0/go.mod h1:tled7OxYZ3SkUJcrVFVVYyd+zXjsRSEm1R6Q3k4gcx0= kmodules.xyz/prober v0.32.0 h1:8Z6pFRAu8kP0wwX2BooPCRy2SE6ZkUMHQmZDH5VUEGY= kmodules.xyz/prober v0.32.0/go.mod h1:h0fH4m9DaIwuNZq85zOlWUvBycyy4LvCPMUUhpS3iSE= -kmodules.xyz/resource-metadata v0.30.1 h1:JPxjOfAYj/1VM5FONg90s99LV7ZPHh7ivaavS3Bpkr0= -kmodules.xyz/resource-metadata v0.30.1/go.mod h1:GgA+AL58S2PlukBcnD8P6ILTtIJlp6wVuUyphR67LCY= -kubedb.dev/apimachinery v0.56.0 h1:3vOdnv03sQiDJ17w25gsu+1acAUB5PLq/1oBhEsLuno= -kubedb.dev/apimachinery v0.56.0/go.mod h1:Iw40Vbo63tNqgQA5pTue0WHBvPaxWsJy6MEWfZmACQw= -kubedb.dev/db-client-go v0.11.0 h1:BKa0UyJLfy6MhzHZ3KtQc9X6hbn/DfDH0M33nZ4ROEI= -kubedb.dev/db-client-go v0.11.0/go.mod h1:X2OOySwdSWbK2ulsngXVvjSnmm9w3sN3KPcyU9HVEyw= +kmodules.xyz/resource-metadata v0.32.1 h1:hWQbL0Xb+GaF7qn+rY0CNh7FUfKZw29VBUKTxjHFGYI= +kmodules.xyz/resource-metadata v0.32.1/go.mod h1:wHC24BVzKb1gzkDCSI5l9CXK4AKD5gMamxEqVys50lI= +kubedb.dev/apimachinery v0.57.0-rc.0 h1:dMG7/HFzIR4XqQmvUZ2llcKSezEuNONFvL6h2PXkeVw= +kubedb.dev/apimachinery v0.57.0-rc.0/go.mod h1:JtzH/EKGsg1h5eOuaihY1g+RhpyPBHn+KUsn9or4Z0M= +kubedb.dev/db-client-go v0.12.0-rc.0 h1:iqF9UwgBFxdqput+xca6ZQR1jqzLKTlfPlnm0AJew68= +kubedb.dev/db-client-go v0.12.0-rc.0/go.mod h1:xBnjPQLbZlXd/GLpDBlpLo/DkCJP71jfDLkmplGK6VQ= 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.10 h1:sNaqmHrD9bW7pcrWnwPoiQrKvdRwRX0BaRQc5QA78Bg= -kubeops.dev/petset v0.0.10/go.mod h1:uHL83kggwmtSxdlIfxNbY2isV22iYV6YjADv0y+Z7YA= +kubeops.dev/petset v0.0.11 h1:tlcGhGN+9wMYHXvGkSNz48ziozJFEknWaDj5YUws3kQ= +kubeops.dev/petset v0.0.11/go.mod h1:veOaOzhp1GVKeI1QAV0z6p0WDtCShwkFXiqgxwYNoBo= kubeops.dev/sidekick v0.0.11 h1:OydXdIH6cYSiWxKIWvrywk95WhhHSERkc7RNPOmTekc= kubeops.dev/sidekick v0.0.11/go.mod h1:90KMNmJOPoMKHbrdC1cpEsMx+1KjTea/lHDAbGRDzHc= kubestash.dev/apimachinery v0.19.0 h1:BhsTdZQiUw8MtSFLIQrCSH6a0wm60MJAjiI9iN7vbj0= kubestash.dev/apimachinery v0.19.0/go.mod h1:MJjixUC5fTkNvcWDGDyxgASKjz2yul+ydUMHJkd0rHs= +open-cluster-management.io/api v1.0.0 h1:54QllH9DTudCk6VrGt0q8CDsE3MghqJeTaTN4RHZpE0= +open-cluster-management.io/api v1.0.0/go.mod h1:/OeqXycNBZQoe3WG6ghuWsMgsKGuMZrK8ZpsU6gWL0Y= 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/github.com/cert-manager/cert-manager/LICENSES b/vendor/github.com/cert-manager/cert-manager/LICENSES index 5cf5755c0..c552b7923 100644 --- a/vendor/github.com/cert-manager/cert-manager/LICENSES +++ b/vendor/github.com/cert-manager/cert-manager/LICENSES @@ -39,6 +39,7 @@ github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/clouddns,https://github github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/cloudflare,https://github.com/cert-manager/cert-manager/blob/HEAD/pkg/issuer/acme/dns/cloudflare/LICENSE,MIT github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/route53,https://github.com/cert-manager/cert-manager/blob/HEAD/pkg/issuer/acme/dns/route53/LICENSE,MIT github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util,https://github.com/cert-manager/cert-manager/blob/HEAD/pkg/issuer/acme/dns/util/LICENSE,MIT +github.com/cert-manager/cert-manager/third_party/forked/acme,https://github.com/cert-manager/cert-manager/blob/HEAD/third_party/forked/acme/LICENSE,BSD-3-Clause github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.3.0/LICENSE.txt,MIT github.com/coreos/go-semver/semver,https://github.com/coreos/go-semver/blob/v0.3.1/LICENSE,Apache-2.0 github.com/coreos/go-systemd/v22,https://github.com/coreos/go-systemd/blob/v22.5.0/LICENSE,Apache-2.0 @@ -53,8 +54,8 @@ github.com/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/v1.8.0/LI github.com/fxamacker/cbor/v2,https://github.com/fxamacker/cbor/blob/v2.7.0/LICENSE,MIT github.com/go-asn1-ber/asn1-ber,https://github.com/go-asn1-ber/asn1-ber/blob/v1.5.6/LICENSE,MIT github.com/go-http-utils/headers,https://github.com/go-http-utils/headers/blob/fed159eddc2a/LICENSE,MIT -github.com/go-jose/go-jose/v4,https://github.com/go-jose/go-jose/blob/v4.0.2/LICENSE,Apache-2.0 -github.com/go-jose/go-jose/v4/json,https://github.com/go-jose/go-jose/blob/v4.0.2/json/LICENSE,BSD-3-Clause +github.com/go-jose/go-jose/v4,https://github.com/go-jose/go-jose/blob/v4.0.5/LICENSE,Apache-2.0 +github.com/go-jose/go-jose/v4/json,https://github.com/go-jose/go-jose/blob/v4.0.5/json/LICENSE,BSD-3-Clause github.com/go-ldap/ldap/v3,https://github.com/go-ldap/ldap/blob/v3.4.8/v3/LICENSE,MIT github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.2/LICENSE,Apache-2.0 github.com/go-logr/stdr,https://github.com/go-logr/stdr/blob/v1.2.2/LICENSE,Apache-2.0 @@ -63,7 +64,7 @@ github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.21.0/LICENSE,Apache-2.0 github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.23.0/LICENSE,Apache-2.0 github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause -github.com/golang-jwt/jwt/v5,https://github.com/golang-jwt/jwt/blob/v5.2.1/LICENSE,MIT +github.com/golang-jwt/jwt/v5,https://github.com/golang-jwt/jwt/blob/v5.2.2/LICENSE,MIT github.com/golang/groupcache/lru,https://github.com/golang/groupcache/blob/41bb18bfe9da/LICENSE,Apache-2.0 github.com/golang/protobuf/proto,https://github.com/golang/protobuf/blob/v1.5.4/LICENSE,BSD-3-Clause github.com/golang/snappy,https://github.com/golang/snappy/blob/v0.0.4/LICENSE,BSD-3-Clause @@ -146,14 +147,14 @@ go.opentelemetry.io/otel/trace,https://github.com/open-telemetry/opentelemetry-g go.opentelemetry.io/proto/otlp,https://github.com/open-telemetry/opentelemetry-proto-go/blob/otlp/v1.4.0/otlp/LICENSE,Apache-2.0 go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.11.0/LICENSE.txt,MIT go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.27.0/LICENSE,MIT -golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.31.0:LICENSE,BSD-3-Clause +golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.38.0:LICENSE,BSD-3-Clause golang.org/x/exp,https://cs.opensource.google/go/x/exp/+/b2144cdd:LICENSE,BSD-3-Clause -golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.33.0:LICENSE,BSD-3-Clause -golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.24.0:LICENSE,BSD-3-Clause -golang.org/x/sync,https://cs.opensource.google/go/x/sync/+/v0.10.0:LICENSE,BSD-3-Clause -golang.org/x/sys,https://cs.opensource.google/go/x/sys/+/v0.28.0:LICENSE,BSD-3-Clause -golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.27.0:LICENSE,BSD-3-Clause -golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.21.0:LICENSE,BSD-3-Clause +golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.38.0:LICENSE,BSD-3-Clause +golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.28.0:LICENSE,BSD-3-Clause +golang.org/x/sync,https://cs.opensource.google/go/x/sync/+/v0.14.0:LICENSE,BSD-3-Clause +golang.org/x/sys,https://cs.opensource.google/go/x/sys/+/v0.33.0:LICENSE,BSD-3-Clause +golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.32.0:LICENSE,BSD-3-Clause +golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.25.0:LICENSE,BSD-3-Clause golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.8.0:LICENSE,BSD-3-Clause gomodules.xyz/jsonpatch/v2,https://github.com/gomodules/jsonpatch/blob/v2.4.0/v2/LICENSE,Apache-2.0 google.golang.org/api,https://github.com/googleapis/google-api-go-client/blob/v0.198.0/LICENSE,BSD-3-Clause diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_challenge.go b/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_challenge.go index cfc4f2414..34bae15b8 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_challenge.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_challenge.go @@ -62,9 +62,9 @@ type ChallengeSpec struct { // challenge is a part of. AuthorizationURL string `json:"authorizationURL"` - // dnsName is the identifier that this challenge is for, e.g. example.com. + // dnsName is the identifier that this challenge is for, e.g., example.com. // If the requested DNSName is a 'wildcard', this field MUST be set to the - // non-wildcard domain, e.g. for `*.example.com`, it must be `example.com`. + // non-wildcard domain, e.g., for `*.example.com`, it must be `example.com`. DNSName string `json:"dnsName"` // wildcard will be true if this challenge is for a wildcard identifier, diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_issuer.go b/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_issuer.go index 7f6365e25..54cb4b97e 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_issuer.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_issuer.go @@ -46,7 +46,7 @@ type ACMEIssuer struct { // PreferredChain is the chain to use if the ACME server outputs multiple. // PreferredChain is no guarantee that this one gets delivered by the ACME // endpoint. - // For example, for Let's Encrypt's DST crosssign you would use: + // For example, for Let's Encrypt's DST cross-sign you would use: // "DST Root CA X3" or "ISRG Root X1" for the newer Let's Encrypt root CA. // This value picks the first certificate bundle in the combined set of // ACME default and alternative chains that has a root-most certificate with @@ -114,6 +114,11 @@ type ACMEIssuer struct { // Defaults to false. // +optional EnableDurationFeature bool `json:"enableDurationFeature,omitempty"` + + // Profile allows requesting a certificate profile from the ACME server. + // Supported profiles are listed by the server's ACME directory URL. + // +optional + Profile string `json:"profile,omitempty"` } // ACMEExternalAccountBinding is a reference to a CA external account of the ACME @@ -163,7 +168,7 @@ type ACMEChallengeSolver struct { // Configures cert-manager to attempt to complete authorizations by // performing the HTTP01 challenge flow. // It is not possible to obtain certificates for wildcard domain names - // (e.g. `*.example.com`) using the HTTP01 challenge mechanism. + // (e.g., `*.example.com`) using the HTTP01 challenge mechanism. // +optional HTTP01 *ACMEChallengeSolverHTTP01 `json:"http01,omitempty"` @@ -702,16 +707,16 @@ type ACMEIssuerDNS01ProviderAzureDNS struct { // If the AZURE_FEDERATED_TOKEN_FILE environment variable is set, the Azure Workload Identity will be used. // Otherwise, we fall-back to using Azure Managed Service Identity. type AzureManagedIdentity struct { - // client ID of the managed identity, can not be used at the same time as resourceID + // client ID of the managed identity, cannot be used at the same time as resourceID // +optional ClientID string `json:"clientID,omitempty"` - // resource ID of the managed identity, can not be used at the same time as clientID + // resource ID of the managed identity, cannot be used at the same time as clientID // Cannot be used for Azure Managed Service Identity // +optional ResourceID string `json:"resourceID,omitempty"` - // tenant ID of the managed identity, can not be used at the same time as resourceID + // tenant ID of the managed identity, cannot be used at the same time as resourceID // +optional TenantID string `json:"tenantID,omitempty"` } @@ -772,14 +777,14 @@ type ACMEIssuerDNS01ProviderWebhook struct { // The name of the solver to use, as defined in the webhook provider // implementation. - // This will typically be the name of the provider, e.g. 'cloudflare'. + // This will typically be the name of the provider, e.g., 'cloudflare'. SolverName string `json:"solverName"` // Additional configuration that should be passed to the webhook apiserver // when challenges are processed. // This can contain arbitrary JSON data. // Secret values should not be specified in this stanza. - // If secret values are needed (e.g. credentials for a DNS service), you + // If secret values are needed (e.g., credentials for a DNS service), you // should use a SecretKeySelector to reference a Secret resource. // For details on the schema of this field, consult the webhook provider // implementation's documentation. diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_order.go b/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_order.go index f945a43ff..c03a6a903 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_order.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/apis/acme/v1/types_order.go @@ -82,6 +82,11 @@ type OrderSpec struct { // this is set on order creation as pe the ACME spec. // +optional Duration *metav1.Duration `json:"duration,omitempty"` + + // Profile allows requesting a certificate profile from the ACME server. + // Supported profiles are listed by the server's ACME directory URL. + // +optional + Profile string `json:"profile,omitempty"` } type OrderStatus struct { @@ -176,7 +181,7 @@ type ACMEChallenge struct { // This is used to compute the 'key' that must also be presented. Token string `json:"token"` - // Type is the type of challenge being offered, e.g. 'http-01', 'dns-01', + // Type is the type of challenge being offered, e.g., 'http-01', 'dns-01', // 'tls-sni-01', etc. // This is the raw value retrieved from the ACME server. // Only 'http-01' and 'dns-01' are supported by cert-manager, other values diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_certificate.go b/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_certificate.go index 89979e7ac..3208068c9 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_certificate.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_certificate.go @@ -99,6 +99,19 @@ const ( PKCS8 PrivateKeyEncoding = "PKCS8" ) +// +kubebuilder:validation:Enum=SHA256WithRSA;SHA384WithRSA;SHA512WithRSA;ECDSAWithSHA256;ECDSAWithSHA384;ECDSAWithSHA512;PureEd25519 +type SignatureAlgorithm string + +const ( + SHA256WithRSA SignatureAlgorithm = "SHA256WithRSA" + SHA384WithRSA SignatureAlgorithm = "SHA384WithRSA" + SHA512WithRSA SignatureAlgorithm = "SHA512WithRSA" + ECDSAWithSHA256 SignatureAlgorithm = "ECDSAWithSHA256" + ECDSAWithSHA384 SignatureAlgorithm = "ECDSAWithSHA384" + ECDSAWithSHA512 SignatureAlgorithm = "ECDSAWithSHA512" + PureEd25519 SignatureAlgorithm = "PureEd25519" +) + // CertificateSpec defines the desired state of Certificate. // // NOTE: The specification contains a lot of "requested" certificate attributes, it is @@ -258,6 +271,13 @@ type CertificateSpec struct { // +optional PrivateKey *CertificatePrivateKey `json:"privateKey,omitempty"` + // Signature algorithm to use. + // Allowed values for RSA keys: SHA256WithRSA, SHA384WithRSA, SHA512WithRSA. + // Allowed values for ECDSA keys: ECDSAWithSHA256, ECDSAWithSHA384, ECDSAWithSHA512. + // Allowed values for Ed25519 keys: PureEd25519. + // +optional + SignatureAlgorithm SignatureAlgorithm `json:"signatureAlgorithm,omitempty"` + // Whether the KeyUsage and ExtKeyUsage extensions should be set in the encoded CSR. // // This option defaults to true, and should only be disabled if the target @@ -272,17 +292,12 @@ type CertificateSpec struct { // revisions exceeds this number. // // If set, revisionHistoryLimit must be a value of `1` or greater. - // If unset (`nil`), revisions will not be garbage collected. - // Default value is `nil`. + // Default value is `1`. // +optional RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` // Defines extra output formats of the private key and signed certificate chain // to be written to this Certificate's target Secret. - // - // This is a Beta Feature enabled by default. It can be disabled with the - // `--feature-gates=AdditionalCertificateOutputFormats=false` option set on both - // the controller and webhook components. // +optional AdditionalOutputFormats []CertificateAdditionalOutputFormat `json:"additionalOutputFormats,omitempty"` @@ -321,7 +336,11 @@ type CertificatePrivateKey struct { // to await user intervention. // If set to `Always`, a private key matching the specified requirements // will be generated whenever a re-issuance occurs. - // Default is `Never` for backward compatibility. + // Default is `Always`. + // The default was changed from `Never` to `Always` in cert-manager >=v1.18.0. + // The new default can be disabled by setting the + // `--feature-gates=DefaultPrivateKeyRotationPolicyAlways=false` option on + // the controller component. // +optional RotationPolicy PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` @@ -512,7 +531,7 @@ type PKCS12Keystore struct { // `LegacyRC2`: Deprecated. Not supported by default in OpenSSL 3 or Java 20. // `LegacyDES`: Less secure algorithm. Use this option for maximal compatibility. // `Modern2023`: Secure algorithm. Use this option in case you have to always use secure algorithms - // (eg. because of company policy). Please note that the security of the algorithm is not that important + // (e.g., because of company policy). Please note that the security of the algorithm is not that important // in reality, because the unencrypted certificate and private key are also stored in the Secret. // +optional Profile PKCS12Profile `json:"profile,omitempty"` diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_issuer.go b/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_issuer.go index efb1f5286..90a55fcea 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_issuer.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1/types_issuer.go @@ -173,7 +173,7 @@ type VenafiTPP struct { // VenafiCloud defines connection configuration details for Venafi Cloud type VenafiCloud struct { // URL is the base URL for Venafi Cloud. - // Defaults to "https://api.venafi.cloud/v1". + // Defaults to "https://api.venafi.cloud/". // +optional URL string `json:"url,omitempty"` @@ -200,6 +200,11 @@ type VaultIssuer struct { // Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200". Server string `json:"server"` + // ServerName is used to verify the hostname on the returned certificates + // by the Vault server. + // +optional + ServerName string `json:"serverName,omitempty"` + // Path is the mount path of the Vault PKI backend's `sign` endpoint, e.g: // "my_pki_mount/sign/my-role-name". Path string `json:"path"` diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/apis/meta/v1/types.go b/vendor/github.com/cert-manager/cert-manager/pkg/apis/meta/v1/types.go index 24e72d15f..80723a6c0 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/apis/meta/v1/types.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/apis/meta/v1/types.go @@ -24,7 +24,7 @@ type ConditionStatus string // the condition; "ConditionFalse" means a resource is not in the condition; // "ConditionUnknown" means kubernetes can't decide if a resource is in the // condition or not. In the future, we could add other intermediate -// conditions, e.g. ConditionDegraded. +// conditions, e.g., ConditionDegraded. const ( // ConditionTrue represents the fact that a given condition is true ConditionTrue ConditionStatus = "True" @@ -37,7 +37,7 @@ const ( ) // A reference to an object in the same namespace as the referent. -// If the referent is a cluster-scoped resource (e.g. a ClusterIssuer), +// If the referent is a cluster-scoped resource (e.g., a ClusterIssuer), // the reference instead refers to the resource with the given name in the // configured 'cluster resource namespace', which is set as a flag on the // controller component (and defaults to the namespace that cert-manager diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/clientset.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/clientset.go index bbe90f727..1ad7245c7 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/clientset.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/clientset.go @@ -19,8 +19,8 @@ limitations under the License. package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" acmev1 "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1" certmanagerv1 "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1" diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/acme_client.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/acme_client.go index ff077b660..8f26c1680 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/acme_client.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/acme_client.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( - "net/http" + http "net/http" - v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" - "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" + acmev1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" + scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -90,10 +90,10 @@ func New(c rest.Interface) *AcmeV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := acmev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/challenge.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/challenge.go index 76fc50c14..0026fa8f5 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/challenge.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/challenge.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" + acmev1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type ChallengesGetter interface { // ChallengeInterface has methods to work with Challenge resources. type ChallengeInterface interface { - Create(ctx context.Context, challenge *v1.Challenge, opts metav1.CreateOptions) (*v1.Challenge, error) - Update(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (*v1.Challenge, error) + Create(ctx context.Context, challenge *acmev1.Challenge, opts metav1.CreateOptions) (*acmev1.Challenge, error) + Update(ctx context.Context, challenge *acmev1.Challenge, opts metav1.UpdateOptions) (*acmev1.Challenge, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, challenge *v1.Challenge, opts metav1.UpdateOptions) (*v1.Challenge, error) + UpdateStatus(ctx context.Context, challenge *acmev1.Challenge, opts metav1.UpdateOptions) (*acmev1.Challenge, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Challenge, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ChallengeList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*acmev1.Challenge, error) + List(ctx context.Context, opts metav1.ListOptions) (*acmev1.ChallengeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Challenge, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *acmev1.Challenge, err error) ChallengeExpansion } // challenges implements ChallengeInterface type challenges struct { - *gentype.ClientWithList[*v1.Challenge, *v1.ChallengeList] + *gentype.ClientWithList[*acmev1.Challenge, *acmev1.ChallengeList] } // newChallenges returns a Challenges func newChallenges(c *AcmeV1Client, namespace string) *challenges { return &challenges{ - gentype.NewClientWithList[*v1.Challenge, *v1.ChallengeList]( + gentype.NewClientWithList[*acmev1.Challenge, *acmev1.ChallengeList]( "challenges", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Challenge { return &v1.Challenge{} }, - func() *v1.ChallengeList { return &v1.ChallengeList{} }), + func() *acmev1.Challenge { return &acmev1.Challenge{} }, + func() *acmev1.ChallengeList { return &acmev1.ChallengeList{} }, + ), } } diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/order.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/order.go index 7ad95fb7a..763168c85 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/order.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/order.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" + acmev1 "github.com/cert-manager/cert-manager/pkg/apis/acme/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type OrdersGetter interface { // OrderInterface has methods to work with Order resources. type OrderInterface interface { - Create(ctx context.Context, order *v1.Order, opts metav1.CreateOptions) (*v1.Order, error) - Update(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (*v1.Order, error) + Create(ctx context.Context, order *acmev1.Order, opts metav1.CreateOptions) (*acmev1.Order, error) + Update(ctx context.Context, order *acmev1.Order, opts metav1.UpdateOptions) (*acmev1.Order, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, order *v1.Order, opts metav1.UpdateOptions) (*v1.Order, error) + UpdateStatus(ctx context.Context, order *acmev1.Order, opts metav1.UpdateOptions) (*acmev1.Order, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Order, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OrderList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*acmev1.Order, error) + List(ctx context.Context, opts metav1.ListOptions) (*acmev1.OrderList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Order, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *acmev1.Order, err error) OrderExpansion } // orders implements OrderInterface type orders struct { - *gentype.ClientWithList[*v1.Order, *v1.OrderList] + *gentype.ClientWithList[*acmev1.Order, *acmev1.OrderList] } // newOrders returns a Orders func newOrders(c *AcmeV1Client, namespace string) *orders { return &orders{ - gentype.NewClientWithList[*v1.Order, *v1.OrderList]( + gentype.NewClientWithList[*acmev1.Order, *acmev1.OrderList]( "orders", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Order { return &v1.Order{} }, - func() *v1.OrderList { return &v1.OrderList{} }), + func() *acmev1.Order { return &acmev1.Order{} }, + func() *acmev1.OrderList { return &acmev1.OrderList{} }, + ), } } diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go index 64a1b3004..6604e918c 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificate.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type CertificatesGetter interface { // CertificateInterface has methods to work with Certificate resources. type CertificateInterface interface { - Create(ctx context.Context, certificate *v1.Certificate, opts metav1.CreateOptions) (*v1.Certificate, error) - Update(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (*v1.Certificate, error) + Create(ctx context.Context, certificate *certmanagerv1.Certificate, opts metav1.CreateOptions) (*certmanagerv1.Certificate, error) + Update(ctx context.Context, certificate *certmanagerv1.Certificate, opts metav1.UpdateOptions) (*certmanagerv1.Certificate, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, certificate *v1.Certificate, opts metav1.UpdateOptions) (*v1.Certificate, error) + UpdateStatus(ctx context.Context, certificate *certmanagerv1.Certificate, opts metav1.UpdateOptions) (*certmanagerv1.Certificate, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Certificate, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CertificateList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*certmanagerv1.Certificate, error) + List(ctx context.Context, opts metav1.ListOptions) (*certmanagerv1.CertificateList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Certificate, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *certmanagerv1.Certificate, err error) CertificateExpansion } // certificates implements CertificateInterface type certificates struct { - *gentype.ClientWithList[*v1.Certificate, *v1.CertificateList] + *gentype.ClientWithList[*certmanagerv1.Certificate, *certmanagerv1.CertificateList] } // newCertificates returns a Certificates func newCertificates(c *CertmanagerV1Client, namespace string) *certificates { return &certificates{ - gentype.NewClientWithList[*v1.Certificate, *v1.CertificateList]( + gentype.NewClientWithList[*certmanagerv1.Certificate, *certmanagerv1.CertificateList]( "certificates", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Certificate { return &v1.Certificate{} }, - func() *v1.CertificateList { return &v1.CertificateList{} }), + func() *certmanagerv1.Certificate { return &certmanagerv1.Certificate{} }, + func() *certmanagerv1.CertificateList { return &certmanagerv1.CertificateList{} }, + ), } } diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go index 18e71245a..b7c41ca5e 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certificaterequest.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type CertificateRequestsGetter interface { // CertificateRequestInterface has methods to work with CertificateRequest resources. type CertificateRequestInterface interface { - Create(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.CreateOptions) (*v1.CertificateRequest, error) - Update(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (*v1.CertificateRequest, error) + Create(ctx context.Context, certificateRequest *certmanagerv1.CertificateRequest, opts metav1.CreateOptions) (*certmanagerv1.CertificateRequest, error) + Update(ctx context.Context, certificateRequest *certmanagerv1.CertificateRequest, opts metav1.UpdateOptions) (*certmanagerv1.CertificateRequest, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, certificateRequest *v1.CertificateRequest, opts metav1.UpdateOptions) (*v1.CertificateRequest, error) + UpdateStatus(ctx context.Context, certificateRequest *certmanagerv1.CertificateRequest, opts metav1.UpdateOptions) (*certmanagerv1.CertificateRequest, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CertificateRequest, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CertificateRequestList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*certmanagerv1.CertificateRequest, error) + List(ctx context.Context, opts metav1.ListOptions) (*certmanagerv1.CertificateRequestList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateRequest, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *certmanagerv1.CertificateRequest, err error) CertificateRequestExpansion } // certificateRequests implements CertificateRequestInterface type certificateRequests struct { - *gentype.ClientWithList[*v1.CertificateRequest, *v1.CertificateRequestList] + *gentype.ClientWithList[*certmanagerv1.CertificateRequest, *certmanagerv1.CertificateRequestList] } // newCertificateRequests returns a CertificateRequests func newCertificateRequests(c *CertmanagerV1Client, namespace string) *certificateRequests { return &certificateRequests{ - gentype.NewClientWithList[*v1.CertificateRequest, *v1.CertificateRequestList]( + gentype.NewClientWithList[*certmanagerv1.CertificateRequest, *certmanagerv1.CertificateRequestList]( "certificaterequests", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.CertificateRequest { return &v1.CertificateRequest{} }, - func() *v1.CertificateRequestList { return &v1.CertificateRequestList{} }), + func() *certmanagerv1.CertificateRequest { return &certmanagerv1.CertificateRequest{} }, + func() *certmanagerv1.CertificateRequestList { return &certmanagerv1.CertificateRequestList{} }, + ), } } diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certmanager_client.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certmanager_client.go index d4c9c3800..32c1074e4 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certmanager_client.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/certmanager_client.go @@ -19,10 +19,10 @@ limitations under the License. package v1 import ( - "net/http" + http "net/http" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" - "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" + certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -100,10 +100,10 @@ func New(c rest.Interface) *CertmanagerV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := certmanagerv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go index 9531b95a0..5ed145a5e 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/clusterissuer.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type ClusterIssuersGetter interface { // ClusterIssuerInterface has methods to work with ClusterIssuer resources. type ClusterIssuerInterface interface { - Create(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.CreateOptions) (*v1.ClusterIssuer, error) - Update(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (*v1.ClusterIssuer, error) + Create(ctx context.Context, clusterIssuer *certmanagerv1.ClusterIssuer, opts metav1.CreateOptions) (*certmanagerv1.ClusterIssuer, error) + Update(ctx context.Context, clusterIssuer *certmanagerv1.ClusterIssuer, opts metav1.UpdateOptions) (*certmanagerv1.ClusterIssuer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterIssuer *v1.ClusterIssuer, opts metav1.UpdateOptions) (*v1.ClusterIssuer, error) + UpdateStatus(ctx context.Context, clusterIssuer *certmanagerv1.ClusterIssuer, opts metav1.UpdateOptions) (*certmanagerv1.ClusterIssuer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterIssuer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterIssuerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*certmanagerv1.ClusterIssuer, error) + List(ctx context.Context, opts metav1.ListOptions) (*certmanagerv1.ClusterIssuerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterIssuer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *certmanagerv1.ClusterIssuer, err error) ClusterIssuerExpansion } // clusterIssuers implements ClusterIssuerInterface type clusterIssuers struct { - *gentype.ClientWithList[*v1.ClusterIssuer, *v1.ClusterIssuerList] + *gentype.ClientWithList[*certmanagerv1.ClusterIssuer, *certmanagerv1.ClusterIssuerList] } // newClusterIssuers returns a ClusterIssuers func newClusterIssuers(c *CertmanagerV1Client) *clusterIssuers { return &clusterIssuers{ - gentype.NewClientWithList[*v1.ClusterIssuer, *v1.ClusterIssuerList]( + gentype.NewClientWithList[*certmanagerv1.ClusterIssuer, *certmanagerv1.ClusterIssuerList]( "clusterissuers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterIssuer { return &v1.ClusterIssuer{} }, - func() *v1.ClusterIssuerList { return &v1.ClusterIssuerList{} }), + func() *certmanagerv1.ClusterIssuer { return &certmanagerv1.ClusterIssuer{} }, + func() *certmanagerv1.ClusterIssuerList { return &certmanagerv1.ClusterIssuerList{} }, + ), } } diff --git a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go index 6329352a0..9e0007832 100644 --- a/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go +++ b/vendor/github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/issuer.go @@ -19,9 +19,9 @@ limitations under the License. package v1 import ( - "context" + context "context" - v1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" scheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -37,33 +37,34 @@ type IssuersGetter interface { // IssuerInterface has methods to work with Issuer resources. type IssuerInterface interface { - Create(ctx context.Context, issuer *v1.Issuer, opts metav1.CreateOptions) (*v1.Issuer, error) - Update(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (*v1.Issuer, error) + Create(ctx context.Context, issuer *certmanagerv1.Issuer, opts metav1.CreateOptions) (*certmanagerv1.Issuer, error) + Update(ctx context.Context, issuer *certmanagerv1.Issuer, opts metav1.UpdateOptions) (*certmanagerv1.Issuer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, issuer *v1.Issuer, opts metav1.UpdateOptions) (*v1.Issuer, error) + UpdateStatus(ctx context.Context, issuer *certmanagerv1.Issuer, opts metav1.UpdateOptions) (*certmanagerv1.Issuer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Issuer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IssuerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*certmanagerv1.Issuer, error) + List(ctx context.Context, opts metav1.ListOptions) (*certmanagerv1.IssuerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Issuer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *certmanagerv1.Issuer, err error) IssuerExpansion } // issuers implements IssuerInterface type issuers struct { - *gentype.ClientWithList[*v1.Issuer, *v1.IssuerList] + *gentype.ClientWithList[*certmanagerv1.Issuer, *certmanagerv1.IssuerList] } // newIssuers returns a Issuers func newIssuers(c *CertmanagerV1Client, namespace string) *issuers { return &issuers{ - gentype.NewClientWithList[*v1.Issuer, *v1.IssuerList]( + gentype.NewClientWithList[*certmanagerv1.Issuer, *certmanagerv1.IssuerList]( "issuers", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Issuer { return &v1.Issuer{} }, - func() *v1.IssuerList { return &v1.IssuerList{} }), + func() *certmanagerv1.Issuer { return &certmanagerv1.Issuer{} }, + func() *certmanagerv1.IssuerList { return &certmanagerv1.IssuerList{} }, + ), } } diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 74f052aa9..eacdd7fd9 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -288,7 +288,7 @@ func (tf *tokenRefresher) Token() (*Token, error) { if tf.refreshToken != tk.RefreshToken { tf.refreshToken = tk.RefreshToken } - return tk, err + return tk, nil } // reuseTokenSource is a TokenSource that holds a single token in memory @@ -356,11 +356,15 @@ func NewClient(ctx context.Context, src TokenSource) *http.Client { if src == nil { return internal.ContextClient(ctx) } + cc := internal.ContextClient(ctx) return &http.Client{ Transport: &Transport{ - Base: internal.ContextClient(ctx).Transport, + Base: cc.Transport, Source: ReuseTokenSource(nil, src), }, + CheckRedirect: cc.CheckRedirect, + Jar: cc.Jar, + Timeout: cc.Timeout, } } diff --git a/vendor/kmodules.xyz/client-go/meta/lib.go b/vendor/kmodules.xyz/client-go/meta/lib.go index bf456b8f9..455950a51 100644 --- a/vendor/kmodules.xyz/client-go/meta/lib.go +++ b/vendor/kmodules.xyz/client-go/meta/lib.go @@ -31,6 +31,7 @@ import ( // ref: https://github.com/kubernetes-sigs/application/blob/4ead7f1b87048b7717b3e474a21fdc07e6bce636/pkg/controller/application/application_controller.go#L28 const ( NameLabelKey = "app.kubernetes.io/name" + NamespaceLabelKey = "app.kubernetes.io/namespace" VersionLabelKey = "app.kubernetes.io/version" InstanceLabelKey = "app.kubernetes.io/instance" PartOfLabelKey = "app.kubernetes.io/part-of" diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml index 9dd968b00..287d695ff 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml @@ -263,6 +263,16 @@ spec: type: array name: type: string + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer 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 16329b8c4..f30538ce9 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 @@ -265,6 +265,16 @@ spec: - type type: object type: array + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -515,6 +525,16 @@ spec: - type type: object type: array + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -773,6 +793,16 @@ spec: - type type: object type: array + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -1008,6 +1038,16 @@ spec: - type type: object type: array + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -1279,6 +1319,16 @@ spec: - type type: object type: array + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml index f4295a193..5b0aad51d 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml @@ -351,6 +351,16 @@ spec: type: array name: type: string + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -599,6 +609,16 @@ spec: type: array name: type: string + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -855,6 +875,16 @@ spec: type: array name: type: string + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -1088,6 +1118,16 @@ spec: type: array name: type: string + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer @@ -1357,6 +1397,16 @@ spec: type: array name: type: string + sort: + properties: + fieldName: + type: string + order: + enum: + - Ascending + - Descending + type: string + type: object type: object width: type: integer diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/hazelcast_helpers.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/hazelcast_helpers.go new file mode 100644 index 000000000..5a38f6ff3 --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/hazelcast_helpers.go @@ -0,0 +1,67 @@ +/* +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 ( + "fmt" + + "kubedb.dev/apimachinery/apis" + "kubedb.dev/apimachinery/apis/autoscaling" + "kubedb.dev/apimachinery/crds" + + "kmodules.xyz/client-go/apiextensions" +) + +func (r HazelcastAutoscaler) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { + return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralHazelcastAutoscaler)) +} + +var _ apis.ResourceInfo = &HazelcastAutoscaler{} + +func (p HazelcastAutoscaler) ResourceFQN() string { + return fmt.Sprintf("%s.%s", ResourcePluralHazelcastAutoscaler, autoscaling.GroupName) +} + +func (p HazelcastAutoscaler) ResourceShortCode() string { + return ResourceCodeHazelcastAutoscaler +} + +func (p HazelcastAutoscaler) ResourceKind() string { + return ResourceKindHazelcastAutoscaler +} + +func (p HazelcastAutoscaler) ResourceSingular() string { + return ResourceSingularHazelcastAutoscaler +} + +func (p HazelcastAutoscaler) ResourcePlural() string { + return ResourcePluralHazelcastAutoscaler +} + +func (p HazelcastAutoscaler) ValidateSpecs() error { + return nil +} + +var _ StatusAccessor = &HazelcastAutoscaler{} + +func (e *HazelcastAutoscaler) GetStatus() AutoscalerStatus { + return e.Status +} + +func (e *HazelcastAutoscaler) SetStatus(s AutoscalerStatus) { + e.Status = s +} diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/hazelcast_types.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/hazelcast_types.go new file mode 100644 index 000000000..1e35e198e --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/hazelcast_types.go @@ -0,0 +1,91 @@ +/* +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 ( + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" + + core "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + ResourceCodeHazelcastAutoscaler = "hzscaler" + ResourceKindHazelcastAutoscaler = "HazelcastAutoscaler" + ResourceSingularHazelcastAutoscaler = "hazelcastautoscaler" + ResourcePluralHazelcastAutoscaler = "hazelcastautoscalers" +) + +// +genclient +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=hazelcastautoscalers,singular=hazelcastautoscaler,shortName=hzscaler,categories={autoscaler,kubedb,appscode} +// +kubebuilder:subresource:status +type HazelcastAutoscaler struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Specification of the behavior of the autoscaler. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + Spec HazelcastAutoscalerSpec `json:"spec"` + + // Current information about the autoscaler. + // +optional + Status AutoscalerStatus `json:"status,omitempty"` +} + +type HazelcastAutoscalerSpec struct { + DatabaseRef *core.LocalObjectReference `json:"databaseRef"` + + // OpsRequestOptions will be used to control the behaviour of ops-manager + OpsRequestOptions *HazelcastOpsrequestOptions `json:"opsRequestOptions,omitempty"` + + Compute *HazelcastComputeAutoscalerSpec `json:"compute,omitempty"` + Storage *HazelcastStorageAutoscalerSpec `json:"storage,omitempty"` +} + +type HazelcastComputeAutoscalerSpec struct { + // +optional + NodeTopology *NodeTopology `json:"nodeTopology,omitempty"` + + Hazelcast *ComputeAutoscalerSpec `json:"hazelcast,omitempty"` +} + +type HazelcastStorageAutoscalerSpec struct { + Hazelcast *StorageAutoscalerSpec `json:"hazelcast,omitempty"` +} + +type HazelcastOpsrequestOptions struct { + // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. + Timeout *metav1.Duration `json:"timeout,omitempty"` + + // ApplyOption is to control the execution of OpsRequest depending on the database state. + // +kubebuilder:default="IfReady" + Apply opsapi.ApplyOption `json:"apply,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type HazelcastAutoscalerList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + Items []HazelcastAutoscaler `json:"items"` +} diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go index 7edb0b07d..fd1e8283f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go @@ -544,6 +544,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.FerretDBComputeAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_FerretDBComputeAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.FerretDBOpsRequestOptions": schema_apimachinery_apis_autoscaling_v1alpha1_FerretDBOpsRequestOptions(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.FerretDBStorageAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_FerretDBStorageAutoscalerSpec(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscaler": schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastAutoscaler(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscalerList": schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastAutoscalerList(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastAutoscalerSpec(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastComputeAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastComputeAutoscalerSpec(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastOpsrequestOptions": schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastOpsrequestOptions(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastStorageAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastStorageAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HistogramCheckpoint": schema_apimachinery_apis_autoscaling_v1alpha1_HistogramCheckpoint(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.KafkaAutoscaler": schema_apimachinery_apis_autoscaling_v1alpha1_KafkaAutoscaler(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.KafkaAutoscalerList": schema_apimachinery_apis_autoscaling_v1alpha1_KafkaAutoscalerList(ref), @@ -27752,6 +27758,210 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_FerretDBStorageAutoscalerSpec } } +func schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastAutoscaler(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the behavior of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscalerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Current information about the autoscaler.", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.AutoscalerStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.AutoscalerStatus", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscalerSpec"}, + } +} + +func schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastAutoscalerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscaler"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastAutoscaler"}, + } +} + +func schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "databaseRef": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "opsRequestOptions": { + SchemaProps: spec.SchemaProps{ + Description: "OpsRequestOptions will be used to control the behaviour of ops-manager", + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastOpsrequestOptions"), + }, + }, + "compute": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastComputeAutoscalerSpec"), + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastStorageAutoscalerSpec"), + }, + }, + }, + Required: []string{"databaseRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastOpsrequestOptions", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.HazelcastStorageAutoscalerSpec"}, + } +} + +func schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastComputeAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeTopology": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.NodeTopology"), + }, + }, + "hazelcast": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ComputeAutoscalerSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.NodeTopology"}, + } +} + +func schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastOpsrequestOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "apply": { + SchemaProps: spec.SchemaProps{ + Description: "ApplyOption is to control the execution of OpsRequest depending on the database state.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + } +} + +func schema_apimachinery_apis_autoscaling_v1alpha1_HazelcastStorageAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "hazelcast": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.StorageAutoscalerSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.StorageAutoscalerSpec"}, + } +} + func schema_apimachinery_apis_autoscaling_v1alpha1_HistogramCheckpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/register.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/register.go index 37abea8df..cc434e83b 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/register.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/register.go @@ -66,6 +66,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &EtcdAutoscalerList{}, &FerretDBAutoscaler{}, &FerretDBAutoscalerList{}, + &HazelcastAutoscaler{}, + &HazelcastAutoscalerList{}, &KafkaAutoscaler{}, &KafkaAutoscalerList{}, &MariaDBAutoscaler{}, diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go index f3cfb2a1d..3c0595eda 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go @@ -1348,6 +1348,171 @@ func (in *FerretDBStorageAutoscalerSpec) DeepCopy() *FerretDBStorageAutoscalerSp return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HazelcastAutoscaler) DeepCopyInto(out *HazelcastAutoscaler) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HazelcastAutoscaler. +func (in *HazelcastAutoscaler) DeepCopy() *HazelcastAutoscaler { + if in == nil { + return nil + } + out := new(HazelcastAutoscaler) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HazelcastAutoscaler) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HazelcastAutoscalerList) DeepCopyInto(out *HazelcastAutoscalerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HazelcastAutoscaler, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HazelcastAutoscalerList. +func (in *HazelcastAutoscalerList) DeepCopy() *HazelcastAutoscalerList { + if in == nil { + return nil + } + out := new(HazelcastAutoscalerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *HazelcastAutoscalerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HazelcastAutoscalerSpec) DeepCopyInto(out *HazelcastAutoscalerSpec) { + *out = *in + if in.DatabaseRef != nil { + in, out := &in.DatabaseRef, &out.DatabaseRef + *out = new(corev1.LocalObjectReference) + **out = **in + } + if in.OpsRequestOptions != nil { + in, out := &in.OpsRequestOptions, &out.OpsRequestOptions + *out = new(HazelcastOpsrequestOptions) + (*in).DeepCopyInto(*out) + } + if in.Compute != nil { + in, out := &in.Compute, &out.Compute + *out = new(HazelcastComputeAutoscalerSpec) + (*in).DeepCopyInto(*out) + } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(HazelcastStorageAutoscalerSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HazelcastAutoscalerSpec. +func (in *HazelcastAutoscalerSpec) DeepCopy() *HazelcastAutoscalerSpec { + if in == nil { + return nil + } + out := new(HazelcastAutoscalerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HazelcastComputeAutoscalerSpec) DeepCopyInto(out *HazelcastComputeAutoscalerSpec) { + *out = *in + if in.NodeTopology != nil { + in, out := &in.NodeTopology, &out.NodeTopology + *out = new(NodeTopology) + (*in).DeepCopyInto(*out) + } + if in.Hazelcast != nil { + in, out := &in.Hazelcast, &out.Hazelcast + *out = new(ComputeAutoscalerSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HazelcastComputeAutoscalerSpec. +func (in *HazelcastComputeAutoscalerSpec) DeepCopy() *HazelcastComputeAutoscalerSpec { + if in == nil { + return nil + } + out := new(HazelcastComputeAutoscalerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HazelcastOpsrequestOptions) DeepCopyInto(out *HazelcastOpsrequestOptions) { + *out = *in + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HazelcastOpsrequestOptions. +func (in *HazelcastOpsrequestOptions) DeepCopy() *HazelcastOpsrequestOptions { + if in == nil { + return nil + } + out := new(HazelcastOpsrequestOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HazelcastStorageAutoscalerSpec) DeepCopyInto(out *HazelcastStorageAutoscalerSpec) { + *out = *in + if in.Hazelcast != nil { + in, out := &in.Hazelcast, &out.Hazelcast + *out = new(StorageAutoscalerSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HazelcastStorageAutoscalerSpec. +func (in *HazelcastStorageAutoscalerSpec) DeepCopy() *HazelcastStorageAutoscalerSpec { + if in == nil { + return nil + } + out := new(HazelcastStorageAutoscalerSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HistogramCheckpoint) DeepCopyInto(out *HistogramCheckpoint) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go index 874d7ded2..7cab1b3b1 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go @@ -32,8 +32,19 @@ const ( KubeDBOrganization = "kubedb" - LabelRole = GroupName + "/role" - LabelPetSet = GroupName + "/petset" + StatefulSetPodNameLabelKey = "statefulset.kubernetes.io/pod-name" + LabelRole = GroupName + "/role" + LabelPetSet = GroupName + "/petset" + + // distributed const + DistributedCustomConfigSecretNameSuffix = "custom-config" + DistributedRBACNameSuffix = "rbac" + DistributedServiceExportNameSuffix = "serviceexports" + DistributedTLSSecretNameSuffix = "tls-secrets" + DistributedAuthSecretNameSuffix = "auth" + KubeSliceNSMIPKey = "kubeslice.io/nsmIP" + KubeSlicePodIPVolumeName = "podip" + KubeSlicePodIPFileName = "podip" ReplicationModeDetectorContainerName = "replication-mode-detector" DatabasePodPrimary = "primary" @@ -363,19 +374,20 @@ const ( 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" - MaxscaleCertMountPath = "/etc/ssl/maxscale" + MaxscaleCommonName = "mx" + MaxscaleContainerName = "maxscale" + MaxscaleInitContainerName = "maxscale-init" + MaxscaleServerName = "server" + MaxscaleConfigName = "config" + MaxscaleConfigPath = "/etc/maxscale.cnf.d" + MaxScaleCustomConfigMountPath = "/etc/maxscale/maxscale.custom.d" + MaxscaleDefaultConfigName = "default-config" + MaxscaleDefaultConfigPath = "/etc/maxscale" + MaxscaleDataVolumeName = "data" + MaxscaleDataVolumePath = "/var/lib/maxscale" + MaxscaleUIPort = 8989 + MaxscaleUIPortName = "ui" + MaxscaleCertMountPath = "/etc/ssl/maxscale" // =========================== SingleStore Constants ============================ SinglestoreDatabasePortName = "db" @@ -496,6 +508,8 @@ const ( PostgresCoordinatorClientPort = 2379 PostgresCoordinatorClientPortName = "coordinatclient" + PostgresGRPCServerPort = 2384 + PostgresGRPCServerPortName = "grpcserver" RaftMetricsExporterPort = 23790 RaftMetricsExporterPortName = "raft-metrics" @@ -1309,7 +1323,7 @@ const ( DruidHistoricalsSegmentCacheLocations = "druid.segmentCache.locations" DruidHistoricalsSegmentCacheDropSegmentDelayMillis = "druid.segmentCache.dropSegmentDelayMillis" DruidHistoricalsSegmentCacheDir = "/druid/data/segments" - DruidVolumeHistoricalsSegmentCache = "segment-cache" + DruidVolumeHistoricalsSegmentCache = "data" // Query Cache DruidHistoricalCacheUseCache = "druid.historical.cache.useCache" @@ -1328,7 +1342,7 @@ const ( DruidWorkerBaseTaskDirSize = "druid.worker.baseTaskDirSize" DruidIndexerForkPropertyDruidProcessingBufferSizeBytes = "druid.indexer.fork.property.druid.processing.buffer.sizeBytes" DruidMiddleManagersVolumeBaseTaskDir = "base-task-dir" - DruidVolumeMiddleManagersBaseTaskDir = "base-task-dir" + DruidVolumeMiddleManagersBaseTaskDir = "data" // Values DruidIndexerTaskBaseTaskDirValue = "/druid/data/baseTaskDir" @@ -1511,10 +1525,9 @@ const ( IgniteInitScriptVolName = "init-scripts" IgniteInitScriptDir = "/scripts" IgniteConfigVolName = "ignite-config" - IgniteWorkVolName = "ignite-work" IgniteConfigFileName = "node-configuration.xml" IgniteDataVolName = "data" - IgniteDataDir = "/ignite/data" + IgniteDataDir = "/opt/ignite/apache-ignite/work" IgniteContainerName = "ignite" IgniteConfigDir = "/ignite/config" IgniteRestPortName = "rest" @@ -1557,6 +1570,7 @@ const ( ComponentCoOrdinator = "coordinator" + ClickHouseDataSyncCheckFile = "/scripts/check.txt" ClickHousePromethusEndpoint = "/metrics" ClickHouseDataDir = "/var/lib/clickhouse" ClickHouseKeeperDataDir = "/var/lib/clickhouse_keeper" @@ -1573,9 +1587,12 @@ const ( ClickHouseClientCertVolumeName = "certs" ClickHouseTempClientCertVolumeName = "certs-tmp" ClickHouseTempClientCertMountPath = "/certs-tmp" + ClickHouseScriptsVolumeName = "scripts" + ClickHouseScriptsMountPath = "/scripts" ClickHouseTempConfigDir = "/config-tmp" ClickHouseCACertKey = "ca.crt" ClickHouseCACertPath = "ca.crt" + ClickHouseClientCACertPath = "client-ca.crt" ClickHouseServerCertKey = "tls.crt" ClickHouseServerCertPath = "server.crt" ClickHouseServerKey = "tls.key" 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 cdcfacee1..25406e55f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_helpers.go @@ -62,12 +62,36 @@ func (m MariaDB) OffshootMaxscaleName() string { return meta_util.NameWithSuffix(m.Name, kubedb.MaxscaleCommonName) } +func (m MariaDB) OffshootDistributedConfigSecretName() string { + return meta_util.NameWithSuffix(m.Name, kubedb.DistributedCustomConfigSecretNameSuffix) +} + +func (m MariaDB) OffshootDistributedRBACName() string { + return meta_util.NameWithSuffix(m.Name, kubedb.DistributedRBACNameSuffix) +} + +func (m MariaDB) OffshootDistributedServiceExportName() string { + return meta_util.NameWithSuffix(m.Name, kubedb.DistributedServiceExportNameSuffix) +} + +func (m MariaDB) OffshootDistributedAuthSecretName() string { + return meta_util.NameWithSuffix(m.Name, kubedb.DistributedAuthSecretNameSuffix) +} + +func (m MariaDB) OffshootDistributedTLSName() string { + return meta_util.NameWithSuffix(m.Name, kubedb.DistributedTLSSecretNameSuffix) +} + func (m MariaDB) OffshootSelectors() map[string]string { - return map[string]string{ + label := map[string]string{ meta_util.NameLabelKey: m.ResourceFQN(), meta_util.InstanceLabelKey: m.Name, meta_util.ManagedByLabelKey: kubedb.GroupName, } + if m.Spec.Distributed { + label[meta_util.NamespaceLabelKey] = m.Namespace + } + return label } func (m MariaDB) OffshootMaxscaleSelectors() map[string]string { @@ -477,9 +501,9 @@ func (m *MariaDB) setDefaultContainerResourceLimits(podTemplate *ofstv2.PodTempl } func (m *MariaDB) setMaxscaleDefaultContainerResourceLimits(podTemplate *ofstv2.PodTemplateSpec) { - dbContainer := core_util.GetContainerByName(podTemplate.Spec.Containers, kubedb.MaxscaleCommonName) + dbContainer := core_util.GetContainerByName(podTemplate.Spec.Containers, kubedb.MaxscaleContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { - apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResources) + apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultInitContainerResource) } initContainer := core_util.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.MaxscaleInitContainerName) 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 412a99101..1c984a811 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/mariadb_types.go @@ -141,6 +141,10 @@ type MariaDBSpec struct { // Archiver controls database backup using Archiver CR // +optional Archiver *Archiver `json:"archiver,omitempty"` + + // specify if the database deployment distributed or not + // +optional + Distributed bool `json:"distributed,omitempty"` } // +kubebuilder:validation:Enum=server;archiver;metrics-exporter @@ -207,4 +211,7 @@ type MaxScaleSpec struct { // enable/disable MaxscaleUI // +optional EnableUI *bool `json:"enableUI,omitempty"` + // ConfigSecret is an optional field to provide custom configuration file for maxscale (i.e custom-maxscale.cnf). + // If specified, this file will be merged with default configuration file. + ConfigSecret *core.LocalObjectReference `json:"configSecret,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 1d1b6ba23..4e53c4837 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go @@ -27913,6 +27913,13 @@ func schema_apimachinery_apis_kubedb_v1_MariaDBSpec(ref common.ReferenceCallback Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1.Archiver"), }, }, + "distributed": { + SchemaProps: spec.SchemaProps{ + Description: "specify if the database deployment distributed or not", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"version"}, }, @@ -28036,11 +28043,17 @@ func schema_apimachinery_apis_kubedb_v1_MaxScaleSpec(ref common.ReferenceCallbac Format: "", }, }, + "configSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigSecret is an optional field to provide custom configuration file for maxscale (i.e custom-maxscale.cnf). If specified, this file will be merged with default configuration file.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"}, } } @@ -30270,6 +30283,13 @@ func schema_apimachinery_apis_kubedb_v1_PostgresSpec(ref common.ReferenceCallbac Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1.AutoOpsSpec"), }, }, + "distributed": { + SchemaProps: spec.SchemaProps{ + Description: "Distributed if set true, manifestwork objects will be created instead of raw resources", + Type: []string{"boolean"}, + Format: "", + }, + }, "version": { SchemaProps: spec.SchemaProps{ Description: "Version of Postgres to be deployed.", diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go index ba9c77dfd..6188a3317 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go @@ -63,11 +63,15 @@ func (p Postgres) OffshootName() string { } func (p Postgres) OffshootSelectors() map[string]string { - return map[string]string{ + sel := map[string]string{ meta_util.NameLabelKey: p.ResourceFQN(), meta_util.InstanceLabelKey: p.Name, meta_util.ManagedByLabelKey: kubedb.GroupName, } + if p.Spec.Distributed { + sel[meta_util.NamespaceLabelKey] = p.Namespace + } + return sel } func (p Postgres) OffshootLabels() map[string]string { @@ -139,6 +143,26 @@ func (p Postgres) GoverningServiceName() string { return meta_util.NameWithSuffix(p.ServiceName(), "pods") } +func (p Postgres) OffshootDistributedRBACName() string { + return meta_util.NameWithSuffix(p.OffshootName(), kubedb.DistributedRBACNameSuffix) +} + +func (p Postgres) OffshootDistributedServiceExportName() string { + return meta_util.NameWithSuffix(p.OffshootName(), kubedb.DistributedServiceExportNameSuffix) +} + +func (p Postgres) OffshootDistributedAuthSecretName() string { + return meta_util.NameWithSuffix(p.OffshootName(), kubedb.DistributedAuthSecretNameSuffix) +} + +func (p Postgres) OffshootDistributedTLSName() string { + return meta_util.NameWithSuffix(p.Name, kubedb.DistributedTLSSecretNameSuffix) +} + +func (p Postgres) OffshootDistributedConfigSecretName() string { + return meta_util.NameWithSuffix(p.Name, kubedb.DistributedCustomConfigSecretNameSuffix) +} + type postgresApp struct { *Postgres } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_types.go index 66b0dbc40..0b91bac8a 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_types.go @@ -63,6 +63,9 @@ type PostgresSpec struct { // +optional AutoOps AutoOpsSpec `json:"autoOps,omitempty"` + // Distributed if set true, manifestwork objects will be created instead of raw resources + Distributed bool `json:"distributed,omitempty"` + // Version of Postgres to be deployed. Version string `json:"version"` 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 01e7e2f33..5636aae10 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 @@ -1308,6 +1308,11 @@ func (in *MaxScaleSpec) DeepCopyInto(out *MaxScaleSpec) { *out = new(bool) **out = **in } + if in.ConfigSecret != nil { + in, out := &in.ConfigSecret, &out.ConfigSecret + *out = new(corev1.LocalObjectReference) + **out = **in + } return } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go index 908a72bc9..1318e7c87 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go @@ -177,7 +177,7 @@ func (r *Cassandra) CassandraKeystoreCredSecretName() string { } func (r *Cassandra) PVCName(alias string) string { - return meta_util.NameWithSuffix(r.Name, alias) + return alias } func (r *Cassandra) PetSetName() string { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go index 18f64f63c..fc7f2781c 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go @@ -105,10 +105,6 @@ func (c *ClickHouse) OffshootLabels() map[string]string { return c.offshootLabels(c.OffshootSelectors(), nil) } -func (c *ClickHouse) OffshootDBLabels() map[string]string { - return c.offshootLabels(c.OffshootDBSelectors(), nil) -} - func (c *ClickHouse) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string { svcTemplate := GetServiceTemplate(c.Spec.ServiceTemplates, alias) return c.offshootLabels(meta_util.OverwriteKeys(c.OffshootSelectors(), extraLabels...), svcTemplate.Labels) @@ -190,12 +186,8 @@ func (c *ClickHouse) KeeperGoverningServiceName() string { return meta_util.NameWithSuffix(c.KeeperServiceName(), "pods") } -func (c *ClickHouse) ClusterGoverningServiceName(name string) string { - return meta_util.NameWithSuffix(name, "pods") -} - -func (c *ClickHouse) ClusterGoverningServiceDNS(petSetName string, replicaNo int) string { - return fmt.Sprintf("%s-%d.%s.%s.svc", petSetName, replicaNo, c.GoverningServiceName(), c.GetNamespace()) +func (c *ClickHouse) GoverningServiceDNS(podName string) string { + return fmt.Sprintf("%s.%s.%s.svc", podName, c.GoverningServiceName(), c.GetNamespace()) } func (c *ClickHouse) GetAuthSecretName() string { 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 515bf1283..c35b644d8 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_helpers.go @@ -363,7 +363,7 @@ func (d *Druid) GetMetadataStorageType(metadataStorage string) DruidMetadataStor } func (d *Druid) PVCName(alias string) string { - return meta_util.NameWithSuffix(d.Name, alias) + return alias } func (d *Druid) GetDruidSegmentCacheConfig() string { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/hazelcast_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/hazelcast_helpers.go index f7a1e9368..b363b417e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/hazelcast_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/hazelcast_helpers.go @@ -98,8 +98,8 @@ func (h *Hazelcast) PodControllerLabels(extraLabels ...map[string]string) map[st return h.offshootLabels(meta_util.OverwriteKeys(h.OffshootSelectors(), extraLabels...), h.Spec.PodTemplate.Controller.Labels) } -func (h *Hazelcast) PVCName(alias string) string { - return meta_util.NameWithSuffix(h.Name, alias) +func (d *Hazelcast) PVCName(alias string) string { + return alias } func (h *Hazelcast) PodLabels(extraLabels ...map[string]string) map[string]string { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/ignite_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/ignite_helpers.go index 5fbf897a0..68af6c7f6 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/ignite_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/ignite_helpers.go @@ -270,7 +270,7 @@ func (i *Ignite) ConfigSecretName() string { } func (i *Ignite) PVCName(alias string) string { - return meta_util.NameWithSuffix(i.Name, alias) + return alias } func (i *Ignite) Address() string { 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 bd14bea82..7432bc1f2 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/singlestore_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/singlestore_helpers.go @@ -216,8 +216,7 @@ func (s *Singlestore) IsStandalone() bool { } func (s *Singlestore) PVCName(alias string) string { - return metautil.NameWithSuffix(s.OffshootName(), alias) - // return s.OffshootName() + return alias } func (s *Singlestore) AggregatorPetSet() string { 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 78df01f39..45fe87fd4 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/solr_helpers.go @@ -254,7 +254,7 @@ func (s *Solr) StatsServiceLabels() map[string]string { } func (s *Solr) PVCName(alias string) string { - return meta_util.NameWithSuffix(s.Name, alias) + return alias } func (s Solr) NodeRoleSpecificLabelKey(roleType SolrNodeRoleType) string { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zookeeper_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zookeeper_helpers.go index c1362aacd..ebf37930b 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zookeeper_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zookeeper_helpers.go @@ -91,7 +91,7 @@ func (z *ZooKeeper) ConfigSecretName() string { } func (z *ZooKeeper) PVCName(alias string) string { - return meta_util.NameWithSuffix(z.Name, alias) + return alias } func (z *ZooKeeper) ServiceName() string { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.conversion.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.conversion.go index 202eb5127..4457c1a65 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.conversion.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.conversion.go @@ -2316,6 +2316,7 @@ func autoConvert_v1_MariaDBSpec_To_v1alpha2_MariaDBSpec(in *v1.MariaDBSpec, out out.AllowedSchemas = (*AllowedConsumers)(unsafe.Pointer(in.AllowedSchemas)) out.HealthChecker = in.HealthChecker out.Archiver = (*Archiver)(unsafe.Pointer(in.Archiver)) + // WARNING: in.Distributed requires manual conversion: does not exist in peer-type return nil } @@ -3746,6 +3747,7 @@ func autoConvert_v1_PostgresSpec_To_v1alpha2_PostgresSpec(in *v1.PostgresSpec, o if err := Convert_v1_AutoOpsSpec_To_v1alpha2_AutoOpsSpec(&in.AutoOps, &out.AutoOps, s); err != nil { return err } + // WARNING: in.Distributed requires manual conversion: does not exist in peer-type out.Version = in.Version out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) out.StandbyMode = (*PostgresStandbyMode)(unsafe.Pointer(in.StandbyMode)) diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types.go index 94fc47e6a..52b69c5d3 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types.go @@ -71,21 +71,20 @@ type CassandraOpsRequestSpec struct { Restart *RestartSpec `json:"restart,omitempty"` // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. Timeout *metav1.Duration `json:"timeout,omitempty"` - // Specifies information necessary for configuring TLS TLS *TLSSpec `json:"tls,omitempty"` - // Keystore encryption secret // +optional KeystoreCredSecret *kubedbApiV1Alpha2.SecretReference `json:"keystoreCredSecret,omitempty"` - + // Specifies information necessary for configuring authSecret of the database + Authentication *AuthSpec `json:"authentication,omitempty"` // ApplyOption is to control the execution of OpsRequest depending on the database state. // +kubebuilder:default="IfReady" Apply ApplyOption `json:"apply,omitempty"` } -// +kubebuilder:validation:Enum=UpdateVersion;VerticalScaling;Restart;VolumeExpansion;HorizontalScaling;Reconfigure;ReconfigureTLS -// ENUM(UpdateVersion, VerticalScaling, Restart, VolumeExpansion, HorizontalScaling, Reconfigure, ReconfigureTLS) +// +kubebuilder:validation:Enum=UpdateVersion;VerticalScaling;Restart;VolumeExpansion;HorizontalScaling;Reconfigure;ReconfigureTLS;RotateAuth +// ENUM(UpdateVersion, VerticalScaling, Restart, VolumeExpansion, HorizontalScaling, Reconfigure, ReconfigureTLS, RotateAuth) type CassandraOpsRequestType string // CassandraHorizontalScalingSpec contains the horizontal scaling information of a Cassandra cluster diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types_enum.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types_enum.go index 32ed47945..3fe280fab 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types_enum.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/cassandra_ops-types_enum.go @@ -26,6 +26,8 @@ const ( CassandraOpsRequestTypeReconfigure CassandraOpsRequestType = "Reconfigure" // CassandraOpsRequestTypeReconfigureTLS is a CassandraOpsRequestType of type ReconfigureTLS. CassandraOpsRequestTypeReconfigureTLS CassandraOpsRequestType = "ReconfigureTLS" + // CassandraOpsRequestTypeRotateAuth is a CassandraOpsRequestType of type RotateAuth. + CassandraOpsRequestTypeRotateAuth CassandraOpsRequestType = "RotateAuth" ) var ErrInvalidCassandraOpsRequestType = fmt.Errorf("not a valid CassandraOpsRequestType, try [%s]", strings.Join(_CassandraOpsRequestTypeNames, ", ")) @@ -38,6 +40,7 @@ var _CassandraOpsRequestTypeNames = []string{ string(CassandraOpsRequestTypeHorizontalScaling), string(CassandraOpsRequestTypeReconfigure), string(CassandraOpsRequestTypeReconfigureTLS), + string(CassandraOpsRequestTypeRotateAuth), } // CassandraOpsRequestTypeNames returns a list of possible string values of CassandraOpsRequestType. @@ -57,6 +60,7 @@ func CassandraOpsRequestTypeValues() []CassandraOpsRequestType { CassandraOpsRequestTypeHorizontalScaling, CassandraOpsRequestTypeReconfigure, CassandraOpsRequestTypeReconfigureTLS, + CassandraOpsRequestTypeRotateAuth, } } @@ -80,6 +84,7 @@ var _CassandraOpsRequestTypeValue = map[string]CassandraOpsRequestType{ "HorizontalScaling": CassandraOpsRequestTypeHorizontalScaling, "Reconfigure": CassandraOpsRequestTypeReconfigure, "ReconfigureTLS": CassandraOpsRequestTypeReconfigureTLS, + "RotateAuth": CassandraOpsRequestTypeRotateAuth, } // ParseCassandraOpsRequestType attempts to convert a string to a CassandraOpsRequestType. diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types.go index 7d3b73e49..8e0c351ca 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types.go @@ -19,6 +19,7 @@ package v1alpha1 import ( core "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -58,8 +59,16 @@ type ClickHouseOpsRequestSpec struct { Authentication *AuthSpec `json:"authentication,omitempty"` // Specifies information necessary for restarting database Restart *RestartSpec `json:"restart,omitempty"` + // Specifies information necessary for horizontal scaling + HorizontalScaling *ClickHouseHorizontalScalingSpec `json:"horizontalScaling,omitempty"` + // Specifies information necessary for upgrading clickhouse + UpdateVersion *ClickHouseUpdateVersionSpec `json:"updateVersion,omitempty"` // Specifies information necessary for vertical scaling VerticalScaling *ClickHouseVerticalScalingSpec `json:"verticalScaling,omitempty"` + // Specifies information necessary for volume expansion + VolumeExpansion *ClickHouseVolumeExpansionSpec `json:"volumeExpansion,omitempty"` + // Specifies information necessary for custom configuration of clickhouse + Configuration *ClickHouseCustomConfigurationSpec `json:"configuration,omitempty"` // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. Timeout *metav1.Duration `json:"timeout,omitempty"` // ApplyOption is to control the execution of OpsRequest depending on the database state. @@ -67,10 +76,44 @@ type ClickHouseOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } -// +kubebuilder:validation:Enum=Restart;VerticalScaling -// ENUM(Restart, VerticalScaling) +// +kubebuilder:validation:Enum=Restart;VerticalScaling;HorizontalScaling;UpdateVersion;VolumeExpansion;Reconfigure +// ENUM(Restart, VerticalScaling, HorizontalScaling, UpdateVersion, VolumeExpansion, Reconfigure) type ClickHouseOpsRequestType string +// ClickHouseUpdateVersionSpec contains the update version information of a clickhouse cluster +type ClickHouseUpdateVersionSpec struct { + // Specifies the target version name from catalog + TargetVersion string `json:"targetVersion,omitempty"` +} + +// ClickHouseVolumeExpansionSpec is the spec for ClickHouse volume expansion +type ClickHouseVolumeExpansionSpec struct { + Mode VolumeExpansionMode `json:"mode"` + // volume specification for nodes + Node *resource.Quantity `json:"node,omitempty"` +} + +// ClickHouseCustomConfigurationSpec is the spec for Reconfiguring the clickhouse Settings +type ClickHouseCustomConfigurationSpec struct { + // ConfigSecret is an optional field to provide custom configuration file for database. + // +optional + ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"` + // ApplyConfig is an optional field to provide clickhouse configuration. + // Provided configuration will be applied to config files stored in ConfigSecret. + // If the ConfigSecret is missing, the operator will create a new k8s secret by the + // following naming convention: {db-name}-user-config . + // Expected input format: + // applyConfig: + // file-name.yml: | + // key: value + // +optional + ApplyConfig map[string]string `json:"applyConfig,omitempty"` + // If set to "true", the user provided configuration will be removed. + // The clickhouse cluster will start will default configuration that is generated by the operator. + // +optional + RemoveCustomConfig bool `json:"removeCustomConfig,omitempty"` +} + // ClickHouseVerticalScalingSpec contains the vertical scaling information of a clickhouse cluster type ClickHouseVerticalScalingSpec struct { // Resource spec for Standalone node @@ -79,6 +122,19 @@ type ClickHouseVerticalScalingSpec struct { Cluster []*ClickHouseClusterVerticalScalingSpec `json:"cluster,omitempty"` } +// ClickHouseHorizontalScalingSpec contains the horizontal scaling information of a clickhouse cluster +type ClickHouseHorizontalScalingSpec struct { + // List of cluster configurations for ClickHouse when running in cluster mode. + Cluster []*ClickHouseClusterHorizontalScalingSpec `json:"cluster,omitempty"` +} + +type ClickHouseClusterHorizontalScalingSpec struct { + // Name of the ClickHouse cluster to which the vertical scaling configuration applies. + ClusterName string `json:"clusterName,omitempty"` + // Number of node + Replicas *int32 `json:"replicas,omitempty"` +} + type ClickHouseClusterVerticalScalingSpec struct { // Name of the ClickHouse cluster to which the vertical scaling configuration applies. ClusterName string `json:"clusterName,omitempty"` diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types_enum.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types_enum.go index 07d673684..0157c2163 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types_enum.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/clickhouse_ops-types_enum.go @@ -16,6 +16,14 @@ const ( ClickHouseOpsRequestTypeRestart ClickHouseOpsRequestType = "Restart" // ClickHouseOpsRequestTypeVerticalScaling is a ClickHouseOpsRequestType of type VerticalScaling. ClickHouseOpsRequestTypeVerticalScaling ClickHouseOpsRequestType = "VerticalScaling" + // ClickHouseOpsRequestTypeHorizontalScaling is a ClickHouseOpsRequestType of type HorizontalScaling. + ClickHouseOpsRequestTypeHorizontalScaling ClickHouseOpsRequestType = "HorizontalScaling" + // ClickHouseOpsRequestTypeUpdateVersion is a ClickHouseOpsRequestType of type UpdateVersion. + ClickHouseOpsRequestTypeUpdateVersion ClickHouseOpsRequestType = "UpdateVersion" + // ClickHouseOpsRequestTypeVolumeExpansion is a ClickHouseOpsRequestType of type VolumeExpansion. + ClickHouseOpsRequestTypeVolumeExpansion ClickHouseOpsRequestType = "VolumeExpansion" + // ClickHouseOpsRequestTypeReconfigure is a ClickHouseOpsRequestType of type Reconfigure. + ClickHouseOpsRequestTypeReconfigure ClickHouseOpsRequestType = "Reconfigure" ) var ErrInvalidClickHouseOpsRequestType = fmt.Errorf("not a valid ClickHouseOpsRequestType, try [%s]", strings.Join(_ClickHouseOpsRequestTypeNames, ", ")) @@ -23,6 +31,10 @@ var ErrInvalidClickHouseOpsRequestType = fmt.Errorf("not a valid ClickHouseOpsRe var _ClickHouseOpsRequestTypeNames = []string{ string(ClickHouseOpsRequestTypeRestart), string(ClickHouseOpsRequestTypeVerticalScaling), + string(ClickHouseOpsRequestTypeHorizontalScaling), + string(ClickHouseOpsRequestTypeUpdateVersion), + string(ClickHouseOpsRequestTypeVolumeExpansion), + string(ClickHouseOpsRequestTypeReconfigure), } // ClickHouseOpsRequestTypeNames returns a list of possible string values of ClickHouseOpsRequestType. @@ -37,6 +49,10 @@ func ClickHouseOpsRequestTypeValues() []ClickHouseOpsRequestType { return []ClickHouseOpsRequestType{ ClickHouseOpsRequestTypeRestart, ClickHouseOpsRequestTypeVerticalScaling, + ClickHouseOpsRequestTypeHorizontalScaling, + ClickHouseOpsRequestTypeUpdateVersion, + ClickHouseOpsRequestTypeVolumeExpansion, + ClickHouseOpsRequestTypeReconfigure, } } @@ -53,8 +69,12 @@ func (x ClickHouseOpsRequestType) IsValid() bool { } var _ClickHouseOpsRequestTypeValue = map[string]ClickHouseOpsRequestType{ - "Restart": ClickHouseOpsRequestTypeRestart, - "VerticalScaling": ClickHouseOpsRequestTypeVerticalScaling, + "Restart": ClickHouseOpsRequestTypeRestart, + "VerticalScaling": ClickHouseOpsRequestTypeVerticalScaling, + "HorizontalScaling": ClickHouseOpsRequestTypeHorizontalScaling, + "UpdateVersion": ClickHouseOpsRequestTypeUpdateVersion, + "VolumeExpansion": ClickHouseOpsRequestTypeVolumeExpansion, + "Reconfigure": ClickHouseOpsRequestTypeReconfigure, } // ParseClickHouseOpsRequestType attempts to convert a string to a ClickHouseOpsRequestType. diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go index ae81a48f1..9756fa81d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go @@ -361,6 +361,7 @@ const ( ScaleUpRedisReplicasInSentinelMode = "ScaleUpRedisReplicasInSentinelMode" ScaleDownRedisReplicasInSentinelMode = "ScaleDownRedisReplicasInSentinelMode" + RedisUpdateAnnounces = "UpdateAnnounces" HorizontalScaleReplicasUp = "HorizontalScaleReplicasUp" HorizontalScaleReplicasDown = "HorizontalScaleReplicasDown" HorizontalScaleSentinelUp = "HorizontalScaleSentinelUp" 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 049f2d5ce..4613c7033 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go @@ -512,11 +512,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraUpdateVersionSpec": schema_apimachinery_apis_ops_v1alpha1_CassandraUpdateVersionSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_CassandraVerticalScalingSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraVolumeExpansionSpec": schema_apimachinery_apis_ops_v1alpha1_CassandraVolumeExpansionSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseClusterHorizontalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseClusterHorizontalScalingSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseClusterVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseClusterVerticalScalingSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseCustomConfigurationSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseCustomConfigurationSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseHorizontalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseHorizontalScalingSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseOpsRequest": schema_apimachinery_apis_ops_v1alpha1_ClickHouseOpsRequest(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseOpsRequestList": schema_apimachinery_apis_ops_v1alpha1_ClickHouseOpsRequestList(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseOpsRequestSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseOpsRequestSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseUpdateVersionSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseUpdateVersionSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseVerticalScalingSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseVolumeExpansionSpec": schema_apimachinery_apis_ops_v1alpha1_ClickHouseVolumeExpansionSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ConfigNode": schema_apimachinery_apis_ops_v1alpha1_ConfigNode(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ContainerResources": schema_apimachinery_apis_ops_v1alpha1_ContainerResources(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.DruidCustomConfigurationSpec": schema_apimachinery_apis_ops_v1alpha1_DruidCustomConfigurationSpec(ref), @@ -26365,6 +26370,12 @@ func schema_apimachinery_apis_ops_v1alpha1_CassandraOpsRequestSpec(ref common.Re Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, + "authentication": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies information necessary for configuring authSecret of the database", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.AuthSpec"), + }, + }, "apply": { SchemaProps: spec.SchemaProps{ Description: "ApplyOption is to control the execution of OpsRequest depending on the database state.", @@ -26377,7 +26388,7 @@ func schema_apimachinery_apis_ops_v1alpha1_CassandraOpsRequestSpec(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraVolumeExpansionSpec", "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/kubedb/v1alpha2.SecretReference", "kubedb.dev/apimachinery/apis/ops/v1alpha1.AuthSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.CassandraVolumeExpansionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.TLSSpec"}, } } @@ -26451,6 +26462,32 @@ func schema_apimachinery_apis_ops_v1alpha1_CassandraVolumeExpansionSpec(ref comm } } +func schema_apimachinery_apis_ops_v1alpha1_ClickHouseClusterHorizontalScalingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the ClickHouse cluster to which the vertical scaling configuration applies.", + Type: []string{"string"}, + Format: "", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of node", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + func schema_apimachinery_apis_ops_v1alpha1_ClickHouseClusterVerticalScalingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -26478,6 +26515,78 @@ func schema_apimachinery_apis_ops_v1alpha1_ClickHouseClusterVerticalScalingSpec( } } +func schema_apimachinery_apis_ops_v1alpha1_ClickHouseCustomConfigurationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClickHouseCustomConfigurationSpec is the spec for Reconfiguring the clickhouse Settings", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigSecret is an optional field to provide custom configuration file for database.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + "applyConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ApplyConfig is an optional field to provide clickhouse configuration. Provided configuration will be applied to config files stored in ConfigSecret. If the ConfigSecret is missing, the operator will create a new k8s secret by the following naming convention: {db-name}-user-config . Expected input format:\n\tapplyConfig:\n\t\tfile-name.yml: |\n\t\t\tkey: value", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "removeCustomConfig": { + SchemaProps: spec.SchemaProps{ + Description: "If set to \"true\", the user provided configuration will be removed. The clickhouse cluster will start will default configuration that is generated by the operator.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference"}, + } +} + +func schema_apimachinery_apis_ops_v1alpha1_ClickHouseHorizontalScalingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClickHouseHorizontalScalingSpec contains the horizontal scaling information of a clickhouse cluster", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cluster": { + SchemaProps: spec.SchemaProps{ + Description: "List of cluster configurations for ClickHouse when running in cluster mode.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseClusterHorizontalScalingSpec"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseClusterHorizontalScalingSpec"}, + } +} + func schema_apimachinery_apis_ops_v1alpha1_ClickHouseOpsRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -26607,12 +26716,36 @@ func schema_apimachinery_apis_ops_v1alpha1_ClickHouseOpsRequestSpec(ref common.R Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"), }, }, + "horizontalScaling": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies information necessary for horizontal scaling", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseHorizontalScalingSpec"), + }, + }, + "updateVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies information necessary for upgrading clickhouse", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseUpdateVersionSpec"), + }, + }, "verticalScaling": { SchemaProps: spec.SchemaProps{ Description: "Specifies information necessary for vertical scaling", Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseVerticalScalingSpec"), }, }, + "volumeExpansion": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies information necessary for volume expansion", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseVolumeExpansionSpec"), + }, + }, + "configuration": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies information necessary for custom configuration of clickhouse", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseCustomConfigurationSpec"), + }, + }, "timeout": { SchemaProps: spec.SchemaProps{ Description: "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", @@ -26631,7 +26764,27 @@ func schema_apimachinery_apis_ops_v1alpha1_ClickHouseOpsRequestSpec(ref common.R }, }, 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.ClickHouseVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"}, + "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.ClickHouseCustomConfigurationSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseHorizontalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseUpdateVersionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseVerticalScalingSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.ClickHouseVolumeExpansionSpec", "kubedb.dev/apimachinery/apis/ops/v1alpha1.RestartSpec"}, + } +} + +func schema_apimachinery_apis_ops_v1alpha1_ClickHouseUpdateVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClickHouseUpdateVersionSpec contains the update version information of a clickhouse cluster", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetVersion": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the target version name from catalog", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, } } @@ -26669,6 +26822,35 @@ func schema_apimachinery_apis_ops_v1alpha1_ClickHouseVerticalScalingSpec(ref com } } +func schema_apimachinery_apis_ops_v1alpha1_ClickHouseVolumeExpansionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClickHouseVolumeExpansionSpec is the spec for ClickHouse volume expansion", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mode": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "node": { + SchemaProps: spec.SchemaProps{ + Description: "volume specification for nodes", + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + Required: []string{"mode"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + func schema_apimachinery_apis_ops_v1alpha1_ConfigNode(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -34162,9 +34344,17 @@ func schema_apimachinery_apis_ops_v1alpha1_RedisHorizontalScalingSpec(ref common Format: "int32", }, }, + "announce": { + SchemaProps: spec.SchemaProps{ + Description: "Announce is used to announce the redis cluster endpoints. It is used to set cluster-announce-ip, cluster-announce-port, cluster-announce-bus-port, cluster-announce-tls-port While scaling up shard or replica just provide the missing announces.", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.Announce"), + }, + }, }, }, }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/ops/v1alpha1.Announce"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/redis_ops_types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/redis_ops_types.go index ce04d58c3..cdcbff903 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/redis_ops_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/redis_ops_types.go @@ -128,6 +128,12 @@ type RedisHorizontalScalingSpec struct { Shards *int32 `json:"shards,omitempty"` // specifies the number of replica of the shards Replicas *int32 `json:"replicas,omitempty"` + + // Announce is used to announce the redis cluster endpoints. + // It is used to set + // cluster-announce-ip, cluster-announce-port, cluster-announce-bus-port, cluster-announce-tls-port + // While scaling up shard or replica just provide the missing announces. + Announce *Announce `json:"announce,omitempty"` } // RedisVerticalScalingSpec is the spec for Redis vertical scaling 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 3e86c51c6..3571c7d1c 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 @@ -251,6 +251,11 @@ func (in *CassandraOpsRequestSpec) DeepCopyInto(out *CassandraOpsRequestSpec) { *out = new(v1alpha2.SecretReference) (*in).DeepCopyInto(*out) } + if in.Authentication != nil { + in, out := &in.Authentication, &out.Authentication + *out = new(AuthSpec) + (*in).DeepCopyInto(*out) + } return } @@ -322,6 +327,27 @@ func (in *CassandraVolumeExpansionSpec) DeepCopy() *CassandraVolumeExpansionSpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseClusterHorizontalScalingSpec) DeepCopyInto(out *ClickHouseClusterHorizontalScalingSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseClusterHorizontalScalingSpec. +func (in *ClickHouseClusterHorizontalScalingSpec) DeepCopy() *ClickHouseClusterHorizontalScalingSpec { + if in == nil { + return nil + } + out := new(ClickHouseClusterHorizontalScalingSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseClusterVerticalScalingSpec) DeepCopyInto(out *ClickHouseClusterVerticalScalingSpec) { *out = *in @@ -343,6 +369,61 @@ func (in *ClickHouseClusterVerticalScalingSpec) DeepCopy() *ClickHouseClusterVer return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseCustomConfigurationSpec) DeepCopyInto(out *ClickHouseCustomConfigurationSpec) { + *out = *in + if in.ConfigSecret != nil { + in, out := &in.ConfigSecret, &out.ConfigSecret + *out = new(v1.LocalObjectReference) + **out = **in + } + if in.ApplyConfig != nil { + in, out := &in.ApplyConfig, &out.ApplyConfig + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseCustomConfigurationSpec. +func (in *ClickHouseCustomConfigurationSpec) DeepCopy() *ClickHouseCustomConfigurationSpec { + if in == nil { + return nil + } + out := new(ClickHouseCustomConfigurationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseHorizontalScalingSpec) DeepCopyInto(out *ClickHouseHorizontalScalingSpec) { + *out = *in + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = make([]*ClickHouseClusterHorizontalScalingSpec, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ClickHouseClusterHorizontalScalingSpec) + (*in).DeepCopyInto(*out) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseHorizontalScalingSpec. +func (in *ClickHouseHorizontalScalingSpec) DeepCopy() *ClickHouseHorizontalScalingSpec { + if in == nil { + return nil + } + out := new(ClickHouseHorizontalScalingSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseOpsRequest) DeepCopyInto(out *ClickHouseOpsRequest) { *out = *in @@ -418,11 +499,31 @@ func (in *ClickHouseOpsRequestSpec) DeepCopyInto(out *ClickHouseOpsRequestSpec) *out = new(RestartSpec) **out = **in } + if in.HorizontalScaling != nil { + in, out := &in.HorizontalScaling, &out.HorizontalScaling + *out = new(ClickHouseHorizontalScalingSpec) + (*in).DeepCopyInto(*out) + } + if in.UpdateVersion != nil { + in, out := &in.UpdateVersion, &out.UpdateVersion + *out = new(ClickHouseUpdateVersionSpec) + **out = **in + } if in.VerticalScaling != nil { in, out := &in.VerticalScaling, &out.VerticalScaling *out = new(ClickHouseVerticalScalingSpec) (*in).DeepCopyInto(*out) } + if in.VolumeExpansion != nil { + in, out := &in.VolumeExpansion, &out.VolumeExpansion + *out = new(ClickHouseVolumeExpansionSpec) + (*in).DeepCopyInto(*out) + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = new(ClickHouseCustomConfigurationSpec) + (*in).DeepCopyInto(*out) + } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout *out = new(metav1.Duration) @@ -441,6 +542,22 @@ func (in *ClickHouseOpsRequestSpec) DeepCopy() *ClickHouseOpsRequestSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseUpdateVersionSpec) DeepCopyInto(out *ClickHouseUpdateVersionSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseUpdateVersionSpec. +func (in *ClickHouseUpdateVersionSpec) DeepCopy() *ClickHouseUpdateVersionSpec { + if in == nil { + return nil + } + out := new(ClickHouseUpdateVersionSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseVerticalScalingSpec) DeepCopyInto(out *ClickHouseVerticalScalingSpec) { *out = *in @@ -473,6 +590,27 @@ func (in *ClickHouseVerticalScalingSpec) DeepCopy() *ClickHouseVerticalScalingSp return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseVolumeExpansionSpec) DeepCopyInto(out *ClickHouseVolumeExpansionSpec) { + *out = *in + if in.Node != nil { + in, out := &in.Node, &out.Node + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseVolumeExpansionSpec. +func (in *ClickHouseVolumeExpansionSpec) DeepCopy() *ClickHouseVolumeExpansionSpec { + if in == nil { + return nil + } + out := new(ClickHouseVolumeExpansionSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConfigNode) DeepCopyInto(out *ConfigNode) { *out = *in @@ -5943,6 +6081,11 @@ func (in *RedisHorizontalScalingSpec) DeepCopyInto(out *RedisHorizontalScalingSp *out = new(int32) **out = **in } + if in.Announce != nil { + in, out := &in.Announce, &out.Announce + *out = new(Announce) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go index dcbe8c560..1403795be 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go @@ -35,6 +35,7 @@ type AutoscalingV1alpha1Interface interface { ElasticsearchAutoscalersGetter EtcdAutoscalersGetter FerretDBAutoscalersGetter + HazelcastAutoscalersGetter KafkaAutoscalersGetter MSSQLServerAutoscalersGetter MariaDBAutoscalersGetter @@ -83,6 +84,10 @@ func (c *AutoscalingV1alpha1Client) FerretDBAutoscalers(namespace string) Ferret return newFerretDBAutoscalers(c, namespace) } +func (c *AutoscalingV1alpha1Client) HazelcastAutoscalers(namespace string) HazelcastAutoscalerInterface { + return newHazelcastAutoscalers(c, namespace) +} + func (c *AutoscalingV1alpha1Client) KafkaAutoscalers(namespace string) KafkaAutoscalerInterface { return newKafkaAutoscalers(c, namespace) } diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go index e31550aeb..5dbffa0f3 100644 --- a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go @@ -30,6 +30,8 @@ type EtcdAutoscalerExpansion interface{} type FerretDBAutoscalerExpansion interface{} +type HazelcastAutoscalerExpansion interface{} + type KafkaAutoscalerExpansion interface{} type MSSQLServerAutoscalerExpansion interface{} diff --git a/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/hazelcastautoscaler.go b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/hazelcastautoscaler.go new file mode 100644 index 000000000..db48775e8 --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/client/clientset/versioned/typed/autoscaling/v1alpha1/hazelcastautoscaler.go @@ -0,0 +1,196 @@ +/* +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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1" + scheme "kubedb.dev/apimachinery/client/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// HazelcastAutoscalersGetter has a method to return a HazelcastAutoscalerInterface. +// A group's client should implement this interface. +type HazelcastAutoscalersGetter interface { + HazelcastAutoscalers(namespace string) HazelcastAutoscalerInterface +} + +// HazelcastAutoscalerInterface has methods to work with HazelcastAutoscaler resources. +type HazelcastAutoscalerInterface interface { + Create(ctx context.Context, hazelcastAutoscaler *v1alpha1.HazelcastAutoscaler, opts v1.CreateOptions) (*v1alpha1.HazelcastAutoscaler, error) + Update(ctx context.Context, hazelcastAutoscaler *v1alpha1.HazelcastAutoscaler, opts v1.UpdateOptions) (*v1alpha1.HazelcastAutoscaler, error) + UpdateStatus(ctx context.Context, hazelcastAutoscaler *v1alpha1.HazelcastAutoscaler, opts v1.UpdateOptions) (*v1alpha1.HazelcastAutoscaler, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.HazelcastAutoscaler, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.HazelcastAutoscalerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HazelcastAutoscaler, err error) + HazelcastAutoscalerExpansion +} + +// hazelcastAutoscalers implements HazelcastAutoscalerInterface +type hazelcastAutoscalers struct { + client rest.Interface + ns string +} + +// newHazelcastAutoscalers returns a HazelcastAutoscalers +func newHazelcastAutoscalers(c *AutoscalingV1alpha1Client, namespace string) *hazelcastAutoscalers { + return &hazelcastAutoscalers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the hazelcastAutoscaler, and returns the corresponding hazelcastAutoscaler object, and an error if there is any. +func (c *hazelcastAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.HazelcastAutoscaler, err error) { + result = &v1alpha1.HazelcastAutoscaler{} + err = c.client.Get(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HazelcastAutoscalers that match those selectors. +func (c *hazelcastAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.HazelcastAutoscalerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.HazelcastAutoscalerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested hazelcastAutoscalers. +func (c *hazelcastAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a hazelcastAutoscaler and creates it. Returns the server's representation of the hazelcastAutoscaler, and an error, if there is any. +func (c *hazelcastAutoscalers) Create(ctx context.Context, hazelcastAutoscaler *v1alpha1.HazelcastAutoscaler, opts v1.CreateOptions) (result *v1alpha1.HazelcastAutoscaler, err error) { + result = &v1alpha1.HazelcastAutoscaler{} + err = c.client.Post(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(hazelcastAutoscaler). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a hazelcastAutoscaler and updates it. Returns the server's representation of the hazelcastAutoscaler, and an error, if there is any. +func (c *hazelcastAutoscalers) Update(ctx context.Context, hazelcastAutoscaler *v1alpha1.HazelcastAutoscaler, opts v1.UpdateOptions) (result *v1alpha1.HazelcastAutoscaler, err error) { + result = &v1alpha1.HazelcastAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + Name(hazelcastAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(hazelcastAutoscaler). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *hazelcastAutoscalers) UpdateStatus(ctx context.Context, hazelcastAutoscaler *v1alpha1.HazelcastAutoscaler, opts v1.UpdateOptions) (result *v1alpha1.HazelcastAutoscaler, err error) { + result = &v1alpha1.HazelcastAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + Name(hazelcastAutoscaler.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(hazelcastAutoscaler). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the hazelcastAutoscaler and deletes it. Returns an error if one occurs. +func (c *hazelcastAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *hazelcastAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched hazelcastAutoscaler. +func (c *hazelcastAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.HazelcastAutoscaler, err error) { + result = &v1alpha1.HazelcastAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("hazelcastautoscalers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_hazelcastautoscalers.yaml b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_hazelcastautoscalers.yaml new file mode 100644 index 000000000..ed0b41c12 --- /dev/null +++ b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_hazelcastautoscalers.yaml @@ -0,0 +1,345 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: kubedb + name: hazelcastautoscalers.autoscaling.kubedb.com +spec: + group: autoscaling.kubedb.com + names: + categories: + - autoscaler + - kubedb + - appscode + kind: HazelcastAutoscaler + listKind: HazelcastAutoscalerList + plural: hazelcastautoscalers + shortNames: + - hzscaler + singular: hazelcastautoscaler + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + compute: + properties: + hazelcast: + properties: + containerControlledValues: + enum: + - RequestsAndLimits + - RequestsOnly + type: string + controlledResources: + items: + type: string + type: array + inMemoryStorage: + properties: + scalingFactorPercentage: + format: int32 + type: integer + usageThresholdPercentage: + format: int32 + type: integer + type: object + maxAllowed: + 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 + minAllowed: + 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 + podLifeTimeThreshold: + type: string + resourceDiffPercentage: + format: int32 + type: integer + trigger: + type: string + type: object + nodeTopology: + properties: + name: + type: string + scaleDownDiffPercentage: + default: 25 + format: int32 + type: integer + scaleUpDiffPercentage: + default: 15 + format: int32 + type: integer + type: object + type: object + databaseRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + opsRequestOptions: + properties: + apply: + default: IfReady + enum: + - IfReady + - Always + type: string + timeout: + type: string + type: object + storage: + properties: + hazelcast: + properties: + expansionMode: + enum: + - Offline + - Online + type: string + scalingRules: + items: + properties: + appliesUpto: + type: string + threshold: + type: string + required: + - appliesUpto + - threshold + type: object + type: array + scalingThreshold: + format: int32 + type: integer + trigger: + type: string + upperBound: + 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 + usageThreshold: + format: int32 + type: integer + required: + - expansionMode + type: object + type: object + required: + - databaseRef + type: object + status: + properties: + checkpoints: + items: + properties: + cpuHistogram: + properties: + bucketWeights: + items: + properties: + index: + type: integer + weight: + format: int32 + type: integer + required: + - index + - weight + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + referenceTimestamp: + format: date-time + nullable: true + type: string + totalWeight: + format: double + type: number + type: object + firstSampleStart: + format: date-time + nullable: true + type: string + lastSampleStart: + format: date-time + nullable: true + type: string + lastUpdateTime: + format: date-time + nullable: true + type: string + memoryHistogram: + properties: + bucketWeights: + items: + properties: + index: + type: integer + weight: + format: int32 + type: integer + required: + - index + - weight + type: object + type: array + x-kubernetes-preserve-unknown-fields: true + referenceTimestamp: + format: date-time + nullable: true + type: string + totalWeight: + format: double + type: number + type: object + ref: + properties: + containerName: + type: string + vpaObjectName: + type: string + type: object + totalSamplesCount: + type: integer + version: + type: string + type: object + type: array + 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: + - InProgress + - Current + - Terminating + - Failed + type: string + vpas: + items: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + recommendation: + properties: + containerRecommendations: + items: + properties: + containerName: + type: string + lowerBound: + 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 + target: + 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 + uncappedTarget: + 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 + upperBound: + 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 + required: + - target + type: object + type: array + type: object + vpaName: + type: string + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_mariadbs.yaml b/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_mariadbs.yaml index b7113438d..bd7f05531 100644 --- a/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_mariadbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_mariadbs.yaml @@ -149,6 +149,8 @@ spec: - WipeOut - DoNotTerminate type: string + distributed: + type: boolean halted: type: boolean healthChecker: @@ -4787,6 +4789,13 @@ spec: properties: maxscale: properties: + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic enableUI: type: boolean podTemplate: diff --git a/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_postgreses.yaml b/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_postgreses.yaml index 520156f9d..1c82ac644 100644 --- a/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_postgreses.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/gitops.kubedb.com_postgreses.yaml @@ -212,6 +212,8 @@ spec: - WipeOut - DoNotTerminate type: string + distributed: + type: boolean enforceFsGroup: type: boolean halted: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml index 965a0ae44..ac1e9df22 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml @@ -171,6 +171,8 @@ spec: - WipeOut - DoNotTerminate type: string + distributed: + type: boolean halted: type: boolean healthChecker: @@ -4809,6 +4811,13 @@ spec: properties: maxscale: properties: + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic enableUI: type: boolean podTemplate: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml index 2827e69a6..37382f4e1 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml @@ -234,6 +234,8 @@ spec: - WipeOut - DoNotTerminate type: string + distributed: + type: boolean enforceFsGroup: type: boolean halted: diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_cassandraopsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_cassandraopsrequests.yaml index 94ec1c6a1..96be44f21 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_cassandraopsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_cassandraopsrequests.yaml @@ -48,6 +48,16 @@ spec: - IfReady - Always type: string + authentication: + properties: + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: object configuration: properties: applyConfig: @@ -213,6 +223,7 @@ spec: - HorizontalScaling - Reconfigure - ReconfigureTLS + - RotateAuth type: string updateVersion: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_clickhouseopsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_clickhouseopsrequests.yaml index 15f38da10..17fc6dc04 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_clickhouseopsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_clickhouseopsrequests.yaml @@ -58,6 +58,22 @@ spec: type: object x-kubernetes-map-type: atomic type: object + configuration: + properties: + applyConfig: + additionalProperties: + type: string + type: object + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + removeCustomConfig: + type: boolean + type: object databaseRef: properties: name: @@ -65,6 +81,19 @@ spec: type: string type: object x-kubernetes-map-type: atomic + horizontalScaling: + properties: + cluster: + items: + properties: + clusterName: + type: string + replicas: + format: int32 + type: integer + type: object + type: array + type: object restart: type: object timeout: @@ -73,7 +102,16 @@ spec: enum: - Restart - VerticalScaling + - HorizontalScaling + - UpdateVersion + - VolumeExpansion + - Reconfigure type: string + updateVersion: + properties: + targetVersion: + type: string + type: object verticalScaling: properties: cluster: @@ -180,6 +218,22 @@ spec: type: object type: object type: object + volumeExpansion: + properties: + mode: + enum: + - Offline + - Online + type: string + node: + 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 + required: + - mode + type: object required: - databaseRef - type diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_redisopsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_redisopsrequests.yaml index 30d56fe84..e88668f2a 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_redisopsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_redisopsrequests.yaml @@ -101,6 +101,24 @@ spec: x-kubernetes-map-type: atomic horizontalScaling: properties: + announce: + properties: + shards: + items: + properties: + endpoints: + items: + type: string + type: array + type: object + type: array + type: + default: hostname + enum: + - ip + - hostname + type: string + type: object replicas: format: int32 type: integer diff --git a/vendor/kubedb.dev/apimachinery/pkg/factory/client.go b/vendor/kubedb.dev/apimachinery/pkg/factory/client.go index 44f0466cf..2c42b663e 100644 --- a/vendor/kubedb.dev/apimachinery/pkg/factory/client.go +++ b/vendor/kubedb.dev/apimachinery/pkg/factory/client.go @@ -35,6 +35,7 @@ import ( sidekickapi "kubeops.dev/sidekick/apis/apps/v1alpha1" stashcoreapi "kubestash.dev/apimachinery/apis/core/v1alpha1" stashstorageapi "kubestash.dev/apimachinery/apis/storage/v1alpha1" + kubesliceapi "open-cluster-management.io/api/work/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" stashscheme "stash.appscode.dev/apimachinery/client/clientset/versioned/scheme" @@ -116,6 +117,10 @@ func NewUncachedClient(cfg *rest.Config) (client.Client, error) { return nil, err } + if err := kubesliceapi.AddToScheme(scheme); err != nil { + return nil, err + } + return client.New(cfg, client.Options{ Scheme: scheme, Mapper: mapper, diff --git a/vendor/kubedb.dev/db-client-go/elasticsearch/kubedb_client_builder.go b/vendor/kubedb.dev/db-client-go/elasticsearch/kubedb_client_builder.go index 3e53fb7a5..1d69a3dda 100644 --- a/vendor/kubedb.dev/db-client-go/elasticsearch/kubedb_client_builder.go +++ b/vendor/kubedb.dev/db-client-go/elasticsearch/kubedb_client_builder.go @@ -45,6 +45,7 @@ import ( osapiv2 "github.com/opensearch-project/opensearch-go/v2/opensearchapi" "github.com/pkg/errors" core "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -91,6 +92,11 @@ func (o *KubeDBClientBuilder) GetElasticClient() (*Client, error) { } var esVersion catalog.ElasticsearchVersion + esVersion.SetGroupVersionKind(schema.GroupVersionKind{ + Group: catalog.SchemeGroupVersion.Group, + Version: catalog.SchemeGroupVersion.Version, + Kind: catalog.ResourceKindElasticsearchVersion, + }) err := o.kc.Get(o.ctx, client.ObjectKey{Namespace: o.db.Namespace, Name: o.db.Spec.Version}, &esVersion) if err != nil { return nil, errors.Errorf("Failed to get elasticsearchVersion with %s", err) diff --git a/vendor/kubeops.dev/petset/apis/apps/v1/constants.go b/vendor/kubeops.dev/petset/apis/apps/v1/constants.go new file mode 100644 index 000000000..236d9fbe9 --- /dev/null +++ b/vendor/kubeops.dev/petset/apis/apps/v1/constants.go @@ -0,0 +1,24 @@ +/* +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 v1 + +const ( + ManifestWorkRoleLabel = "open-cluster-management.io/role" + ManifestWorkClusterNameLabel = "open-cluster-management.io/cluster-name" + RolePod = "pod" + RolePVC = "pvc" +) diff --git a/vendor/kubeops.dev/petset/apis/apps/v1/petset_types.go b/vendor/kubeops.dev/petset/apis/apps/v1/petset_types.go index abae4dd46..8819f39c0 100644 --- a/vendor/kubeops.dev/petset/apis/apps/v1/petset_types.go +++ b/vendor/kubeops.dev/petset/apis/apps/v1/petset_types.go @@ -62,6 +62,9 @@ type PetSet struct { // A PetSetSpec is the specification of a PetSet. type PetSetSpec struct { + // Distributed means manifestworks will be used to manage pods + Distributed bool `json:"distributed,omitempty"` + // replicas is the desired number of replicas of the given Template. // These are replicas in the sense that they are instantiations of the // same Template, but individual replicas also have a consistent identity. diff --git a/vendor/kubeops.dev/petset/apis/apps/v1/placementpolicy_types.go b/vendor/kubeops.dev/petset/apis/apps/v1/placementpolicy_types.go index fdfba6a1c..9cd00bee7 100644 --- a/vendor/kubeops.dev/petset/apis/apps/v1/placementpolicy_types.go +++ b/vendor/kubeops.dev/petset/apis/apps/v1/placementpolicy_types.go @@ -63,6 +63,20 @@ type PlacementPolicySpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity `json:"affinity,omitempty"` + + // OCM provides spec for distributed pod placements using open cluster management + // +optional + OCM *OCMSpec `json:"ocm,omitempty"` +} + +type OCMSpec struct { + DistributionRules []DistributionRule `json:"distributionRules,omitempty"` + SliceName string `json:"sliceName,omitempty"` +} + +type DistributionRule struct { + ClusterName string `json:"clusterName,omitempty"` + Replicas []int32 `json:"replicas,omitempty"` } type ZoneSpreadConstraint struct { diff --git a/vendor/kubeops.dev/petset/apis/apps/v1/zz_generated.deepcopy.go b/vendor/kubeops.dev/petset/apis/apps/v1/zz_generated.deepcopy.go index c87055014..d63a7f2e1 100644 --- a/vendor/kubeops.dev/petset/apis/apps/v1/zz_generated.deepcopy.go +++ b/vendor/kubeops.dev/petset/apis/apps/v1/zz_generated.deepcopy.go @@ -51,6 +51,27 @@ func (in *Affinity) DeepCopy() *Affinity { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DistributionRule) DeepCopyInto(out *DistributionRule) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = make([]int32, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionRule. +func (in *DistributionRule) DeepCopy() *DistributionRule { + if in == nil { + return nil + } + out := new(DistributionRule) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeAffinityRule) DeepCopyInto(out *NodeAffinityRule) { *out = *in @@ -90,6 +111,29 @@ func (in *NodeSpreadConstraint) DeepCopy() *NodeSpreadConstraint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OCMSpec) DeepCopyInto(out *OCMSpec) { + *out = *in + if in.DistributionRules != nil { + in, out := &in.DistributionRules, &out.DistributionRules + *out = make([]DistributionRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCMSpec. +func (in *OCMSpec) DeepCopy() *OCMSpec { + if in == nil { + return nil + } + out := new(OCMSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PetSet) DeepCopyInto(out *PetSet) { *out = *in @@ -284,6 +328,11 @@ func (in *PlacementPolicySpec) DeepCopyInto(out *PlacementPolicySpec) { *out = new(Affinity) (*in).DeepCopyInto(*out) } + if in.OCM != nil { + in, out := &in.OCM, &out.OCM + *out = new(OCMSpec) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/kubeops.dev/petset/client/listers/apps/v1/petset_expansion.go b/vendor/kubeops.dev/petset/client/listers/apps/v1/petset_expansion.go index f91aba74b..5b8967306 100644 --- a/vendor/kubeops.dev/petset/client/listers/apps/v1/petset_expansion.go +++ b/vendor/kubeops.dev/petset/client/listers/apps/v1/petset_expansion.go @@ -24,12 +24,16 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/klog/v2" + apiworkv1 "open-cluster-management.io/api/work/v1" ) // PetSetListerExpansion allows custom methods to be added to // PetSetLister. type PetSetListerExpansion interface { GetPodPetSets(pod *v1.Pod) ([]*api.PetSet, error) + GetManifestWorkPetSets(mw *apiworkv1.ManifestWork) ([]*api.PetSet, error) } // PetSetNamespaceListerExpansion allows custom methods to be added to @@ -77,3 +81,47 @@ func (s *petSetLister) GetPodPetSets(pod *v1.Pod) ([]*api.PetSet, error) { return psList, nil } + +// GetManifestWorkPetSets returns a list of PetSets that potentially match a manifestwork. +// It lists PetSets across all namespaces and matches them based on labels. +func (s *petSetLister) GetManifestWorkPetSets(mw *apiworkv1.ManifestWork) ([]*api.PetSet, error) { + if len(mw.Labels) == 0 { + return nil, fmt.Errorf("no PetSets found for manifestwork %s because it has no labels", mw.Name) + } + + list, err := s.List(labels.Everything()) + if err != nil { + return nil, err + } + + var psList []*api.PetSet + for _, ps := range list { + selector, err := metav1.LabelSelectorAsSelector(ps.Spec.Selector) + if err != nil { + klog.Warningf("PetSet %s/%s has an invalid selector: %v", ps.Namespace, ps.Name, err) + continue + } + + if selector.Empty() || !selector.Matches(labels.Set(mw.Labels)) { + continue + } + psList = append(psList, ps) + } + + if len(psList) == 0 { + return nil, fmt.Errorf("could not find any PetSet for manifestwork %v/%s in any namespace with labels: %v", mw.Namespace, mw.Name, mw.Labels) + } + + if len(psList) > 1 { + setNames := []string{} + for _, s := range psList { + setNames = append(setNames, s.Name) + } + utilruntime.HandleError( + fmt.Errorf( + "user error: more than one PetSet is selecting manifestwork with labels: %+v. Sets: %v", + mw.Labels, setNames)) + } + + return psList, nil +} diff --git a/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_petsets.yaml b/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_petsets.yaml index 79aaf17a5..8431703f5 100644 --- a/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_petsets.yaml +++ b/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_petsets.yaml @@ -46,6 +46,10 @@ spec: spec: description: Spec defines the desired identities of pods in this set. properties: + distributed: + description: Distributed means manifestworks will be used to manage + pods + type: boolean minReadySeconds: description: |- Minimum number of seconds for which a newly created pod should be ready diff --git a/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_placementpolicies.yaml b/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_placementpolicies.yaml index b2968dd1d..f2a8e5de3 100644 --- a/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_placementpolicies.yaml +++ b/vendor/kubeops.dev/petset/crds/apps.k8s.appscode.com_placementpolicies.yaml @@ -100,6 +100,25 @@ spec: - maxSkew - whenUnsatisfiable type: object + ocm: + description: OCM provides spec for distributed pod placements using + open cluster management + properties: + distributionRules: + items: + properties: + clusterName: + type: string + replicas: + items: + format: int32 + type: integer + type: array + type: object + type: array + sliceName: + type: string + type: object zoneSpreadConstraint: properties: maxSkew: diff --git a/vendor/modules.txt b/vendor/modules.txt index c3d5426be..5ef776904 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -18,7 +18,7 @@ github.com/beorn7/perks/quantile # github.com/blang/semver/v4 v4.0.0 ## explicit; go 1.14 github.com/blang/semver/v4 -# github.com/cert-manager/cert-manager v1.17.1 +# github.com/cert-manager/cert-manager v1.18.2 ## explicit; go 1.23.0 github.com/cert-manager/cert-manager/pkg/apis/acme github.com/cert-manager/cert-manager/pkg/apis/acme/v1 @@ -949,7 +949,7 @@ golang.org/x/net/internal/socks golang.org/x/net/proxy golang.org/x/net/publicsuffix golang.org/x/net/websocket -# golang.org/x/oauth2 v0.27.0 +# golang.org/x/oauth2 v0.28.0 ## explicit; go 1.23.0 golang.org/x/oauth2 golang.org/x/oauth2/internal @@ -1598,7 +1598,7 @@ kmodules.xyz/apiversion # kmodules.xyz/cert-manager-util v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/cert-manager-util/certmanager/v1 -# kmodules.xyz/client-go v0.32.6 +# kmodules.xyz/client-go v0.32.7 ## explicit; go 1.23.0 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 @@ -1625,7 +1625,7 @@ kmodules.xyz/custom-resources/client/clientset/versioned/scheme kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1 kmodules.xyz/custom-resources/client/clientset/versioned/typed/metrics/v1alpha1 kmodules.xyz/custom-resources/crds -# kmodules.xyz/monitoring-agent-api v0.32.0 +# kmodules.xyz/monitoring-agent-api v0.32.1 ## explicit; go 1.23.0 kmodules.xyz/monitoring-agent-api/api/v1 # kmodules.xyz/objectstore-api v0.32.0 @@ -1640,13 +1640,13 @@ kmodules.xyz/offshoot-api/util # kmodules.xyz/prober v0.32.0 ## explicit; go 1.23.0 kmodules.xyz/prober/api/v1 -# kmodules.xyz/resource-metadata v0.30.1 +# kmodules.xyz/resource-metadata v0.32.1 ## explicit; go 1.23.0 kmodules.xyz/resource-metadata/apis/node kmodules.xyz/resource-metadata/apis/node/v1alpha1 kmodules.xyz/resource-metadata/crds -# kubedb.dev/apimachinery v0.56.0 -## explicit; go 1.23.0 +# kubedb.dev/apimachinery v0.57.0-rc.0 +## explicit; go 1.23.6 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/archiver/v1alpha1 kubedb.dev/apimachinery/apis/autoscaling @@ -1690,8 +1690,8 @@ kubedb.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1 kubedb.dev/apimachinery/crds kubedb.dev/apimachinery/pkg/double_optin kubedb.dev/apimachinery/pkg/factory -# kubedb.dev/db-client-go v0.11.0 -## explicit; go 1.23.0 +# kubedb.dev/db-client-go v0.12.0-rc.0 +## explicit; go 1.23.6 kubedb.dev/db-client-go/elasticsearch kubedb.dev/db-client-go/redis # kubeops.dev/csi-driver-cacerts v0.1.0 @@ -1699,8 +1699,8 @@ kubedb.dev/db-client-go/redis kubeops.dev/csi-driver-cacerts/apis/cacerts kubeops.dev/csi-driver-cacerts/apis/cacerts/v1alpha1 kubeops.dev/csi-driver-cacerts/crds -# kubeops.dev/petset v0.0.10 -## explicit; go 1.23.0 +# kubeops.dev/petset v0.0.11 +## explicit; go 1.23.6 kubeops.dev/petset/apis/apps/v1 kubeops.dev/petset/client/clientset/versioned kubeops.dev/petset/client/clientset/versioned/scheme @@ -1718,6 +1718,9 @@ kubestash.dev/apimachinery/apis kubestash.dev/apimachinery/apis/core/v1alpha1 kubestash.dev/apimachinery/apis/storage/v1alpha1 kubestash.dev/apimachinery/crds +# open-cluster-management.io/api v1.0.0 +## explicit; go 1.23.6 +open-cluster-management.io/api/work/v1 # sigs.k8s.io/controller-runtime v0.20.4 => github.com/kmodules/controller-runtime v0.20.3-0.20250221050548-8eabe54e7dda ## explicit; go 1.23.0 sigs.k8s.io/controller-runtime diff --git a/vendor/open-cluster-management.io/api/LICENSE b/vendor/open-cluster-management.io/api/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/open-cluster-management.io/api/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml b/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml new file mode 100644 index 000000000..a21191426 --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml @@ -0,0 +1,644 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: manifestworks.work.open-cluster-management.io +spec: + group: work.open-cluster-management.io + names: + kind: ManifestWork + listKind: ManifestWorkList + plural: manifestworks + singular: manifestwork + preserveUnknownFields: false + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + ManifestWork represents a manifests workload that hub wants to deploy on the managed cluster. + A manifest workload is defined as a set of Kubernetes resources. + ManifestWork must be created in the cluster namespace on the hub, so that agent on the + corresponding managed cluster can access this resource and deploy on the managed + cluster. + 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: + description: Spec represents a desired configuration of work to be deployed + on the managed cluster. + properties: + deleteOption: + description: |- + DeleteOption represents deletion strategy when the manifestwork is deleted. + Foreground deletion strategy is applied to all the resource in this manifestwork if it is not set. + properties: + propagationPolicy: + default: Foreground + description: |- + propagationPolicy can be Foreground, Orphan or SelectivelyOrphan + SelectivelyOrphan should be rarely used. It is provided for cases where particular resources is transfering + ownership from one ManifestWork to another or another management unit. + Setting this value will allow a flow like + 1. create manifestwork/2 to manage foo + 2. update manifestwork/1 to selectively orphan foo + 3. remove foo from manifestwork/1 without impacting continuity because manifestwork/2 adopts it. + enum: + - Foreground + - Orphan + - SelectivelyOrphan + type: string + selectivelyOrphans: + description: selectivelyOrphan represents a list of resources + following orphan deletion stratecy + properties: + orphaningRules: + description: |- + orphaningRules defines a slice of orphaningrule. + Each orphaningrule identifies a single resource included in this manifestwork + items: + description: OrphaningRule identifies a single resource + included in this manifestwork to be orphaned + properties: + group: + description: |- + Group is the API Group of the Kubernetes resource, + empty string indicates it is in core group. + type: string + name: + description: Name is the name of the Kubernetes resource. + type: string + namespace: + description: |- + Name is the namespace of the Kubernetes resource, empty string indicates + it is a cluster scoped resource. + type: string + resource: + description: Resource is the resource name of the Kubernetes + resource. + type: string + required: + - name + - resource + type: object + type: array + type: object + ttlSecondsAfterFinished: + description: |- + TTLSecondsAfterFinished limits the lifetime of a ManifestWork that has been marked Complete + by one or more conditionRules set for its manifests. If this field is set, and + the manifestwork has completed, then it is elligible to be automatically deleted. + If this field is unset, the manifestwork won't be automatically deleted even afer completion. + If this field is set to zero, the manfiestwork becomes elligible to be deleted immediately + after completion. + format: int64 + type: integer + type: object + executor: + description: |- + Executor is the configuration that makes the work agent to perform some pre-request processing/checking. + e.g. the executor identity tells the work agent to check the executor has sufficient permission to write + the workloads to the local managed cluster. + Note that nil executor is still supported for backward-compatibility which indicates that the work agent + will not perform any additional actions before applying resources. + properties: + subject: + description: |- + Subject is the subject identity which the work agent uses to talk to the + local cluster when applying the resources. + properties: + serviceAccount: + description: |- + ServiceAccount is for identifying which service account to use by the work agent. + Only required if the type is "ServiceAccount". + properties: + name: + description: Name is the name of the service account. + maxLength: 253 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$ + type: string + namespace: + description: Namespace is the namespace of the service + account. + maxLength: 253 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$ + type: string + required: + - name + - namespace + type: object + type: + description: |- + Type is the type of the subject identity. + Supported types are: "ServiceAccount". + enum: + - ServiceAccount + type: string + required: + - type + type: object + type: object + manifestConfigs: + description: ManifestConfigs represents the configurations of manifests + defined in workload field. + items: + description: ManifestConfigOption represents the configurations + of a manifest defined in workload field. + properties: + conditionRules: + description: ConditionRules defines how to set manifestwork + conditions for a specific manifest. + items: + properties: + celExpressions: + description: |- + CelExpressions defines the CEL expressions to be evaluated for the condition. + Final result is the logical AND of all expressions. + items: + type: string + type: array + condition: + description: |- + Condition is the type of condition that is set based on this rule. + Any condition is supported, but certain special conditions can be used to + to control higher level behaviors of the manifestwork. + If the condition is Complete, the manifest will no longer be updated once completed. + type: string + message: + description: Message is set on the condition created for + this rule + type: string + messageExpression: + description: |- + MessageExpression uses a CEL expression to generate a message for the condition + Will override message if both are set and messageExpression returns a non-empty string. + Variables: + - object: The current instance of the manifest + - result: Boolean result of the CEL expressions + type: string + type: + description: |- + Type defines how a manifest should be evaluated for a condition. + It can be CEL, or WellKnownConditions. + If the type is CEL, user should specify the celExpressions field + If the type is WellKnownConditions, certain common types in k8s.io/api will be considered + completed as defined by hardcoded rules. + enum: + - WellKnownConditions + - CEL + type: string + required: + - condition + - type + type: object + x-kubernetes-validations: + - message: Condition is required for CEL rules + rule: self.type != 'CEL' || self.condition != "" + type: array + x-kubernetes-list-map-keys: + - condition + x-kubernetes-list-type: map + feedbackRules: + description: |- + FeedbackRules defines what resource status field should be returned. If it is not set or empty, + no feedback rules will be honored. + items: + properties: + jsonPaths: + description: JsonPaths defines the json path under status + field to be synced. + items: + properties: + name: + description: Name represents the alias name for + this field + type: string + path: + description: |- + Path represents the json path of the field under status. + The path must point to a field with single value in the type of integer, bool or string. + If the path points to a non-existing field, no value will be returned. + If the path points to a structure, map or slice, no value will be returned and the status conddition + of StatusFeedBackSynced will be set as false. + Ref to https://kubernetes.io/docs/reference/kubectl/jsonpath/ on how to write a jsonPath. + type: string + version: + description: |- + Version is the version of the Kubernetes resource. + If it is not specified, the resource with the semantically latest version is + used to resolve the path. + type: string + required: + - name + - path + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: + description: |- + Type defines the option of how status can be returned. + It can be jsonPaths or wellKnownStatus. + If the type is JSONPaths, user should specify the jsonPaths field + If the type is WellKnownStatus, certain common fields of status defined by a rule only + for types in in k8s.io/api and open-cluster-management/api will be reported, + If these status fields do not exist, no values will be reported. + enum: + - WellKnownStatus + - JSONPaths + type: string + required: + - type + type: object + type: array + resourceIdentifier: + description: |- + ResourceIdentifier represents the group, resource, name and namespace of a resoure. + iff this refers to a resource not created by this manifest work, the related rules will not be executed. + properties: + group: + description: |- + Group is the API Group of the Kubernetes resource, + empty string indicates it is in core group. + type: string + name: + description: Name is the name of the Kubernetes resource. + type: string + namespace: + description: |- + Name is the namespace of the Kubernetes resource, empty string indicates + it is a cluster scoped resource. + type: string + resource: + description: Resource is the resource name of the Kubernetes + resource. + type: string + required: + - name + - resource + type: object + updateStrategy: + description: |- + UpdateStrategy defines the strategy to update this manifest. UpdateStrategy is Update + if it is not set. + properties: + serverSideApply: + description: |- + serverSideApply defines the configuration for server side apply. It is honored only when the + type of the updateStrategy is ServerSideApply + properties: + fieldManager: + default: work-agent + description: |- + FieldManager is the manager to apply the resource. It is work-agent by default, but can be other name with work-agent + as the prefix. + pattern: ^work-agent + type: string + force: + description: Force represents to force apply the manifest. + type: boolean + ignoreFields: + description: IgnoreFields defines a list of json paths + in the resource that will not be updated on the spoke. + items: + properties: + condition: + default: OnSpokePresent + description: |- + Condition defines the condition that the fields should be ignored when apply the resource. + Fields in JSONPaths are all ignored when condition is met, otherwise no fields is ignored + in the apply operation. + enum: + - OnSpokePresent + - OnSpokeChange + type: string + jsonPaths: + description: JSONPaths defines the list of json + path in the resource to be ignored + items: + type: string + minItems: 1 + type: array + required: + - condition + - jsonPaths + type: object + type: array + x-kubernetes-list-map-keys: + - condition + x-kubernetes-list-type: map + type: object + type: + default: Update + description: |- + type defines the strategy to update this manifest, default value is Update. + Update type means to update resource by an update call. + CreateOnly type means do not update resource based on current manifest. + ServerSideApply type means to update resource using server side apply with work-controller as the field manager. + If there is conflict, the related Applied condition of manifest will be in the status of False with the + reason of ApplyConflict. + ReadOnly type means the agent will only check the existence of the resource based on its metadata, + statusFeedBackRules can still be used to get feedbackResults. + enum: + - Update + - CreateOnly + - ServerSideApply + - ReadOnly + type: string + required: + - type + type: object + required: + - resourceIdentifier + type: object + type: array + workload: + description: Workload represents the manifest workload to be deployed + on a managed cluster. + properties: + manifests: + description: Manifests represents a list of kuberenetes resources + to be deployed on a managed cluster. + items: + description: Manifest represents a resource to be deployed on + managed cluster. + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + type: object + status: + description: Status represents the current status of work. + properties: + conditions: + description: |- + Conditions contains the different condition statuses for this work. + Valid condition types are: + 1. Applied represents workload in ManifestWork is applied successfully on managed cluster. + 2. Progressing represents workload in ManifestWork is being applied on managed cluster. + 3. Available represents workload in ManifestWork exists on the managed cluster. + 4. Degraded represents the current state of workload does not match the desired + state for a certain period. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + resourceStatus: + description: |- + ResourceStatus represents the status of each resource in manifestwork deployed on a + managed cluster. The Klusterlet agent on managed cluster syncs the condition from the managed cluster to the hub. + properties: + manifests: + description: |- + Manifests represents the condition of manifests deployed on managed cluster. + Valid condition types are: + 1. Progressing represents the resource is being applied on managed cluster. + 2. Applied represents the resource is applied successfully on managed cluster. + 3. Available represents the resource exists on the managed cluster. + 4. Degraded represents the current state of resource does not match the desired + state for a certain period. + items: + description: |- + ManifestCondition represents the conditions of the resources deployed on a + managed cluster. + properties: + conditions: + description: Conditions represents the conditions of this + resource on a managed cluster. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + resourceMeta: + description: ResourceMeta represents the group, version, + kind, name and namespace of a resoure. + properties: + group: + description: Group is the API Group of the Kubernetes + resource. + type: string + kind: + description: Kind is the kind of the Kubernetes resource. + type: string + name: + description: Name is the name of the Kubernetes resource. + type: string + namespace: + description: Name is the namespace of the Kubernetes + resource. + type: string + ordinal: + description: Ordinal represents the index of the manifest + on spec. + format: int32 + type: integer + resource: + description: Resource is the resource name of the Kubernetes + resource. + type: string + version: + description: Version is the version of the Kubernetes + resource. + type: string + required: + - ordinal + type: object + statusFeedback: + description: StatusFeedback represents the values of the + feild synced back defined in statusFeedbacks + properties: + values: + description: Values represents the synced value of the + interested field. + items: + properties: + fieldValue: + description: |- + Value is the value of the status field. + The value of the status field can only be integer, string or boolean. + properties: + boolean: + description: Boolean is bool value when type + is boolean. + type: boolean + integer: + description: Integer is the integer value + when type is integer. + format: int64 + type: integer + jsonRaw: + description: JsonRaw is a json string when + type is a list or object + maxLength: 1024 + type: string + string: + description: String is the string value when + type is string. + type: string + type: + description: Type represents the type of the + value, it can be integer, string or boolean. + enum: + - Integer + - String + - Boolean + - JsonRaw + type: string + required: + - type + type: object + name: + description: |- + Name represents the alias name for this field. It is the same as what is specified + in StatuFeedbackRule in the spec. + type: string + required: + - fieldValue + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - conditions + - resourceMeta + type: object + type: array + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/vendor/open-cluster-management.io/api/work/v1/0000_01_work.open-cluster-management.io_appliedmanifestworks.crd.yaml b/vendor/open-cluster-management.io/api/work/v1/0000_01_work.open-cluster-management.io_appliedmanifestworks.crd.yaml new file mode 100644 index 000000000..80ae6bdca --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/0000_01_work.open-cluster-management.io_appliedmanifestworks.crd.yaml @@ -0,0 +1,131 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: appliedmanifestworks.work.open-cluster-management.io +spec: + group: work.open-cluster-management.io + names: + kind: AppliedManifestWork + listKind: AppliedManifestWorkList + plural: appliedmanifestworks + singular: appliedmanifestwork + preserveUnknownFields: false + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + AppliedManifestWork represents an applied manifestwork on managed cluster that is placed + on a managed cluster. An AppliedManifestWork links to a manifestwork on a hub recording resources + deployed in the managed cluster. + When the agent is removed from managed cluster, cluster-admin on managed cluster + can delete appliedmanifestwork to remove resources deployed by the agent. + The name of the appliedmanifestwork must be in the format of + {hash of hub's first kube-apiserver url}-{manifestwork name} + 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: + description: Spec represents the desired configuration of AppliedManifestWork. + properties: + agentID: + description: AgentID represents the ID of the work agent who is to + handle this AppliedManifestWork. + type: string + hubHash: + description: |- + HubHash represents the hash of the first hub kube apiserver to identify which hub + this AppliedManifestWork links to. + type: string + manifestWorkName: + description: ManifestWorkName represents the name of the related manifestwork + on the hub. + type: string + required: + - hubHash + - manifestWorkName + type: object + status: + description: Status represents the current status of AppliedManifestWork. + properties: + appliedResources: + description: |- + AppliedResources represents a list of resources defined within the manifestwork that are applied. + Only resources with valid GroupVersionResource, namespace, and name are suitable. + An item in this slice is deleted when there is no mapped manifest in manifestwork.Spec or by finalizer. + The resource relating to the item will also be removed from managed cluster. + The deleted resource may still be present until the finalizers for that resource are finished. + However, the resource will not be undeleted, so it can be removed from this list and eventual consistency is preserved. + items: + description: |- + AppliedManifestResourceMeta represents the group, version, resource, name and namespace of a resource. + Since these resources have been created, they must have valid group, version, resource, namespace, and name. + properties: + group: + description: |- + Group is the API Group of the Kubernetes resource, + empty string indicates it is in core group. + type: string + name: + description: Name is the name of the Kubernetes resource. + type: string + namespace: + description: |- + Name is the namespace of the Kubernetes resource, empty string indicates + it is a cluster scoped resource. + type: string + resource: + description: Resource is the resource name of the Kubernetes + resource. + type: string + uid: + description: |- + UID is set on successful deletion of the Kubernetes resource by controller. The + resource might be still visible on the managed cluster after this field is set. + It is not directly settable by a client. + type: string + version: + description: Version is the version of the Kubernetes resource. + type: string + required: + - name + - resource + - version + type: object + type: array + evictionStartTime: + description: |- + EvictionStartTime represents the current appliedmanifestwork will be evicted after a grace period. + An appliedmanifestwork will be evicted from the managed cluster in the following two scenarios: + - the manifestwork of the current appliedmanifestwork is missing on the hub, or + - the appliedmanifestwork hub hash does not match the current hub hash of the work agent. + format: date-time + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/vendor/open-cluster-management.io/api/work/v1/doc.go b/vendor/open-cluster-management.io/api/work/v1/doc.go new file mode 100644 index 000000000..2e1779f4c --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/doc.go @@ -0,0 +1,7 @@ +// Package v1 contains API Schema definitions for the work v1 API group +// +k8s:deepcopy-gen=package,register +// +k8s:openapi-gen=true + +// +kubebuilder:validation:Optional +// +groupName=work.open-cluster-management.io +package v1 diff --git a/vendor/open-cluster-management.io/api/work/v1/register.go b/vendor/open-cluster-management.io/api/work/v1/register.go new file mode 100644 index 000000000..a65001402 --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/register.go @@ -0,0 +1,40 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + GroupName = "work.open-cluster-management.io" + GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // Install is a function which adds this version to a scheme + Install = schemeBuilder.AddToScheme + + // SchemeGroupVersion generated code relies on this name + // Deprecated + SchemeGroupVersion = GroupVersion + // AddToScheme exists solely to keep the old generators creating valid code + // DEPRECATED + AddToScheme = schemeBuilder.AddToScheme +) + +// Resource generated code relies on this being here, but it logically belongs to the group +// DEPRECATED +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(GroupVersion, + &ManifestWork{}, + &ManifestWorkList{}, + &AppliedManifestWork{}, + &AppliedManifestWorkList{}, + ) + metav1.AddToGroupVersion(scheme, GroupVersion) + return nil +} diff --git a/vendor/open-cluster-management.io/api/work/v1/types.go b/vendor/open-cluster-management.io/api/work/v1/types.go new file mode 100644 index 000000000..2e74ef905 --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/types.go @@ -0,0 +1,709 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:subresource:status + +// ManifestWork represents a manifests workload that hub wants to deploy on the managed cluster. +// A manifest workload is defined as a set of Kubernetes resources. +// ManifestWork must be created in the cluster namespace on the hub, so that agent on the +// corresponding managed cluster can access this resource and deploy on the managed +// cluster. +type ManifestWork struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec represents a desired configuration of work to be deployed on the managed cluster. + Spec ManifestWorkSpec `json:"spec"` + + // Status represents the current status of work. + // +optional + Status ManifestWorkStatus `json:"status,omitempty"` +} + +const ( + // ManifestConfigSpecHashAnnotationKey is the annotation key to identify the configurations + // used by the manifestwork. + ManifestConfigSpecHashAnnotationKey = "open-cluster-management.io/config-spec-hash" +) + +// ManifestWorkSpec represents a desired configuration of manifests to be deployed on the managed cluster. +type ManifestWorkSpec struct { + // Workload represents the manifest workload to be deployed on a managed cluster. + Workload ManifestsTemplate `json:"workload,omitempty"` + + // DeleteOption represents deletion strategy when the manifestwork is deleted. + // Foreground deletion strategy is applied to all the resource in this manifestwork if it is not set. + // +optional + DeleteOption *DeleteOption `json:"deleteOption,omitempty"` + + // ManifestConfigs represents the configurations of manifests defined in workload field. + // +optional + ManifestConfigs []ManifestConfigOption `json:"manifestConfigs,omitempty"` + + // Executor is the configuration that makes the work agent to perform some pre-request processing/checking. + // e.g. the executor identity tells the work agent to check the executor has sufficient permission to write + // the workloads to the local managed cluster. + // Note that nil executor is still supported for backward-compatibility which indicates that the work agent + // will not perform any additional actions before applying resources. + // +optional + Executor *ManifestWorkExecutor `json:"executor,omitempty"` +} + +// Manifest represents a resource to be deployed on managed cluster. +type Manifest struct { + // +kubebuilder:validation:EmbeddedResource + // +kubebuilder:pruning:PreserveUnknownFields + runtime.RawExtension `json:",inline"` +} + +// ManifestsTemplate represents the manifest workload to be deployed on a managed cluster. +type ManifestsTemplate struct { + // Manifests represents a list of kuberenetes resources to be deployed on a managed cluster. + // +optional + Manifests []Manifest `json:"manifests,omitempty"` +} + +type DeleteOption struct { + // propagationPolicy can be Foreground, Orphan or SelectivelyOrphan + // SelectivelyOrphan should be rarely used. It is provided for cases where particular resources is transfering + // ownership from one ManifestWork to another or another management unit. + // Setting this value will allow a flow like + // 1. create manifestwork/2 to manage foo + // 2. update manifestwork/1 to selectively orphan foo + // 3. remove foo from manifestwork/1 without impacting continuity because manifestwork/2 adopts it. + // +kubebuilder:default=Foreground + PropagationPolicy DeletePropagationPolicyType `json:"propagationPolicy"` + + // selectivelyOrphan represents a list of resources following orphan deletion stratecy + SelectivelyOrphan *SelectivelyOrphan `json:"selectivelyOrphans,omitempty"` + + // TTLSecondsAfterFinished limits the lifetime of a ManifestWork that has been marked Complete + // by one or more conditionRules set for its manifests. If this field is set, and + // the manifestwork has completed, then it is elligible to be automatically deleted. + // If this field is unset, the manifestwork won't be automatically deleted even afer completion. + // If this field is set to zero, the manfiestwork becomes elligible to be deleted immediately + // after completion. + // +optional + TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty"` +} + +// ManifestConfigOption represents the configurations of a manifest defined in workload field. +type ManifestConfigOption struct { + // ResourceIdentifier represents the group, resource, name and namespace of a resoure. + // iff this refers to a resource not created by this manifest work, the related rules will not be executed. + // +kubebuilder:validation:Required + // +required + ResourceIdentifier ResourceIdentifier `json:"resourceIdentifier"` + + // FeedbackRules defines what resource status field should be returned. If it is not set or empty, + // no feedback rules will be honored. + // +optional + FeedbackRules []FeedbackRule `json:"feedbackRules,omitempty"` + + // UpdateStrategy defines the strategy to update this manifest. UpdateStrategy is Update + // if it is not set. + // +optional + UpdateStrategy *UpdateStrategy `json:"updateStrategy,omitempty"` + + // ConditionRules defines how to set manifestwork conditions for a specific manifest. + // +listType:=map + // +listMapKey:=condition + // +optional + ConditionRules []ConditionRule `json:"conditionRules,omitempty"` +} + +// +kubebuilder:validation:XValidation:rule="self.type != 'CEL' || self.condition != \"\"",message="Condition is required for CEL rules" +type ConditionRule struct { + // Condition is the type of condition that is set based on this rule. + // Any condition is supported, but certain special conditions can be used to + // to control higher level behaviors of the manifestwork. + // If the condition is Complete, the manifest will no longer be updated once completed. + // +kubebuilder:validation:Required + // +required + Condition string `json:"condition"` + + // Type defines how a manifest should be evaluated for a condition. + // It can be CEL, or WellKnownConditions. + // If the type is CEL, user should specify the celExpressions field + // If the type is WellKnownConditions, certain common types in k8s.io/api will be considered + // completed as defined by hardcoded rules. + // +kubebuilder:validation:Required + // +required + Type ConditionRuleType `json:"type"` + + // CelExpressions defines the CEL expressions to be evaluated for the condition. + // Final result is the logical AND of all expressions. + // +optional + CelExpressions []string `json:"celExpressions"` + + // Message is set on the condition created for this rule + // +optional + Message string `json:"message"` + + // MessageExpression uses a CEL expression to generate a message for the condition + // Will override message if both are set and messageExpression returns a non-empty string. + // Variables: + // - object: The current instance of the manifest + // - result: Boolean result of the CEL expressions + // +optional + MessageExpression string `json:"messageExpression"` +} + +// +kubebuilder:validation:Enum=WellKnownConditions;CEL +type ConditionRuleType string + +const ( + // WellKnownConditionsType represents a standard Complete condition for some common types, which + // is reflected with a hardcoded rule for types in k8s.io/api + WellKnownConditionsType ConditionRuleType = "WellKnownConditions" + + // CelConditionExpressionsType enables user defined rules to set the status of the condition + CelConditionExpressionsType ConditionRuleType = "CEL" +) + +// ManifestWorkExecutor is the executor that applies the resources to the managed cluster. i.e. the +// work agent. +type ManifestWorkExecutor struct { + // Subject is the subject identity which the work agent uses to talk to the + // local cluster when applying the resources. + Subject ManifestWorkExecutorSubject `json:"subject"` +} + +// ManifestWorkExecutorSubject is the subject identity used by the work agent to apply the resources. +// The work agent should check whether the applying resources are out-of-scope of the permission held +// by the executor identity. +type ManifestWorkExecutorSubject struct { + // Type is the type of the subject identity. + // Supported types are: "ServiceAccount". + // +kubebuilder:validation:Enum=ServiceAccount + // +kubebuilder:validation:Required + // +required + Type ManifestWorkExecutorSubjectType `json:"type"` + // ServiceAccount is for identifying which service account to use by the work agent. + // Only required if the type is "ServiceAccount". + // +optional + ServiceAccount *ManifestWorkSubjectServiceAccount `json:"serviceAccount,omitempty"` +} + +// ManifestWorkExecutorSubjectType is the type of the subject. +type ManifestWorkExecutorSubjectType string + +const ( + // ExecutorSubjectTypeServiceAccount indicates that the workload resources belong to a ServiceAccount + // in the managed cluster. + ExecutorSubjectTypeServiceAccount ManifestWorkExecutorSubjectType = "ServiceAccount" +) + +// ManifestWorkSubjectServiceAccount references service account in the managed clusters. +type ManifestWorkSubjectServiceAccount struct { + // Namespace is the namespace of the service account. + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$` + // +required + Namespace string `json:"namespace"` + // Name is the name of the service account. + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$` + // +required + Name string `json:"name"` +} + +// UpdateStrategy defines the strategy to update this manifest +type UpdateStrategy struct { + // type defines the strategy to update this manifest, default value is Update. + // Update type means to update resource by an update call. + // CreateOnly type means do not update resource based on current manifest. + // ServerSideApply type means to update resource using server side apply with work-controller as the field manager. + // If there is conflict, the related Applied condition of manifest will be in the status of False with the + // reason of ApplyConflict. + // ReadOnly type means the agent will only check the existence of the resource based on its metadata, + // statusFeedBackRules can still be used to get feedbackResults. + // +kubebuilder:default=Update + // +kubebuilder:validation:Enum=Update;CreateOnly;ServerSideApply;ReadOnly + // +kubebuilder:validation:Required + // +required + Type UpdateStrategyType `json:"type,omitempty"` + + // serverSideApply defines the configuration for server side apply. It is honored only when the + // type of the updateStrategy is ServerSideApply + // +optional + ServerSideApply *ServerSideApplyConfig `json:"serverSideApply,omitempty"` +} + +type UpdateStrategyType string +type IgnoreFieldsCondition string + +const ( + // UpdateStrategyTypeUpdate means to update resource by an update call. + UpdateStrategyTypeUpdate UpdateStrategyType = "Update" + + // UpdateStrategyTypeCreateOnly means do not update resource based on current manifest. This should be used only when + // ServerSideApply type is not support on the spoke, and the user on hub would like some other controller + // on the spoke to own the control of the resource. + UpdateStrategyTypeCreateOnly UpdateStrategyType = "CreateOnly" + + // UpdateStrategyTypeServerSideApply means to update resource using server side apply with work-controller as the field manager. + // If there is conflict, the related Applied condition of manifest will be in the status of False with the + // reason of ApplyConflict. This type allows another controller on the spoke to control certain field of the resource. + UpdateStrategyTypeServerSideApply UpdateStrategyType = "ServerSideApply" + + // UpdateStrategyTypeReadOnly type means only check the existence of the resource based on the resource's metadata. + // If the statusFeedBackRules are set, the feedbackResult will also be returned. + // The resource will not be removed when the type is ReadOnly, and only resource metadata is required. + UpdateStrategyTypeReadOnly UpdateStrategyType = "ReadOnly" + + // IgnoreFieldsConditionOnSpokeChange is the condition when resource fields is updated by another actor + // on the spoke cluster. + IgnoreFieldsConditionOnSpokeChange IgnoreFieldsCondition = "OnSpokeChange" + + // IgnoreFieldsConditionOnSpokePresent is the condition when the resource exist on the spoke cluster. + IgnoreFieldsConditionOnSpokePresent IgnoreFieldsCondition = "OnSpokePresent" +) + +type ServerSideApplyConfig struct { + // Force represents to force apply the manifest. + // +optional + Force bool `json:"force"` + + // FieldManager is the manager to apply the resource. It is work-agent by default, but can be other name with work-agent + // as the prefix. + // +kubebuilder:default=work-agent + // +kubebuilder:validation:Pattern=`^work-agent` + // +optional + FieldManager string `json:"fieldManager,omitempty"` + + // IgnoreFields defines a list of json paths in the resource that will not be updated on the spoke. + // +listType:=map + // +listMapKey:=condition + // +optional + IgnoreFields []IgnoreField `json:"ignoreFields,omitempty"` +} + +type IgnoreField struct { + // Condition defines the condition that the fields should be ignored when apply the resource. + // Fields in JSONPaths are all ignored when condition is met, otherwise no fields is ignored + // in the apply operation. + // +kubebuilder:default=OnSpokePresent + // +kubebuilder:validation:Enum=OnSpokePresent;OnSpokeChange + // +kubebuilder:validation:Required + // +required + Condition IgnoreFieldsCondition `json:"condition"` + + // JSONPaths defines the list of json path in the resource to be ignored + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinItems=1 + // +required + JSONPaths []string `json:"jsonPaths"` +} + +// DefaultFieldManager is the default field manager of the manifestwork when the field manager is not set. +const DefaultFieldManager = "work-agent" + +type FeedbackRule struct { + // Type defines the option of how status can be returned. + // It can be jsonPaths or wellKnownStatus. + // If the type is JSONPaths, user should specify the jsonPaths field + // If the type is WellKnownStatus, certain common fields of status defined by a rule only + // for types in in k8s.io/api and open-cluster-management/api will be reported, + // If these status fields do not exist, no values will be reported. + // +kubebuilder:validation:Required + // +required + Type FeedBackType `json:"type"` + + // JsonPaths defines the json path under status field to be synced. + // +listType:=map + // +listMapKey:=name + // +optional + JsonPaths []JsonPath `json:"jsonPaths,omitempty"` +} + +// +kubebuilder:validation:Enum=WellKnownStatus;JSONPaths +type FeedBackType string + +const ( + // WellKnownStatusType represents that values of some common status fields will be returned, which + // is reflected with a hardcoded rule only for types in k8s.io/api and open-cluster-management/api. + WellKnownStatusType FeedBackType = "WellKnownStatus" + + // JSONPathsType represents that values of status fields with certain json paths specified will be + // returned + JSONPathsType FeedBackType = "JSONPaths" +) + +type JsonPath struct { + // Name represents the alias name for this field + // +kubebuilder:validation:Required + // +required + Name string `json:"name"` + + // Version is the version of the Kubernetes resource. + // If it is not specified, the resource with the semantically latest version is + // used to resolve the path. + // +optional + Version string `json:"version,omitempty"` + + // Path represents the json path of the field under status. + // The path must point to a field with single value in the type of integer, bool or string. + // If the path points to a non-existing field, no value will be returned. + // If the path points to a structure, map or slice, no value will be returned and the status conddition + // of StatusFeedBackSynced will be set as false. + // Ref to https://kubernetes.io/docs/reference/kubectl/jsonpath/ on how to write a jsonPath. + // +kubebuilder:validation:Required + // +required + Path string `json:"path"` +} + +// +kubebuilder:validation:Enum=Foreground;Orphan;SelectivelyOrphan +type DeletePropagationPolicyType string + +const ( + // DeletePropagationPolicyTypeForeground represents that all the resources in the manifestwork is should + // be fourground deleted. + DeletePropagationPolicyTypeForeground DeletePropagationPolicyType = "Foreground" + // DeletePropagationPolicyTypeOrphan represents that all the resources in the manifestwork is orphaned + // when the manifestwork is deleted. + DeletePropagationPolicyTypeOrphan DeletePropagationPolicyType = "Orphan" + // DeletePropagationPolicyTypeSelectivelyOrphan represents that only selected resources in the manifestwork + // is orphaned when the manifestwork is deleted. + DeletePropagationPolicyTypeSelectivelyOrphan DeletePropagationPolicyType = "SelectivelyOrphan" +) + +// SelectivelyOrphan represents a list of resources following orphan deletion stratecy +type SelectivelyOrphan struct { + // orphaningRules defines a slice of orphaningrule. + // Each orphaningrule identifies a single resource included in this manifestwork + // +optional + OrphaningRules []OrphaningRule `json:"orphaningRules,omitempty"` +} + +// ResourceIdentifier identifies a single resource included in this manifestwork +type ResourceIdentifier struct { + // Group is the API Group of the Kubernetes resource, + // empty string indicates it is in core group. + // +optional + Group string `json:"group"` + + // Resource is the resource name of the Kubernetes resource. + // +kubebuilder:validation:Required + // +required + Resource string `json:"resource"` + + // Name is the name of the Kubernetes resource. + // +kubebuilder:validation:Required + // +required + Name string `json:"name"` + + // Name is the namespace of the Kubernetes resource, empty string indicates + // it is a cluster scoped resource. + // +optional + Namespace string `json:"namespace"` +} + +// OrphaningRule identifies a single resource included in this manifestwork to be orphaned +type OrphaningRule ResourceIdentifier + +// ManifestResourceMeta represents the group, version, kind, as well as the group, version, resource, name and namespace of a resoure. +type ManifestResourceMeta struct { + // Ordinal represents the index of the manifest on spec. + // +required + Ordinal int32 `json:"ordinal"` + + // Group is the API Group of the Kubernetes resource. + // +optional + Group string `json:"group"` + + // Version is the version of the Kubernetes resource. + // +optional + Version string `json:"version"` + + // Kind is the kind of the Kubernetes resource. + // +optional + Kind string `json:"kind"` + + // Resource is the resource name of the Kubernetes resource. + // +optional + Resource string `json:"resource"` + + // Name is the name of the Kubernetes resource. + // +optional + Name string `json:"name"` + + // Name is the namespace of the Kubernetes resource. + // +optional + Namespace string `json:"namespace"` +} + +// AppliedManifestResourceMeta represents the group, version, resource, name and namespace of a resource. +// Since these resources have been created, they must have valid group, version, resource, namespace, and name. +type AppliedManifestResourceMeta struct { + ResourceIdentifier `json:",inline"` + + // Version is the version of the Kubernetes resource. + // +kubebuilder:validation:Required + // +required + Version string `json:"version"` + + // UID is set on successful deletion of the Kubernetes resource by controller. The + // resource might be still visible on the managed cluster after this field is set. + // It is not directly settable by a client. + // +optional + UID string `json:"uid,omitempty"` +} + +// ManifestWorkStatus represents the current status of managed cluster ManifestWork. +type ManifestWorkStatus struct { + // Conditions contains the different condition statuses for this work. + // Valid condition types are: + // 1. Applied represents workload in ManifestWork is applied successfully on managed cluster. + // 2. Progressing represents workload in ManifestWork is being applied on managed cluster. + // 3. Available represents workload in ManifestWork exists on the managed cluster. + // 4. Degraded represents the current state of workload does not match the desired + // state for a certain period. + Conditions []metav1.Condition `json:"conditions,omitempty"` + + // ResourceStatus represents the status of each resource in manifestwork deployed on a + // managed cluster. The Klusterlet agent on managed cluster syncs the condition from the managed cluster to the hub. + // +optional + ResourceStatus ManifestResourceStatus `json:"resourceStatus,omitempty"` +} + +// ManifestResourceStatus represents the status of each resource in manifest work deployed on +// managed cluster +type ManifestResourceStatus struct { + // Manifests represents the condition of manifests deployed on managed cluster. + // Valid condition types are: + // 1. Progressing represents the resource is being applied on managed cluster. + // 2. Applied represents the resource is applied successfully on managed cluster. + // 3. Available represents the resource exists on the managed cluster. + // 4. Degraded represents the current state of resource does not match the desired + // state for a certain period. + Manifests []ManifestCondition `json:"manifests,omitempty"` +} + +const ( + // WorkProgressing represents that the work is in the progress to be + // applied on the managed cluster. + WorkProgressing string = "Progressing" + // WorkApplied represents that the workload defined in work is + // succesfully applied on the managed cluster. + WorkApplied string = "Applied" + // WorkAvailable represents that all resources of the work exists on + // the managed cluster. + WorkAvailable string = "Available" + // WorkDegraded represents that the current state of work does not match + // the desired state for a certain period. + WorkDegraded string = "Degraded" +) + +// ManifestCondition represents the conditions of the resources deployed on a +// managed cluster. +type ManifestCondition struct { + // ResourceMeta represents the group, version, kind, name and namespace of a resoure. + // +required + ResourceMeta ManifestResourceMeta `json:"resourceMeta"` + + // StatusFeedback represents the values of the feild synced back defined in statusFeedbacks + // +optional + StatusFeedbacks StatusFeedbackResult `json:"statusFeedback,omitempty"` + + // Conditions represents the conditions of this resource on a managed cluster. + // +required + Conditions []metav1.Condition `json:"conditions"` +} + +// StatusFeedbackResult represents the values of the feild synced back defined in statusFeedbacks +type StatusFeedbackResult struct { + // Values represents the synced value of the interested field. + // +listType:=map + // +listMapKey:=name + // +optional + Values []FeedbackValue `json:"values,omitempty"` +} + +type FeedbackValue struct { + // Name represents the alias name for this field. It is the same as what is specified + // in StatuFeedbackRule in the spec. + // +kubebuilder:validation:Required + // +required + Name string `json:"name"` + + // Value is the value of the status field. + // The value of the status field can only be integer, string or boolean. + // +kubebuilder:validation:Required + // +required + Value FieldValue `json:"fieldValue"` +} + +// FieldValue is the value of the status field. +// The value of the status field can only be integer, string or boolean. +type FieldValue struct { + // Type represents the type of the value, it can be integer, string or boolean. + // +kubebuilder:validation:Required + // +required + Type ValueType `json:"type"` + + // Integer is the integer value when type is integer. + // +optional + Integer *int64 `json:"integer,omitempty"` + + // String is the string value when type is string. + // +optional + String *string `json:"string,omitempty"` + + // Boolean is bool value when type is boolean. + // +optional + Boolean *bool `json:"boolean,omitempty"` + + // JsonRaw is a json string when type is a list or object + // +kubebuilder:validation:MaxLength=1024 + JsonRaw *string `json:"jsonRaw,omitempty"` +} + +// +kubebuilder:validation:Enum=Integer;String;Boolean;JsonRaw +type ValueType string + +const ( + Integer ValueType = "Integer" + String ValueType = "String" + Boolean ValueType = "Boolean" + JsonRaw ValueType = "JsonRaw" +) + +const ( + // ManifestProgressing represents that the resource is being applied on the managed cluster + ManifestProgressing string = "Progressing" + // ManifestApplied represents that the resource object is applied + // on the managed cluster. + ManifestApplied string = "Applied" + // ManifestAvailable represents that the resource object exists + // on the managed cluster. + ManifestAvailable string = "Available" + // ManifestDegraded represents that the current state of resource object does not + // match the desired state for a certain period. + ManifestDegraded string = "Degraded" + // ManifestComplete represents that the resource has completed and should no longer + // be updated. + ManifestComplete string = "Complete" +) + +// Condition reasons +const ( + // ConditionRuleTrue is set when a rule is evaluated without error + ConditionRuleEvaluated string = "ConditionRuleEvaluated" + // ConditionRuleInvalid is set when a rule is invalid and cannot be evaluated + ConditionRuleInvalid string = "ConditionRuleInvalid" + // ConditionRuleExpressionError is set when a rule fails due to an invalid expression + ConditionRuleExpressionError string = "ConditionRuleExpressionError" + // ConditionRuleInternalError is set when rule evaluation results in an error not caused by the expression + ConditionRuleInternalError string = "ConditionRuleInternalError" +) + +const ( + // ManifestWorkFinalizer is the name of the finalizer added to manifestworks. It is used to ensure + // related appliedmanifestwork of a manifestwork are deleted before the manifestwork itself is deleted + ManifestWorkFinalizer = "cluster.open-cluster-management.io/manifest-work-cleanup" + // AppliedManifestWorkFinalizer is the name of the finalizer added to appliedmanifestwork. It is to + // ensure all resource relates to appliedmanifestwork is deleted before appliedmanifestwork itself + // is deleted. + AppliedManifestWorkFinalizer = "cluster.open-cluster-management.io/applied-manifest-work-cleanup" + + // ObjectSpecHash is the key of the annotation on the applied resources. The value is the computed hash + // from the resource manifests in the manifestwork. + ObjectSpecHash = "open-cluster-management.io/object-hash" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ManifestWorkList is a collection of manifestworks. +type ManifestWorkList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // Items is a list of manifestworks. + Items []ManifestWork `json:"items"` +} + +// +genclient +// +genclient:nonNamespaced +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AppliedManifestWork represents an applied manifestwork on managed cluster that is placed +// on a managed cluster. An AppliedManifestWork links to a manifestwork on a hub recording resources +// deployed in the managed cluster. +// When the agent is removed from managed cluster, cluster-admin on managed cluster +// can delete appliedmanifestwork to remove resources deployed by the agent. +// The name of the appliedmanifestwork must be in the format of +// {hash of hub's first kube-apiserver url}-{manifestwork name} +type AppliedManifestWork struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // Spec represents the desired configuration of AppliedManifestWork. + Spec AppliedManifestWorkSpec `json:"spec,omitempty"` + + // Status represents the current status of AppliedManifestWork. + // +optional + Status AppliedManifestWorkStatus `json:"status,omitempty"` +} + +// AppliedManifestWorkSpec represents the desired configuration of AppliedManifestWork +type AppliedManifestWorkSpec struct { + // HubHash represents the hash of the first hub kube apiserver to identify which hub + // this AppliedManifestWork links to. + // +required + HubHash string `json:"hubHash"` + + // AgentID represents the ID of the work agent who is to handle this AppliedManifestWork. + AgentID string `json:"agentID"` + + // ManifestWorkName represents the name of the related manifestwork on the hub. + // +required + ManifestWorkName string `json:"manifestWorkName"` +} + +// AppliedManifestWorkStatus represents the current status of AppliedManifestWork +type AppliedManifestWorkStatus struct { + // AppliedResources represents a list of resources defined within the manifestwork that are applied. + // Only resources with valid GroupVersionResource, namespace, and name are suitable. + // An item in this slice is deleted when there is no mapped manifest in manifestwork.Spec or by finalizer. + // The resource relating to the item will also be removed from managed cluster. + // The deleted resource may still be present until the finalizers for that resource are finished. + // However, the resource will not be undeleted, so it can be removed from this list and eventual consistency is preserved. + // +optional + AppliedResources []AppliedManifestResourceMeta `json:"appliedResources,omitempty"` + + // EvictionStartTime represents the current appliedmanifestwork will be evicted after a grace period. + // An appliedmanifestwork will be evicted from the managed cluster in the following two scenarios: + // - the manifestwork of the current appliedmanifestwork is missing on the hub, or + // - the appliedmanifestwork hub hash does not match the current hub hash of the work agent. + // +optional + EvictionStartTime *metav1.Time `json:"evictionStartTime,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AppliedManifestWorkList is a collection of appliedmanifestworks. +type AppliedManifestWorkList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // Items is a list of appliedmanifestworks. + Items []AppliedManifestWork `json:"items"` +} diff --git a/vendor/open-cluster-management.io/api/work/v1/zz_generated.deepcopy.go b/vendor/open-cluster-management.io/api/work/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..052d27393 --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/zz_generated.deepcopy.go @@ -0,0 +1,721 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedManifestResourceMeta) DeepCopyInto(out *AppliedManifestResourceMeta) { + *out = *in + out.ResourceIdentifier = in.ResourceIdentifier + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedManifestResourceMeta. +func (in *AppliedManifestResourceMeta) DeepCopy() *AppliedManifestResourceMeta { + if in == nil { + return nil + } + out := new(AppliedManifestResourceMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedManifestWork) DeepCopyInto(out *AppliedManifestWork) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedManifestWork. +func (in *AppliedManifestWork) DeepCopy() *AppliedManifestWork { + if in == nil { + return nil + } + out := new(AppliedManifestWork) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AppliedManifestWork) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedManifestWorkList) DeepCopyInto(out *AppliedManifestWorkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AppliedManifestWork, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedManifestWorkList. +func (in *AppliedManifestWorkList) DeepCopy() *AppliedManifestWorkList { + if in == nil { + return nil + } + out := new(AppliedManifestWorkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AppliedManifestWorkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedManifestWorkSpec) DeepCopyInto(out *AppliedManifestWorkSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedManifestWorkSpec. +func (in *AppliedManifestWorkSpec) DeepCopy() *AppliedManifestWorkSpec { + if in == nil { + return nil + } + out := new(AppliedManifestWorkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppliedManifestWorkStatus) DeepCopyInto(out *AppliedManifestWorkStatus) { + *out = *in + if in.AppliedResources != nil { + in, out := &in.AppliedResources, &out.AppliedResources + *out = make([]AppliedManifestResourceMeta, len(*in)) + copy(*out, *in) + } + if in.EvictionStartTime != nil { + in, out := &in.EvictionStartTime, &out.EvictionStartTime + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedManifestWorkStatus. +func (in *AppliedManifestWorkStatus) DeepCopy() *AppliedManifestWorkStatus { + if in == nil { + return nil + } + out := new(AppliedManifestWorkStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConditionRule) DeepCopyInto(out *ConditionRule) { + *out = *in + if in.CelExpressions != nil { + in, out := &in.CelExpressions, &out.CelExpressions + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionRule. +func (in *ConditionRule) DeepCopy() *ConditionRule { + if in == nil { + return nil + } + out := new(ConditionRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteOption) DeepCopyInto(out *DeleteOption) { + *out = *in + if in.SelectivelyOrphan != nil { + in, out := &in.SelectivelyOrphan, &out.SelectivelyOrphan + *out = new(SelectivelyOrphan) + (*in).DeepCopyInto(*out) + } + if in.TTLSecondsAfterFinished != nil { + in, out := &in.TTLSecondsAfterFinished, &out.TTLSecondsAfterFinished + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteOption. +func (in *DeleteOption) DeepCopy() *DeleteOption { + if in == nil { + return nil + } + out := new(DeleteOption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeedbackRule) DeepCopyInto(out *FeedbackRule) { + *out = *in + if in.JsonPaths != nil { + in, out := &in.JsonPaths, &out.JsonPaths + *out = make([]JsonPath, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeedbackRule. +func (in *FeedbackRule) DeepCopy() *FeedbackRule { + if in == nil { + return nil + } + out := new(FeedbackRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeedbackValue) DeepCopyInto(out *FeedbackValue) { + *out = *in + in.Value.DeepCopyInto(&out.Value) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeedbackValue. +func (in *FeedbackValue) DeepCopy() *FeedbackValue { + if in == nil { + return nil + } + out := new(FeedbackValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FieldValue) DeepCopyInto(out *FieldValue) { + *out = *in + if in.Integer != nil { + in, out := &in.Integer, &out.Integer + *out = new(int64) + **out = **in + } + if in.String != nil { + in, out := &in.String, &out.String + *out = new(string) + **out = **in + } + if in.Boolean != nil { + in, out := &in.Boolean, &out.Boolean + *out = new(bool) + **out = **in + } + if in.JsonRaw != nil { + in, out := &in.JsonRaw, &out.JsonRaw + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FieldValue. +func (in *FieldValue) DeepCopy() *FieldValue { + if in == nil { + return nil + } + out := new(FieldValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IgnoreField) DeepCopyInto(out *IgnoreField) { + *out = *in + if in.JSONPaths != nil { + in, out := &in.JSONPaths, &out.JSONPaths + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreField. +func (in *IgnoreField) DeepCopy() *IgnoreField { + if in == nil { + return nil + } + out := new(IgnoreField) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JsonPath) DeepCopyInto(out *JsonPath) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsonPath. +func (in *JsonPath) DeepCopy() *JsonPath { + if in == nil { + return nil + } + out := new(JsonPath) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Manifest) DeepCopyInto(out *Manifest) { + *out = *in + in.RawExtension.DeepCopyInto(&out.RawExtension) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest. +func (in *Manifest) DeepCopy() *Manifest { + if in == nil { + return nil + } + out := new(Manifest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestCondition) DeepCopyInto(out *ManifestCondition) { + *out = *in + out.ResourceMeta = in.ResourceMeta + in.StatusFeedbacks.DeepCopyInto(&out.StatusFeedbacks) + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestCondition. +func (in *ManifestCondition) DeepCopy() *ManifestCondition { + if in == nil { + return nil + } + out := new(ManifestCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestConfigOption) DeepCopyInto(out *ManifestConfigOption) { + *out = *in + out.ResourceIdentifier = in.ResourceIdentifier + if in.FeedbackRules != nil { + in, out := &in.FeedbackRules, &out.FeedbackRules + *out = make([]FeedbackRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UpdateStrategy != nil { + in, out := &in.UpdateStrategy, &out.UpdateStrategy + *out = new(UpdateStrategy) + (*in).DeepCopyInto(*out) + } + if in.ConditionRules != nil { + in, out := &in.ConditionRules, &out.ConditionRules + *out = make([]ConditionRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestConfigOption. +func (in *ManifestConfigOption) DeepCopy() *ManifestConfigOption { + if in == nil { + return nil + } + out := new(ManifestConfigOption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestResourceMeta) DeepCopyInto(out *ManifestResourceMeta) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestResourceMeta. +func (in *ManifestResourceMeta) DeepCopy() *ManifestResourceMeta { + if in == nil { + return nil + } + out := new(ManifestResourceMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestResourceStatus) DeepCopyInto(out *ManifestResourceStatus) { + *out = *in + if in.Manifests != nil { + in, out := &in.Manifests, &out.Manifests + *out = make([]ManifestCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestResourceStatus. +func (in *ManifestResourceStatus) DeepCopy() *ManifestResourceStatus { + if in == nil { + return nil + } + out := new(ManifestResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWork) DeepCopyInto(out *ManifestWork) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWork. +func (in *ManifestWork) DeepCopy() *ManifestWork { + if in == nil { + return nil + } + out := new(ManifestWork) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManifestWork) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWorkExecutor) DeepCopyInto(out *ManifestWorkExecutor) { + *out = *in + in.Subject.DeepCopyInto(&out.Subject) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWorkExecutor. +func (in *ManifestWorkExecutor) DeepCopy() *ManifestWorkExecutor { + if in == nil { + return nil + } + out := new(ManifestWorkExecutor) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWorkExecutorSubject) DeepCopyInto(out *ManifestWorkExecutorSubject) { + *out = *in + if in.ServiceAccount != nil { + in, out := &in.ServiceAccount, &out.ServiceAccount + *out = new(ManifestWorkSubjectServiceAccount) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWorkExecutorSubject. +func (in *ManifestWorkExecutorSubject) DeepCopy() *ManifestWorkExecutorSubject { + if in == nil { + return nil + } + out := new(ManifestWorkExecutorSubject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWorkList) DeepCopyInto(out *ManifestWorkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ManifestWork, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWorkList. +func (in *ManifestWorkList) DeepCopy() *ManifestWorkList { + if in == nil { + return nil + } + out := new(ManifestWorkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ManifestWorkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWorkSpec) DeepCopyInto(out *ManifestWorkSpec) { + *out = *in + in.Workload.DeepCopyInto(&out.Workload) + if in.DeleteOption != nil { + in, out := &in.DeleteOption, &out.DeleteOption + *out = new(DeleteOption) + (*in).DeepCopyInto(*out) + } + if in.ManifestConfigs != nil { + in, out := &in.ManifestConfigs, &out.ManifestConfigs + *out = make([]ManifestConfigOption, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Executor != nil { + in, out := &in.Executor, &out.Executor + *out = new(ManifestWorkExecutor) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWorkSpec. +func (in *ManifestWorkSpec) DeepCopy() *ManifestWorkSpec { + if in == nil { + return nil + } + out := new(ManifestWorkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWorkStatus) DeepCopyInto(out *ManifestWorkStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWorkStatus. +func (in *ManifestWorkStatus) DeepCopy() *ManifestWorkStatus { + if in == nil { + return nil + } + out := new(ManifestWorkStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestWorkSubjectServiceAccount) DeepCopyInto(out *ManifestWorkSubjectServiceAccount) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestWorkSubjectServiceAccount. +func (in *ManifestWorkSubjectServiceAccount) DeepCopy() *ManifestWorkSubjectServiceAccount { + if in == nil { + return nil + } + out := new(ManifestWorkSubjectServiceAccount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManifestsTemplate) DeepCopyInto(out *ManifestsTemplate) { + *out = *in + if in.Manifests != nil { + in, out := &in.Manifests, &out.Manifests + *out = make([]Manifest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestsTemplate. +func (in *ManifestsTemplate) DeepCopy() *ManifestsTemplate { + if in == nil { + return nil + } + out := new(ManifestsTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrphaningRule) DeepCopyInto(out *OrphaningRule) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrphaningRule. +func (in *OrphaningRule) DeepCopy() *OrphaningRule { + if in == nil { + return nil + } + out := new(OrphaningRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceIdentifier. +func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier { + if in == nil { + return nil + } + out := new(ResourceIdentifier) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectivelyOrphan) DeepCopyInto(out *SelectivelyOrphan) { + *out = *in + if in.OrphaningRules != nil { + in, out := &in.OrphaningRules, &out.OrphaningRules + *out = make([]OrphaningRule, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectivelyOrphan. +func (in *SelectivelyOrphan) DeepCopy() *SelectivelyOrphan { + if in == nil { + return nil + } + out := new(SelectivelyOrphan) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerSideApplyConfig) DeepCopyInto(out *ServerSideApplyConfig) { + *out = *in + if in.IgnoreFields != nil { + in, out := &in.IgnoreFields, &out.IgnoreFields + *out = make([]IgnoreField, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSideApplyConfig. +func (in *ServerSideApplyConfig) DeepCopy() *ServerSideApplyConfig { + if in == nil { + return nil + } + out := new(ServerSideApplyConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StatusFeedbackResult) DeepCopyInto(out *StatusFeedbackResult) { + *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]FeedbackValue, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusFeedbackResult. +func (in *StatusFeedbackResult) DeepCopy() *StatusFeedbackResult { + if in == nil { + return nil + } + out := new(StatusFeedbackResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy) { + *out = *in + if in.ServerSideApply != nil { + in, out := &in.ServerSideApply, &out.ServerSideApply + *out = new(ServerSideApplyConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateStrategy. +func (in *UpdateStrategy) DeepCopy() *UpdateStrategy { + if in == nil { + return nil + } + out := new(UpdateStrategy) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/open-cluster-management.io/api/work/v1/zz_generated.swagger_doc_generated.go b/vendor/open-cluster-management.io/api/work/v1/zz_generated.swagger_doc_generated.go new file mode 100644 index 000000000..5c5454e31 --- /dev/null +++ b/vendor/open-cluster-management.io/api/work/v1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,322 @@ +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_AppliedManifestResourceMeta = map[string]string{ + "": "AppliedManifestResourceMeta represents the group, version, resource, name and namespace of a resource. Since these resources have been created, they must have valid group, version, resource, namespace, and name.", + "version": "Version is the version of the Kubernetes resource.", + "uid": "UID is set on successful deletion of the Kubernetes resource by controller. The resource might be still visible on the managed cluster after this field is set. It is not directly settable by a client.", +} + +func (AppliedManifestResourceMeta) SwaggerDoc() map[string]string { + return map_AppliedManifestResourceMeta +} + +var map_AppliedManifestWork = map[string]string{ + "": "AppliedManifestWork represents an applied manifestwork on managed cluster that is placed on a managed cluster. An AppliedManifestWork links to a manifestwork on a hub recording resources deployed in the managed cluster. When the agent is removed from managed cluster, cluster-admin on managed cluster can delete appliedmanifestwork to remove resources deployed by the agent. The name of the appliedmanifestwork must be in the format of {hash of hub's first kube-apiserver url}-{manifestwork name}", + "spec": "Spec represents the desired configuration of AppliedManifestWork.", + "status": "Status represents the current status of AppliedManifestWork.", +} + +func (AppliedManifestWork) SwaggerDoc() map[string]string { + return map_AppliedManifestWork +} + +var map_AppliedManifestWorkList = map[string]string{ + "": "AppliedManifestWorkList is a collection of appliedmanifestworks.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "items": "Items is a list of appliedmanifestworks.", +} + +func (AppliedManifestWorkList) SwaggerDoc() map[string]string { + return map_AppliedManifestWorkList +} + +var map_AppliedManifestWorkSpec = map[string]string{ + "": "AppliedManifestWorkSpec represents the desired configuration of AppliedManifestWork", + "hubHash": "HubHash represents the hash of the first hub kube apiserver to identify which hub this AppliedManifestWork links to.", + "agentID": "AgentID represents the ID of the work agent who is to handle this AppliedManifestWork.", + "manifestWorkName": "ManifestWorkName represents the name of the related manifestwork on the hub.", +} + +func (AppliedManifestWorkSpec) SwaggerDoc() map[string]string { + return map_AppliedManifestWorkSpec +} + +var map_AppliedManifestWorkStatus = map[string]string{ + "": "AppliedManifestWorkStatus represents the current status of AppliedManifestWork", + "appliedResources": "AppliedResources represents a list of resources defined within the manifestwork that are applied. Only resources with valid GroupVersionResource, namespace, and name are suitable. An item in this slice is deleted when there is no mapped manifest in manifestwork.Spec or by finalizer. The resource relating to the item will also be removed from managed cluster. The deleted resource may still be present until the finalizers for that resource are finished. However, the resource will not be undeleted, so it can be removed from this list and eventual consistency is preserved.", + "evictionStartTime": "EvictionStartTime represents the current appliedmanifestwork will be evicted after a grace period. An appliedmanifestwork will be evicted from the managed cluster in the following two scenarios:\n - the manifestwork of the current appliedmanifestwork is missing on the hub, or\n - the appliedmanifestwork hub hash does not match the current hub hash of the work agent.", +} + +func (AppliedManifestWorkStatus) SwaggerDoc() map[string]string { + return map_AppliedManifestWorkStatus +} + +var map_ConditionRule = map[string]string{ + "condition": "Condition is the type of condition that is set based on this rule. Any condition is supported, but certain special conditions can be used to to control higher level behaviors of the manifestwork. If the condition is Complete, the manifest will no longer be updated once completed.", + "type": "Type defines how a manifest should be evaluated for a condition. It can be CEL, or WellKnownConditions. If the type is CEL, user should specify the celExpressions field If the type is WellKnownConditions, certain common types in k8s.io/api will be considered completed as defined by hardcoded rules.", + "celExpressions": "CelExpressions defines the CEL expressions to be evaluated for the condition. Final result is the logical AND of all expressions.", + "message": "Message is set on the condition created for this rule", + "messageExpression": "MessageExpression uses a CEL expression to generate a message for the condition Will override message if both are set and messageExpression returns a non-empty string. Variables: - object: The current instance of the manifest - result: Boolean result of the CEL expressions", +} + +func (ConditionRule) SwaggerDoc() map[string]string { + return map_ConditionRule +} + +var map_DeleteOption = map[string]string{ + "propagationPolicy": "propagationPolicy can be Foreground, Orphan or SelectivelyOrphan SelectivelyOrphan should be rarely used. It is provided for cases where particular resources is transfering ownership from one ManifestWork to another or another management unit. Setting this value will allow a flow like 1. create manifestwork/2 to manage foo 2. update manifestwork/1 to selectively orphan foo 3. remove foo from manifestwork/1 without impacting continuity because manifestwork/2 adopts it.", + "selectivelyOrphans": "selectivelyOrphan represents a list of resources following orphan deletion stratecy", + "ttlSecondsAfterFinished": "TTLSecondsAfterFinished limits the lifetime of a ManifestWork that has been marked Complete by one or more conditionRules set for its manifests. If this field is set, and the manifestwork has completed, then it is elligible to be automatically deleted. If this field is unset, the manifestwork won't be automatically deleted even afer completion. If this field is set to zero, the manfiestwork becomes elligible to be deleted immediately after completion.", +} + +func (DeleteOption) SwaggerDoc() map[string]string { + return map_DeleteOption +} + +var map_FeedbackRule = map[string]string{ + "type": "Type defines the option of how status can be returned. It can be jsonPaths or wellKnownStatus. If the type is JSONPaths, user should specify the jsonPaths field If the type is WellKnownStatus, certain common fields of status defined by a rule only for types in in k8s.io/api and open-cluster-management/api will be reported, If these status fields do not exist, no values will be reported.", + "jsonPaths": "JsonPaths defines the json path under status field to be synced.", +} + +func (FeedbackRule) SwaggerDoc() map[string]string { + return map_FeedbackRule +} + +var map_FeedbackValue = map[string]string{ + "name": "Name represents the alias name for this field. It is the same as what is specified in StatuFeedbackRule in the spec.", + "fieldValue": "Value is the value of the status field. The value of the status field can only be integer, string or boolean.", +} + +func (FeedbackValue) SwaggerDoc() map[string]string { + return map_FeedbackValue +} + +var map_FieldValue = map[string]string{ + "": "FieldValue is the value of the status field. The value of the status field can only be integer, string or boolean.", + "type": "Type represents the type of the value, it can be integer, string or boolean.", + "integer": "Integer is the integer value when type is integer.", + "string": "String is the string value when type is string.", + "boolean": "Boolean is bool value when type is boolean.", + "jsonRaw": "JsonRaw is a json string when type is a list or object", +} + +func (FieldValue) SwaggerDoc() map[string]string { + return map_FieldValue +} + +var map_IgnoreField = map[string]string{ + "condition": "Condition defines the condition that the fields should be ignored when apply the resource. Fields in JSONPaths are all ignored when condition is met, otherwise no fields is ignored in the apply operation.", + "jsonPaths": "JSONPaths defines the list of json path in the resource to be ignored", +} + +func (IgnoreField) SwaggerDoc() map[string]string { + return map_IgnoreField +} + +var map_JsonPath = map[string]string{ + "name": "Name represents the alias name for this field", + "version": "Version is the version of the Kubernetes resource. If it is not specified, the resource with the semantically latest version is used to resolve the path.", + "path": "Path represents the json path of the field under status. The path must point to a field with single value in the type of integer, bool or string. If the path points to a non-existing field, no value will be returned. If the path points to a structure, map or slice, no value will be returned and the status conddition of StatusFeedBackSynced will be set as false. Ref to https://kubernetes.io/docs/reference/kubectl/jsonpath/ on how to write a jsonPath.", +} + +func (JsonPath) SwaggerDoc() map[string]string { + return map_JsonPath +} + +var map_Manifest = map[string]string{ + "": "Manifest represents a resource to be deployed on managed cluster.", +} + +func (Manifest) SwaggerDoc() map[string]string { + return map_Manifest +} + +var map_ManifestCondition = map[string]string{ + "": "ManifestCondition represents the conditions of the resources deployed on a managed cluster.", + "resourceMeta": "ResourceMeta represents the group, version, kind, name and namespace of a resoure.", + "statusFeedback": "StatusFeedback represents the values of the feild synced back defined in statusFeedbacks", + "conditions": "Conditions represents the conditions of this resource on a managed cluster.", +} + +func (ManifestCondition) SwaggerDoc() map[string]string { + return map_ManifestCondition +} + +var map_ManifestConfigOption = map[string]string{ + "": "ManifestConfigOption represents the configurations of a manifest defined in workload field.", + "resourceIdentifier": "ResourceIdentifier represents the group, resource, name and namespace of a resoure. iff this refers to a resource not created by this manifest work, the related rules will not be executed.", + "feedbackRules": "FeedbackRules defines what resource status field should be returned. If it is not set or empty, no feedback rules will be honored.", + "updateStrategy": "UpdateStrategy defines the strategy to update this manifest. UpdateStrategy is Update if it is not set.", + "conditionRules": "ConditionRules defines how to set manifestwork conditions for a specific manifest.", +} + +func (ManifestConfigOption) SwaggerDoc() map[string]string { + return map_ManifestConfigOption +} + +var map_ManifestResourceMeta = map[string]string{ + "": "ManifestResourceMeta represents the group, version, kind, as well as the group, version, resource, name and namespace of a resoure.", + "ordinal": "Ordinal represents the index of the manifest on spec.", + "group": "Group is the API Group of the Kubernetes resource.", + "version": "Version is the version of the Kubernetes resource.", + "kind": "Kind is the kind of the Kubernetes resource.", + "resource": "Resource is the resource name of the Kubernetes resource.", + "name": "Name is the name of the Kubernetes resource.", + "namespace": "Name is the namespace of the Kubernetes resource.", +} + +func (ManifestResourceMeta) SwaggerDoc() map[string]string { + return map_ManifestResourceMeta +} + +var map_ManifestResourceStatus = map[string]string{ + "": "ManifestResourceStatus represents the status of each resource in manifest work deployed on managed cluster", + "manifests": "Manifests represents the condition of manifests deployed on managed cluster. Valid condition types are: 1. Progressing represents the resource is being applied on managed cluster. 2. Applied represents the resource is applied successfully on managed cluster. 3. Available represents the resource exists on the managed cluster. 4. Degraded represents the current state of resource does not match the desired state for a certain period.", +} + +func (ManifestResourceStatus) SwaggerDoc() map[string]string { + return map_ManifestResourceStatus +} + +var map_ManifestWork = map[string]string{ + "": "ManifestWork represents a manifests workload that hub wants to deploy on the managed cluster. A manifest workload is defined as a set of Kubernetes resources. ManifestWork must be created in the cluster namespace on the hub, so that agent on the corresponding managed cluster can access this resource and deploy on the managed cluster.", + "spec": "Spec represents a desired configuration of work to be deployed on the managed cluster.", + "status": "Status represents the current status of work.", +} + +func (ManifestWork) SwaggerDoc() map[string]string { + return map_ManifestWork +} + +var map_ManifestWorkExecutor = map[string]string{ + "": "ManifestWorkExecutor is the executor that applies the resources to the managed cluster. i.e. the work agent.", + "subject": "Subject is the subject identity which the work agent uses to talk to the local cluster when applying the resources.", +} + +func (ManifestWorkExecutor) SwaggerDoc() map[string]string { + return map_ManifestWorkExecutor +} + +var map_ManifestWorkExecutorSubject = map[string]string{ + "": "ManifestWorkExecutorSubject is the subject identity used by the work agent to apply the resources. The work agent should check whether the applying resources are out-of-scope of the permission held by the executor identity.", + "type": "Type is the type of the subject identity. Supported types are: \"ServiceAccount\".", + "serviceAccount": "ServiceAccount is for identifying which service account to use by the work agent. Only required if the type is \"ServiceAccount\".", +} + +func (ManifestWorkExecutorSubject) SwaggerDoc() map[string]string { + return map_ManifestWorkExecutorSubject +} + +var map_ManifestWorkList = map[string]string{ + "": "ManifestWorkList is a collection of manifestworks.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "items": "Items is a list of manifestworks.", +} + +func (ManifestWorkList) SwaggerDoc() map[string]string { + return map_ManifestWorkList +} + +var map_ManifestWorkSpec = map[string]string{ + "": "ManifestWorkSpec represents a desired configuration of manifests to be deployed on the managed cluster.", + "workload": "Workload represents the manifest workload to be deployed on a managed cluster.", + "deleteOption": "DeleteOption represents deletion strategy when the manifestwork is deleted. Foreground deletion strategy is applied to all the resource in this manifestwork if it is not set.", + "manifestConfigs": "ManifestConfigs represents the configurations of manifests defined in workload field.", + "executor": "Executor is the configuration that makes the work agent to perform some pre-request processing/checking. e.g. the executor identity tells the work agent to check the executor has sufficient permission to write the workloads to the local managed cluster. Note that nil executor is still supported for backward-compatibility which indicates that the work agent will not perform any additional actions before applying resources.", +} + +func (ManifestWorkSpec) SwaggerDoc() map[string]string { + return map_ManifestWorkSpec +} + +var map_ManifestWorkStatus = map[string]string{ + "": "ManifestWorkStatus represents the current status of managed cluster ManifestWork.", + "conditions": "Conditions contains the different condition statuses for this work. Valid condition types are: 1. Applied represents workload in ManifestWork is applied successfully on managed cluster. 2. Progressing represents workload in ManifestWork is being applied on managed cluster. 3. Available represents workload in ManifestWork exists on the managed cluster. 4. Degraded represents the current state of workload does not match the desired state for a certain period.", + "resourceStatus": "ResourceStatus represents the status of each resource in manifestwork deployed on a managed cluster. The Klusterlet agent on managed cluster syncs the condition from the managed cluster to the hub.", +} + +func (ManifestWorkStatus) SwaggerDoc() map[string]string { + return map_ManifestWorkStatus +} + +var map_ManifestWorkSubjectServiceAccount = map[string]string{ + "": "ManifestWorkSubjectServiceAccount references service account in the managed clusters.", + "namespace": "Namespace is the namespace of the service account.", + "name": "Name is the name of the service account.", +} + +func (ManifestWorkSubjectServiceAccount) SwaggerDoc() map[string]string { + return map_ManifestWorkSubjectServiceAccount +} + +var map_ManifestsTemplate = map[string]string{ + "": "ManifestsTemplate represents the manifest workload to be deployed on a managed cluster.", + "manifests": "Manifests represents a list of kuberenetes resources to be deployed on a managed cluster.", +} + +func (ManifestsTemplate) SwaggerDoc() map[string]string { + return map_ManifestsTemplate +} + +var map_ResourceIdentifier = map[string]string{ + "": "ResourceIdentifier identifies a single resource included in this manifestwork", + "group": "Group is the API Group of the Kubernetes resource, empty string indicates it is in core group.", + "resource": "Resource is the resource name of the Kubernetes resource.", + "name": "Name is the name of the Kubernetes resource.", + "namespace": "Name is the namespace of the Kubernetes resource, empty string indicates it is a cluster scoped resource.", +} + +func (ResourceIdentifier) SwaggerDoc() map[string]string { + return map_ResourceIdentifier +} + +var map_SelectivelyOrphan = map[string]string{ + "": "SelectivelyOrphan represents a list of resources following orphan deletion stratecy", + "orphaningRules": "orphaningRules defines a slice of orphaningrule. Each orphaningrule identifies a single resource included in this manifestwork", +} + +func (SelectivelyOrphan) SwaggerDoc() map[string]string { + return map_SelectivelyOrphan +} + +var map_ServerSideApplyConfig = map[string]string{ + "force": "Force represents to force apply the manifest.", + "fieldManager": "FieldManager is the manager to apply the resource. It is work-agent by default, but can be other name with work-agent as the prefix.", + "ignoreFields": "IgnoreFields defines a list of json paths in the resource that will not be updated on the spoke.", +} + +func (ServerSideApplyConfig) SwaggerDoc() map[string]string { + return map_ServerSideApplyConfig +} + +var map_StatusFeedbackResult = map[string]string{ + "": "StatusFeedbackResult represents the values of the feild synced back defined in statusFeedbacks", + "values": "Values represents the synced value of the interested field.", +} + +func (StatusFeedbackResult) SwaggerDoc() map[string]string { + return map_StatusFeedbackResult +} + +var map_UpdateStrategy = map[string]string{ + "": "UpdateStrategy defines the strategy to update this manifest", + "type": "type defines the strategy to update this manifest, default value is Update. Update type means to update resource by an update call. CreateOnly type means do not update resource based on current manifest. ServerSideApply type means to update resource using server side apply with work-controller as the field manager. If there is conflict, the related Applied condition of manifest will be in the status of False with the reason of ApplyConflict. ReadOnly type means the agent will only check the existence of the resource based on its metadata, statusFeedBackRules can still be used to get feedbackResults.", + "serverSideApply": "serverSideApply defines the configuration for server side apply. It is honored only when the type of the updateStrategy is ServerSideApply", +} + +func (UpdateStrategy) SwaggerDoc() map[string]string { + return map_UpdateStrategy +} + +// AUTO-GENERATED FUNCTIONS END HERE