From 7ca398656978a01143e4c96366aa82c033d7c97e Mon Sep 17 00:00:00 2001 From: Bilal Khan <64713734+ibilalkayy@users.noreply.github.com> Date: Fri, 18 Aug 2023 12:44:46 +0500 Subject: [PATCH 001/192] K8SPS-290: Added comments above the two files functions (#425) * added comments above multiple functions in the api/perconaservermysql_types.go file * added comments above multiple functions in the api/zz_generated.deepcopy.go file * added comment above a function in the perconaservermysqlbackup_types.go file --- api/v1alpha1/perconaservermysql_types.go | 30 +++++++++++++++++++ .../perconaservermysqlbackup_types.go | 1 + .../perconaservermysqlrestore_types.go | 1 + 3 files changed, 32 insertions(+) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index b5f35efa7..8a543d88d 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -77,6 +77,7 @@ const ( MaxSafeGRSize = 9 ) +// Checks if the provided ClusterType is valid. func (t ClusterType) isValid() bool { switch ClusterType(t) { case ClusterTypeGR, ClusterTypeAsync: @@ -98,10 +99,12 @@ type MySQLSpec struct { PodSpec `json:",inline"` } +// Checks if the MySQL cluster type is asynchronous. func (m MySQLSpec) IsAsync() bool { return m.ClusterType == ClusterTypeAsync } +// Checks if the MySQL cluster type is Group Replication (GR). func (m MySQLSpec) IsGR() bool { return m.ClusterType == ClusterTypeGR } @@ -158,6 +161,7 @@ type PodSpec struct { ContainerSpec `json:",inline"` } +// Retrieves the initialization image for the pod. func (s *PodSpec) GetInitImage() string { return s.InitImage } @@ -185,6 +189,7 @@ type BackupSpec struct { Storages map[string]*BackupStorageSpec `json:"storages,omitempty"` } +// Retrieves the initialization image for the backup. func (s *BackupSpec) GetInitImage() string { return s.InitImage } @@ -230,11 +235,13 @@ type BackupStorageS3Spec struct { // BucketWithPrefix contains a bucket name with or without a prefix in a format / type BucketWithPrefix string +// Extracts the bucket name from a combined bucket with prefix string. func (b BucketWithPrefix) Bucket() string { bucket, _, _ := strings.Cut(string(b), "/") return bucket } +// Extracts the prefix from a combined bucket with prefix string. func (b BucketWithPrefix) Prefix() string { _, prefix, _ := strings.Cut(string(b), "/") return prefix @@ -331,6 +338,7 @@ type ServiceExpose struct { ExternalTrafficPolicy corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` } +// Determines if both annotations and labels of the service expose are empty. func (e *ServiceExpose) SaveOldMeta() bool { return len(e.Annotations) == 0 && len(e.Labels) == 0 } @@ -417,18 +425,22 @@ const ( UserXtraBackup SystemUser = "xtrabackup" ) +// MySQLSpec returns the MySQL specification from the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) MySQLSpec() *MySQLSpec { return &cr.Spec.MySQL } +// PMMSpec returns the PMM specification from the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) PMMSpec() *PMMSpec { return cr.Spec.PMM } +// OrchestratorSpec returns the Orchestrator specification from the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) OrchestratorSpec() *OrchestratorSpec { return &cr.Spec.Orchestrator } +// SetVersion sets the CRVersion to the version value if it's not already set. func (cr *PerconaServerMySQL) SetVersion() { if len(cr.Spec.CRVersion) > 0 { return @@ -437,6 +449,7 @@ func (cr *PerconaServerMySQL) SetVersion() { cr.Spec.CRVersion = version.Version } +// CheckNSetDefaults validates and sets default values for the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersion *platform.ServerVersion) error { log := logf.FromContext(ctx).WithName("CheckNSetDefaults") if len(cr.Spec.MySQL.ClusterType) == 0 { @@ -690,6 +703,7 @@ const ( BinVolumePath = "/opt/percona" ) +// reconcileVol validates and sets default values for a given VolumeSpec, ensuring it is properly defined. func reconcileVol(v *VolumeSpec) (*VolumeSpec, error) { if v == nil || v.EmptyDir == nil && v.HostPath == nil && v.PersistentVolumeClaim == nil { return nil, errors.New("volumeSpec and it's internals should be specified") @@ -708,6 +722,7 @@ func reconcileVol(v *VolumeSpec) (*VolumeSpec, error) { return v, nil } +// defaultPVCSpec sets default access mode for a PersistentVolumeClaimSpec if not already defined. func defaultPVCSpec(pvc *corev1.PersistentVolumeClaimSpec) { if pvc == nil { return @@ -754,6 +769,7 @@ func (p *PodSpec) reconcileAffinityOpts() { } } +// GetAffinity derives an Affinity configuration based on the provided PodSpec's affinity settings and labels. func (p *PodSpec) GetAffinity(labels map[string]string) *corev1.Affinity { if p.Affinity == nil { return nil @@ -801,6 +817,7 @@ const ( ExposedLabel = "percona.com/exposed" ) +// Labels returns a standardized set of labels for the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) Labels() map[string]string { return map[string]string{ NameLabel: "percona-server", @@ -810,10 +827,13 @@ func (cr *PerconaServerMySQL) Labels() map[string]string { } } +// ClusterHint generates a unique identifier for the PerconaServerMySQL +// cluster using its name and namespace. func (cr *PerconaServerMySQL) ClusterHint() string { return fmt.Sprintf("%s.%s", cr.Name, cr.Namespace) } +// GetClusterNameFromObject retrieves the cluster's name from the given client object's labels. func GetClusterNameFromObject(obj client.Object) (string, error) { labels := obj.GetLabels() instance, ok := labels[InstanceLabel] @@ -823,6 +843,7 @@ func GetClusterNameFromObject(obj client.Object) (string, error) { return instance, nil } +// FNVHash computes a hash of the provided byte slice using the FNV-1a algorithm. func FNVHash(p []byte) string { hash := fnv.New32() hash.Write(p) @@ -844,10 +865,12 @@ func (cr *PerconaServerMySQL) ClusterHash() string { return serverIDHash } +// InternalSecretName generates a name for the internal secret based on the PerconaServerMySQL name. func (cr *PerconaServerMySQL) InternalSecretName() string { return "internal-" + cr.Name } +// PMMEnabled checks if PMM is enabled and if the provided secret contains PMM-specific data. func (cr *PerconaServerMySQL) PMMEnabled(secret *corev1.Secret) bool { if cr.Spec.PMM != nil && cr.Spec.PMM.Enabled && secret != nil && secret.Data != nil { return cr.Spec.PMM.HasSecret(secret) @@ -855,6 +878,7 @@ func (cr *PerconaServerMySQL) PMMEnabled(secret *corev1.Secret) bool { return false } +// HasSecret determines if the provided secret contains the necessary PMM server key. func (pmm *PMMSpec) HasSecret(secret *corev1.Secret) bool { if secret.Data != nil { v, ok := secret.Data[string(UserPMMServerKey)] @@ -863,6 +887,7 @@ func (pmm *PMMSpec) HasSecret(secret *corev1.Secret) bool { return false } +// RouterEnabled checks if the router is enabled, considering the MySQL configuration. func (cr *PerconaServerMySQL) RouterEnabled() bool { if cr.MySQLSpec().IsAsync() { return false @@ -871,6 +896,7 @@ func (cr *PerconaServerMySQL) RouterEnabled() bool { return cr.Spec.Proxy.Router != nil && cr.Spec.Proxy.Router.Enabled } +// HAProxyEnabled verifies if HAProxy is enabled based on MySQL configuration and safety settings. func (cr *PerconaServerMySQL) HAProxyEnabled() bool { if cr.MySQLSpec().IsAsync() && !cr.Spec.AllowUnsafeConfig { return true @@ -879,6 +905,8 @@ func (cr *PerconaServerMySQL) HAProxyEnabled() bool { return cr.Spec.Proxy.HAProxy != nil && cr.Spec.Proxy.HAProxy.Enabled } +// OrchestratorEnabled determines if the orchestrator is enabled, +// considering the MySQL configuration. func (cr *PerconaServerMySQL) OrchestratorEnabled() bool { if cr.MySQLSpec().IsGR() { return false @@ -893,10 +921,12 @@ func (cr *PerconaServerMySQL) OrchestratorEnabled() bool { var NonAlphaNumeric = regexp.MustCompile("[^a-zA-Z0-9_]+") +// Generates a cluster name by sanitizing the PerconaServerMySQL name. func (cr *PerconaServerMySQL) InnoDBClusterName() string { return NonAlphaNumeric.ReplaceAllString(cr.Name, "") } +// Registers PerconaServerMySQL types with the SchemeBuilder. func init() { SchemeBuilder.Register(&PerconaServerMySQL{}, &PerconaServerMySQLList{}) } diff --git a/api/v1alpha1/perconaservermysqlbackup_types.go b/api/v1alpha1/perconaservermysqlbackup_types.go index 88a3a00da..31b1fa706 100644 --- a/api/v1alpha1/perconaservermysqlbackup_types.go +++ b/api/v1alpha1/perconaservermysqlbackup_types.go @@ -72,6 +72,7 @@ type PerconaServerMySQLBackupList struct { Items []PerconaServerMySQLBackup `json:"items"` } +// Initializes the scheme with PerconaServerMySQLBackup types. func init() { SchemeBuilder.Register(&PerconaServerMySQLBackup{}, &PerconaServerMySQLBackupList{}) } diff --git a/api/v1alpha1/perconaservermysqlrestore_types.go b/api/v1alpha1/perconaservermysqlrestore_types.go index 0bd6391de..071133c5a 100644 --- a/api/v1alpha1/perconaservermysqlrestore_types.go +++ b/api/v1alpha1/perconaservermysqlrestore_types.go @@ -72,6 +72,7 @@ type PerconaServerMySQLRestoreList struct { Items []PerconaServerMySQLRestore `json:"items"` } +// Registers PerconaServerMySQLRestore types with the SchemeBuilder. func init() { SchemeBuilder.Register(&PerconaServerMySQLRestore{}, &PerconaServerMySQLRestoreList{}) } From 20484faf0c769c98a9b4a59417a03dbcd6ddc70e Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 18 Aug 2023 13:51:41 +0200 Subject: [PATCH 002/192] K8SPS-162 - Fix mysql x protocol from haproxy (#426) * K8SPS-162 - Fix mysql x protocol from haproxy * Fix mysql admin port and x protocol in haproxy * Fix backend name for admin port in haproxy * Fix gr-haproxy test, use newer client and add usage of mysqlsh --- build/haproxy-global.cfg | 4 +-- build/haproxy.cfg | 14 ++++++++++ build/haproxy_add_mysql_nodes.sh | 28 +++++++++++++++++++ e2e-tests/conf/client.yaml | 2 +- e2e-tests/functions | 13 +++++++++ .../gr-haproxy/03-check-connections.yaml | 2 +- 6 files changed, 59 insertions(+), 4 deletions(-) diff --git a/build/haproxy-global.cfg b/build/haproxy-global.cfg index a7f5687af..0fafec975 100644 --- a/build/haproxy-global.cfg +++ b/build/haproxy-global.cfg @@ -30,13 +30,13 @@ bind *:33060 mode tcp option clitcpka - default_backend mysql-primary + default_backend mysql-x frontend mysql-admin-in bind *:33062 mode tcp option clitcpka - default_backend mysql-primary + default_backend mysql-admin frontend stats bind *:8404 diff --git a/build/haproxy.cfg b/build/haproxy.cfg index c983fd373..9c5cfb390 100644 --- a/build/haproxy.cfg +++ b/build/haproxy.cfg @@ -11,3 +11,17 @@ balance roundrobin option external-check external-check command /opt/percona/haproxy_check_replicas.sh + + backend mysql-x + mode tcp + option srvtcpka + balance roundrobin + option external-check + external-check command /opt/percona/haproxy_check_replicas.sh + + backend mysql-admin + mode tcp + option srvtcpka + balance roundrobin + option external-check + external-check command /opt/percona/haproxy_check_replicas.sh diff --git a/build/haproxy_add_mysql_nodes.sh b/build/haproxy_add_mysql_nodes.sh index c9fded65e..48fd9ef88 100755 --- a/build/haproxy_add_mysql_nodes.sh +++ b/build/haproxy_add_mysql_nodes.sh @@ -65,6 +65,34 @@ function main() { echo "${NODE_LIST_REPL[*]}" ) >>"$path_to_haproxy_cfg/haproxy.cfg" + cat <<-EOF >>"$path_to_haproxy_cfg/haproxy.cfg" + backend mysql-x + mode tcp + option srvtcpka + balance roundrobin + option external-check + external-check command /opt/percona/haproxy_check_replicas.sh + EOF + + ( + IFS=$'\n' + echo "${NODE_LIST_MYSQLX[*]}" + ) >>"$path_to_haproxy_cfg/haproxy.cfg" + + cat <<-EOF >>"$path_to_haproxy_cfg/haproxy.cfg" + backend mysql-admin + mode tcp + option srvtcpka + balance roundrobin + option external-check + external-check command /opt/percona/haproxy_check_replicas.sh + EOF + + ( + IFS=$'\n' + echo "${NODE_LIST_ADMIN[*]}" + ) >>"$path_to_haproxy_cfg/haproxy.cfg" + haproxy -c -f /opt/percona/haproxy-global.cfg -f $path_to_haproxy_cfg/haproxy.cfg # TODO: Can we do something for maintenance mode? diff --git a/e2e-tests/conf/client.yaml b/e2e-tests/conf/client.yaml index c3d169a95..f1a92a685 100644 --- a/e2e-tests/conf/client.yaml +++ b/e2e-tests/conf/client.yaml @@ -7,7 +7,7 @@ metadata: spec: containers: - name: mysql-client - image: percona/percona-server:8.0.25 + image: percona/percona-server:8.0.33 command: - sleep - infinity diff --git a/e2e-tests/functions b/e2e-tests/functions index 89bfae726..1e2d5453d 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -161,6 +161,19 @@ run_mysql() { | (grep -v 'Using a password on the command line interface can be insecure.' || :) } +run_mysqlsh() { + local command="$1" + local uri="$2" + local pod="$3" + + client_pod=$(get_client_pod) + wait_pod $client_pod 1>&2 + + kubectl -n "${NAMESPACE}" exec "${pod:-mysql-client}" -- \ + bash -c "printf '%s\n' \"${command}\" | mysqlsh --sql --quiet-start=2 $uri" 2>&1 \ + | tail -n +2 +} + run_curl() { kubectl -n "${NAMESPACE}" exec mysql-client -- bash -c "curl -s -k $*" } diff --git a/e2e-tests/tests/gr-haproxy/03-check-connections.yaml b/e2e-tests/tests/gr-haproxy/03-check-connections.yaml index cabe9cba4..0f715fc84 100644 --- a/e2e-tests/tests/gr-haproxy/03-check-connections.yaml +++ b/e2e-tests/tests/gr-haproxy/03-check-connections.yaml @@ -19,7 +19,7 @@ commands: # proxy_protocol=$(run_mysql "SELECT count(*) FROM myDB.myTable" "-h $(get_haproxy_svc $(get_cluster_name)) -P 3309 -uroot -proot_password") # args="${args} --from-literal=proxy_protocol=${proxy_protocol}" - mysqlx=$(run_mysql "SELECT count(*) FROM myDB.myTable" "-h $(get_haproxy_svc $(get_cluster_name)) -P 33060 -uroot -proot_password") + mysqlx=$(run_mysqlsh "SELECT count(*) FROM myDB.myTable" "-h $(get_haproxy_svc $(get_cluster_name)) -P 33060 -uroot -proot_password") args="${args} --from-literal=mysqlx=${mysqlx}" mysql_admin=$(run_mysql "SELECT count(*) FROM myDB.myTable" "-h $(get_haproxy_svc $(get_cluster_name)) -P 33062 -uroot -proot_password") From ed35937b109c7626fa715cce45366f8a8add4dd3 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 18 Aug 2023 15:03:57 +0200 Subject: [PATCH 003/192] K8SPS-73 - Add self healing tests (#424) * K8SPS-73 - Add operator-self-healing test * K8SPS-73 - Add self-healing test * K8SPS-73 - Add gr-self-healing test * Some fixes for self-healing tests * Remove OPERATOR_NS from Jenkinsfile since not supported yet * Fix operator-self-healing test * Remove self-healing test which will be merged after fixes for K8SPS-288 and K8SPS-289 --- Jenkinsfile | 2 +- e2e-tests/conf/chaos-network-loss.yml | 15 ++ e2e-tests/conf/chaos-pod-failure.yml | 13 ++ e2e-tests/conf/chaos-pod-kill.yml | 11 + e2e-tests/functions | 144 +++++++++++-- e2e-tests/run-distro.csv | 2 + e2e-tests/run-minikube.csv | 2 + e2e-tests/run-pr.csv | 2 + e2e-tests/run-release.csv | 2 + .../tests/gr-self-healing/00-assert.yaml | 26 +++ .../gr-self-healing/00-deploy-operator.yaml | 14 ++ .../tests/gr-self-healing/01-assert.yaml | 27 +++ .../gr-self-healing/01-deploy-chaos-mesh.yaml | 11 + .../tests/gr-self-healing/02-assert.yaml | 144 +++++++++++++ .../gr-self-healing/02-create-cluster.yaml | 20 ++ .../tests/gr-self-healing/03-write-data.yaml | 16 ++ .../tests/gr-self-healing/04-assert.yaml | 10 + .../gr-self-healing/04-read-from-primary.yaml | 13 ++ .../tests/gr-self-healing/05-assert.yaml | 163 ++++++++++++++ .../gr-self-healing/05-kill-primary.yaml | 18 ++ .../tests/gr-self-healing/06-write-data.yaml | 12 ++ .../tests/gr-self-healing/07-assert.yaml | 30 +++ .../07-read-from-replicas.yaml | 15 ++ .../tests/gr-self-healing/08-assert.yaml | 166 +++++++++++++++ .../gr-self-healing/08-failure-primary.yaml | 12 ++ .../tests/gr-self-healing/09-write-data.yaml | 12 ++ .../tests/gr-self-healing/10-assert.yaml | 33 +++ .../10-read-from-replicas.yaml | 15 ++ .../tests/gr-self-healing/11-assert.yaml | 170 +++++++++++++++ .../11-network-loss-primary.yaml | 13 ++ .../tests/gr-self-healing/12-write-data.yaml | 12 ++ .../tests/gr-self-healing/13-assert.yaml | 36 ++++ .../13-read-from-replicas.yaml | 15 ++ .../tests/gr-self-healing/14-assert.yaml | 198 ++++++++++++++++++ .../gr-self-healing/14-cluster-crash.yaml | 12 ++ .../tests/gr-self-healing/15-write-data.yaml | 12 ++ .../tests/gr-self-healing/16-assert.yaml | 39 ++++ .../16-read-from-replicas.yaml | 15 ++ .../17-destroy-chaos-mesh.yaml | 12 ++ .../gr-self-healing/18-drop-finalizer.yaml | 5 + .../operator-self-healing/00-assert.yaml | 26 +++ .../00-deploy-operator.yaml | 14 ++ .../operator-self-healing/01-assert.yaml | 27 +++ .../01-deploy-chaos-mesh.yaml | 11 + .../operator-self-healing/02-assert.yaml | 60 ++++++ .../02-create-cluster.yaml | 21 ++ .../operator-self-healing/03-write-data.yaml | 16 ++ .../operator-self-healing/04-assert.yaml | 10 + .../04-read-from-primary.yaml | 13 ++ .../operator-self-healing/05-assert.yaml | 26 +++ .../operator-self-healing/05-kill-pod.yaml | 19 ++ .../operator-self-healing/06-assert.yaml | 60 ++++++ .../operator-self-healing/06-scale-up.yaml | 21 ++ .../operator-self-healing/07-assert.yaml | 26 +++ .../07-network-loss.yaml | 12 ++ .../operator-self-healing/08-assert.yaml | 60 ++++++ .../operator-self-healing/08-scale-down.yaml | 21 ++ .../operator-self-healing/09-assert.yaml | 26 +++ .../operator-self-healing/09-pod-failure.yaml | 12 ++ .../operator-self-healing/10-assert.yaml | 60 ++++++ .../operator-self-healing/10-scale-up.yaml | 21 ++ .../11-destroy-chaos-mesh.yaml | 12 ++ .../12-drop-finalizer.yaml | 5 + 63 files changed, 2046 insertions(+), 22 deletions(-) create mode 100644 e2e-tests/conf/chaos-network-loss.yml create mode 100644 e2e-tests/conf/chaos-pod-failure.yml create mode 100644 e2e-tests/conf/chaos-pod-kill.yml create mode 100644 e2e-tests/tests/gr-self-healing/00-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml create mode 100644 e2e-tests/tests/gr-self-healing/01-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/01-deploy-chaos-mesh.yaml create mode 100644 e2e-tests/tests/gr-self-healing/02-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/02-create-cluster.yaml create mode 100644 e2e-tests/tests/gr-self-healing/03-write-data.yaml create mode 100644 e2e-tests/tests/gr-self-healing/04-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/04-read-from-primary.yaml create mode 100644 e2e-tests/tests/gr-self-healing/05-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/05-kill-primary.yaml create mode 100644 e2e-tests/tests/gr-self-healing/06-write-data.yaml create mode 100644 e2e-tests/tests/gr-self-healing/07-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/07-read-from-replicas.yaml create mode 100644 e2e-tests/tests/gr-self-healing/08-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/08-failure-primary.yaml create mode 100644 e2e-tests/tests/gr-self-healing/09-write-data.yaml create mode 100644 e2e-tests/tests/gr-self-healing/10-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/10-read-from-replicas.yaml create mode 100644 e2e-tests/tests/gr-self-healing/11-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/11-network-loss-primary.yaml create mode 100644 e2e-tests/tests/gr-self-healing/12-write-data.yaml create mode 100644 e2e-tests/tests/gr-self-healing/13-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/13-read-from-replicas.yaml create mode 100644 e2e-tests/tests/gr-self-healing/14-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/14-cluster-crash.yaml create mode 100644 e2e-tests/tests/gr-self-healing/15-write-data.yaml create mode 100644 e2e-tests/tests/gr-self-healing/16-assert.yaml create mode 100644 e2e-tests/tests/gr-self-healing/16-read-from-replicas.yaml create mode 100644 e2e-tests/tests/gr-self-healing/17-destroy-chaos-mesh.yaml create mode 100644 e2e-tests/tests/gr-self-healing/18-drop-finalizer.yaml create mode 100644 e2e-tests/tests/operator-self-healing/00-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml create mode 100644 e2e-tests/tests/operator-self-healing/01-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/01-deploy-chaos-mesh.yaml create mode 100644 e2e-tests/tests/operator-self-healing/02-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/02-create-cluster.yaml create mode 100644 e2e-tests/tests/operator-self-healing/03-write-data.yaml create mode 100644 e2e-tests/tests/operator-self-healing/04-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/04-read-from-primary.yaml create mode 100644 e2e-tests/tests/operator-self-healing/05-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/05-kill-pod.yaml create mode 100644 e2e-tests/tests/operator-self-healing/06-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/06-scale-up.yaml create mode 100644 e2e-tests/tests/operator-self-healing/07-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/07-network-loss.yaml create mode 100644 e2e-tests/tests/operator-self-healing/08-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/08-scale-down.yaml create mode 100644 e2e-tests/tests/operator-self-healing/09-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/09-pod-failure.yaml create mode 100644 e2e-tests/tests/operator-self-healing/10-assert.yaml create mode 100644 e2e-tests/tests/operator-self-healing/10-scale-up.yaml create mode 100644 e2e-tests/tests/operator-self-healing/11-destroy-chaos-mesh.yaml create mode 100644 e2e-tests/tests/operator-self-healing/12-drop-finalizer.yaml diff --git a/Jenkinsfile b/Jenkinsfile index 7d7355783..a2e68a6cb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -275,6 +275,7 @@ void prepareNode() { # v0.15.0 kuttl version kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/a67f31ecb2e62f15149ca66d096357050f07b77d/plugins/kuttl.yaml printf "%s is installed" "$(kubectl kuttl --version)" + kubectl krew install assert ''' } @@ -287,7 +288,6 @@ pipeline { environment { CLOUDSDK_CORE_DISABLE_PROMPTS = 1 CLEAN_NAMESPACE = 1 - OPERATOR_NS = 'ps-operator' GIT_SHORT_COMMIT = sh(script: 'git rev-parse --short HEAD', , returnStdout: true).trim() VERSION = "${env.GIT_BRANCH}-${env.GIT_SHORT_COMMIT}" CLUSTER_NAME = sh(script: "echo jen-ps-${env.CHANGE_ID}-${GIT_SHORT_COMMIT}-${env.BUILD_NUMBER} | tr '[:upper:]' '[:lower:]'", , returnStdout: true).trim() diff --git a/e2e-tests/conf/chaos-network-loss.yml b/e2e-tests/conf/chaos-network-loss.yml new file mode 100644 index 000000000..c4cbb2db1 --- /dev/null +++ b/e2e-tests/conf/chaos-network-loss.yml @@ -0,0 +1,15 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: NetworkChaos +metadata: + name: network-loss-example +spec: + action: loss + mode: one + selector: + pods: + test-namespace: + - pod-name + loss: + loss: "100" + correlation: "100" + duration: "60s" diff --git a/e2e-tests/conf/chaos-pod-failure.yml b/e2e-tests/conf/chaos-pod-failure.yml new file mode 100644 index 000000000..3e4630609 --- /dev/null +++ b/e2e-tests/conf/chaos-pod-failure.yml @@ -0,0 +1,13 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: pod-failure-example +spec: + action: pod-failure + mode: one + value: "" + duration: "60s" + selector: + pods: + test-namespace: + - pod-name diff --git a/e2e-tests/conf/chaos-pod-kill.yml b/e2e-tests/conf/chaos-pod-kill.yml new file mode 100644 index 000000000..edf885d75 --- /dev/null +++ b/e2e-tests/conf/chaos-pod-kill.yml @@ -0,0 +1,11 @@ +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: pod-kill-example +spec: + action: pod-kill + mode: one + selector: + pods: + test-namespace: + - pod-name diff --git a/e2e-tests/functions b/e2e-tests/functions index 1e2d5453d..da4edff0f 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -50,7 +50,7 @@ deploy_pmm_server() { --set platform="${platform}" \ "https://percona-charts.storage.googleapis.com/pmm-server-${PMM_SERVER_VERSION}.tgz" fi - SERVICE="postgres" + local SERVICE="postgres" until kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "pgrep -x $SERVICE >/dev/null"; do echo "Retry $retry" sleep 5 @@ -63,13 +63,13 @@ deploy_pmm_server() { } get_pmm_api_key() { - ADMIN_PASSWORD=$(kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "printenv | grep ADMIN_PASSWORD | cut -d '=' -f2") + local ADMIN_PASSWORD=$(kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "printenv | grep ADMIN_PASSWORD | cut -d '=' -f2") echo $(curl --insecure -X POST -H "Content-Type: application/json" -d '{"name":"operator", "role": "Admin"}' "https://admin:$ADMIN_PASSWORD@"$(get_service_ip monitoring-service)"/graph/api/auth/keys" | jq .key) } deploy_minio() { - accessKey="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 -d)" - secretKey="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 -d)" + local accessKey="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 -d)" + local secretKey="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 -d)" helm uninstall -n "${NAMESPACE}" minio-service || : helm repo remove minio || : @@ -312,6 +312,7 @@ get_mysql_users() { get_service_ip() { local service=$1 + while (kubectl get service/$service -n "${NAMESPACE}" -o 'jsonpath={.spec.type}' 2>&1 || :) | grep -q NotFound; do sleep 1 done @@ -392,16 +393,43 @@ wait_pod() { set -o xtrace } +wait_deployment() { + local name=$1 + local target_namespace=${2:-"$namespace"} + + sleep 10 + set +o xtrace + retry=0 + echo -n $name + until [ -n "$(kubectl -n ${target_namespace} get deployment $name -o jsonpath='{.status.replicas}')" \ + -a "$(kubectl -n ${target_namespace} get deployment $name -o jsonpath='{.status.replicas}')" \ + == "$(kubectl -n ${target_namespace} get deployment $name -o jsonpath='{.status.readyReplicas}')" ]; do + sleep 1 + echo -n . + let retry+=1 + if [ $retry -ge 360 ]; then + kubectl logs $(get_operator_pod) -c operator \ + | grep -v 'level=info' \ + | grep -v 'level=debug' \ + | tail -100 + echo max retry count $retry reached. something went wrong with operator or kubernetes cluster + exit 1 + fi + done + echo + set -o xtrace +} + check_auto_tuning() { - RAM_SIZE=$1 - RDS_MEM_INSTANCE=12582880 - CUSTOM_INNODB_SIZE=$2 - CUSTOM_CONNECTIONS=$3 + local RAM_SIZE=$1 + local RDS_MEM_INSTANCE=12582880 + local CUSTOM_INNODB_SIZE=$2 + local CUSTOM_CONNECTIONS=$3 - INNODB_SIZE=$(run_mysql \ + local INNODB_SIZE=$(run_mysql \ 'SELECT @@innodb_buffer_pool_size;' \ "-h $(get_haproxy_svc "$(get_cluster_name)") -uroot -proot_password") - CONNECTIONS=$(run_mysql \ + local CONNECTIONS=$(run_mysql \ 'SELECT @@max_connections;' \ "-h $(get_haproxy_svc "$(get_cluster_name)") -uroot -proot_password") @@ -461,12 +489,15 @@ get_primary_from_haproxy() { run_mysql "SHOW VARIABLES LIKE '%hostname%';" "-h ${haproxy_pod_ip} -P3306 -uroot -proot_password" | awk '{print $2}' } +get_primary_from_group_replication() { + run_mysql "SELECT MEMBER_HOST FROM performance_schema.replication_group_members where MEMBER_ROLE='PRIMARY';" "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" | cut -d'.' -f1 +} + verify_certificate_sans() { local certificate=$1 local expected_sans=$2 - - have=$(mktemp) - want=$(mktemp) + local have=$(mktemp) + local want=$(mktemp) kubectl -n "${NAMESPACE}" get certificate "${certificate}" -o jsonpath='{.spec.dnsNames}' | jq '.' >"${have}" echo "${expected_sans}" | jq '.' >"${want}" @@ -475,21 +506,19 @@ verify_certificate_sans() { } check_passwords_leak() { - - secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12")) | not) | .value') - - passwords="$(for i in $secrets; do base64 -d <<< $i; echo; done) $secrets" - pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') + local secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12")) | not) | .value') + local passwords="$(for i in $secrets; do base64 -d <<< $i; echo; done) $secrets" + local pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') collect_logs() { NS=$1 for p in $pods; do - containers=$(kubectl -n "$NS" get pod $p -o jsonpath='{.spec.containers[*].name}') + local containers=$(kubectl -n "$NS" get pod $p -o jsonpath='{.spec.containers[*].name}') for c in $containers; do kubectl -n "$NS" logs $p -c $c >${TEMP_DIR}/logs_output-$p-$c.txt echo logs saved in: ${TEMP_DIR}/logs_output-$p-$c.txt for pass in $passwords; do - count=$(grep -c --fixed-strings -- "$pass" ${TEMP_DIR}/logs_output-$p-$c.txt || :) + local count=$(grep -c --fixed-strings -- "$pass" ${TEMP_DIR}/logs_output-$p-$c.txt || :) if [[ $count != 0 ]]; then echo leaked passwords are found in log ${TEMP_DIR}/logs_output-$p-$c.txt false @@ -502,7 +531,80 @@ check_passwords_leak() { collect_logs $NAMESPACE if [ -n "$OPERATOR_NS" ]; then - pods=$(kubectl -n "${OPERATOR_NS}" get pods -o name | awk -F "/" '{print $2}') + local pods=$(kubectl -n "${OPERATOR_NS}" get pods -o name | awk -F "/" '{print $2}') collect_logs $OPERATOR_NS fi } + +deploy_chaos_mesh() { + destroy_chaos_mesh + + helm repo add chaos-mesh https://charts.chaos-mesh.org + helm install chaos-mesh chaos-mesh/chaos-mesh --namespace=${NAMESPACE} --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock --set dashboard.create=false --version 2.5.1 + sleep 10 +} + +destroy_chaos_mesh() { + local chaos_mesh_ns=$(helm list --all-namespaces --filter chaos-mesh | tail -n1 | awk -F' ' '{print $2}' | sed 's/NAMESPACE//') + + for i in $(kubectl api-resources | grep chaos-mesh | awk '{print $1}'); do timeout 30 kubectl delete ${i} --all --all-namespaces || :; done + if [ -n "${chaos_mesh_ns}" ]; then + helm uninstall chaos-mesh --namespace ${chaos_mesh_ns} || : + fi + timeout 30 kubectl delete crd $(kubectl get crd | grep 'chaos-mesh.org' | awk '{print $1}') || : + timeout 30 kubectl delete clusterrolebinding $(kubectl get clusterrolebinding | grep 'chaos-mesh' | awk '{print $1}') || : + timeout 30 kubectl delete clusterrole $(kubectl get clusterrole | grep 'chaos-mesh' | awk '{print $1}') || : + timeout 30 kubectl delete MutatingWebhookConfiguration $(kubectl get MutatingWebhookConfiguration | grep 'chaos-mesh' | awk '{print $1}') || : + timeout 30 kubectl delete ValidatingWebhookConfiguration $(kubectl get ValidatingWebhookConfiguration | grep 'chaos-mesh' | awk '{print $1}') || : + timeout 30 kubectl delete ValidatingWebhookConfiguration $(kubectl get ValidatingWebhookConfiguration | grep 'validate-auth' | awk '{print $1}') || : +} + +kill_pods() { + local ns=$1 + local selector=$2 + local pod_label=$3 + local label_value=$4 + local chaos_suffix=$5 + + if [ "${selector}" == "pod" ]; then + yq eval ' + .metadata.name = "chaos-pod-kill-'${chaos_suffix}'" | + del(.spec.selector.pods.test-namespace) | + .spec.selector.pods.'${ns}'[0] = "'${pod_label}'"' ${TESTS_CONFIG_DIR}/chaos-pod-kill.yml \ + | kubectl apply --namespace ${ns} -f - + elif [ "${selector}" == "label" ]; then + yq eval ' + .metadata.name = "chaos-kill-label-'${chaos_suffix}'" | + .spec.mode = "all" | + del(.spec.selector.pods) | + .spec.selector.labelSelectors."'${pod_label}'" = "'${label_value}'"' ${TESTS_CONFIG_DIR}/chaos-pod-kill.yml \ + | kubectl apply --namespace ${ns} -f - + fi + sleep 5 +} + +failure_pod() { + local ns=$1 + local pod=$2 + local chaos_suffix=$3 + + yq eval ' + .metadata.name = "chaos-pod-failure-'${chaos_suffix}'" | + del(.spec.selector.pods.test-namespace) | + .spec.selector.pods.'${ns}'[0] = "'${pod}'"' ${TESTS_CONFIG_DIR}/chaos-pod-failure.yml \ + | kubectl apply --namespace ${ns} -f - + sleep 5 +} + +network_loss() { + local ns=$1 + local pod=$2 + local chaos_suffix=$3 + + yq eval ' + .metadata.name = "chaos-pod-network-loss-'${chaos_suffix}'" | + del(.spec.selector.pods.test-namespace) | + .spec.selector.pods.'${ns}'[0] = "'${pod}'"' ${TESTS_CONFIG_DIR}/chaos-network-loss.yml \ + | kubectl apply --namespace ${ns} -f - + sleep 5 +} diff --git a/e2e-tests/run-distro.csv b/e2e-tests/run-distro.csv index 91e37e55e..18ce672e6 100644 --- a/e2e-tests/run-distro.csv +++ b/e2e-tests/run-distro.csv @@ -7,12 +7,14 @@ gr-haproxy gr-init-deploy gr-one-pod gr-scaling +gr-self-healing gr-tls-cert-manager gr-users haproxy init-deploy monitoring one-pod +operator-self-healing scaling service-per-pod sidecars diff --git a/e2e-tests/run-minikube.csv b/e2e-tests/run-minikube.csv index a3347acc0..7233abbc2 100644 --- a/e2e-tests/run-minikube.csv +++ b/e2e-tests/run-minikube.csv @@ -7,11 +7,13 @@ gr-haproxy gr-init-deploy gr-one-pod gr-scaling +gr-self-healing gr-tls-cert-manager gr-users haproxy init-deploy one-pod +operator-self-healing sidecars smart-update tls-cert-manager diff --git a/e2e-tests/run-pr.csv b/e2e-tests/run-pr.csv index 417a205c1..ae8ef43a2 100644 --- a/e2e-tests/run-pr.csv +++ b/e2e-tests/run-pr.csv @@ -10,6 +10,7 @@ gr-ignore-annotations gr-init-deploy gr-one-pod gr-scaling +gr-self-healing gr-tls-cert-manager gr-users haproxy @@ -17,6 +18,7 @@ init-deploy limits monitoring one-pod +operator-self-healing scaling service-per-pod sidecars diff --git a/e2e-tests/run-release.csv b/e2e-tests/run-release.csv index e31942b66..5d8cb6f7c 100644 --- a/e2e-tests/run-release.csv +++ b/e2e-tests/run-release.csv @@ -9,6 +9,7 @@ gr-ignore-annotations gr-init-deploy gr-one-pod gr-scaling +gr-self-healing gr-tls-cert-manager gr-users haproxy @@ -16,6 +17,7 @@ init-deploy limits monitoring one-pod +operator-self-healing scaling service-per-pod sidecars diff --git a/e2e-tests/tests/gr-self-healing/00-assert.yaml b/e2e-tests/tests/gr-self-healing/00-assert.yaml new file mode 100644 index 000000000..d9146fe1b --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/00-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +metadata: + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml b/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml new file mode 100644 index 000000000..67307fe5d --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml @@ -0,0 +1,14 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + deploy_operator + deploy_non_tls_cluster_secrets + deploy_tls_cluster_secrets + deploy_client diff --git a/e2e-tests/tests/gr-self-healing/01-assert.yaml b/e2e-tests/tests/gr-self-healing/01-assert.yaml new file mode 100644 index 000000000..9caa36184 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/01-assert.yaml @@ -0,0 +1,27 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: chaos-controller-manager +spec: + replicas: 3 +status: + availableReplicas: 3 + readyReplicas: 3 + replicas: 3 + updatedReplicas: 3 +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: chaos-daemon +status: + currentNumberScheduled: 3 + desiredNumberScheduled: 3 + numberAvailable: 3 + numberMisscheduled: 0 + numberReady: 3 + updatedNumberScheduled: 3 diff --git a/e2e-tests/tests/gr-self-healing/01-deploy-chaos-mesh.yaml b/e2e-tests/tests/gr-self-healing/01-deploy-chaos-mesh.yaml new file mode 100644 index 000000000..2fcde5027 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/01-deploy-chaos-mesh.yaml @@ -0,0 +1,11 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + deploy_chaos_mesh diff --git a/e2e-tests/tests/gr-self-healing/02-assert.yaml b/e2e-tests/tests/gr-self-healing/02-assert.yaml new file mode 100644 index 000000000..85cf66437 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/02-assert.yaml @@ -0,0 +1,144 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-self-healing-router +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/gr-self-healing/02-create-cluster.yaml b/e2e-tests/tests/gr-self-healing/02-create-cluster.yaml new file mode 100644 index 000000000..4f0779353 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/02-create-cluster.yaml @@ -0,0 +1,20 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.mysql.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.proxy.haproxy.enabled=false' - \ + | yq eval '.spec.proxy.router.enabled=true' - \ + | yq eval '.spec.proxy.router.size=3' - \ + | yq eval '.spec.proxy.router.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.orchestrator.enabled=false' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-self-healing/03-write-data.yaml b/e2e-tests/tests/gr-self-healing/03-write-data.yaml new file mode 100644 index 000000000..1bbd291a9 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/03-write-data.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "CREATE DATABASE IF NOT EXISTS myDB; CREATE TABLE IF NOT EXISTS myDB.myTable (id int PRIMARY KEY)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100500)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" diff --git a/e2e-tests/tests/gr-self-healing/04-assert.yaml b/e2e-tests/tests/gr-self-healing/04-assert.yaml new file mode 100644 index 000000000..8a8037060 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/04-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-read-from-primary +data: + data: "100500" diff --git a/e2e-tests/tests/gr-self-healing/04-read-from-primary.yaml b/e2e-tests/tests/gr-self-healing/04-read-from-primary.yaml new file mode 100644 index 000000000..68e1755aa --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/04-read-from-primary.yaml @@ -0,0 +1,13 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password") + + kubectl create configmap -n "${NAMESPACE}" 04-read-from-primary --from-literal=data="${data}" diff --git a/e2e-tests/tests/gr-self-healing/05-assert.yaml b/e2e-tests/tests/gr-self-healing/05-assert.yaml new file mode 100644 index 000000000..e107d4585 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/05-assert.yaml @@ -0,0 +1,163 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-self-healing-router +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: chaos-pod-kill-primary +spec: + action: pod-kill + mode: one +status: + experiment: + containerRecords: + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + desiredPhase: Run diff --git a/e2e-tests/tests/gr-self-healing/05-kill-primary.yaml b/e2e-tests/tests/gr-self-healing/05-kill-primary.yaml new file mode 100644 index 000000000..255f6a0b6 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/05-kill-primary.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + init_pod="$(get_primary_from_group_replication)" + kill_pods "${NAMESPACE}" "pod" "$init_pod" "" "primary" + sleep 10 # wait a bit for pod to be killed + + if [ "$init_pod" == "$(get_primary_from_group_replication)" ]; then + echo "primary pod was not killed! something went wrong." + exit 1 + fi diff --git a/e2e-tests/tests/gr-self-healing/06-write-data.yaml b/e2e-tests/tests/gr-self-healing/06-write-data.yaml new file mode 100644 index 000000000..a8da85c54 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/06-write-data.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100501)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" diff --git a/e2e-tests/tests/gr-self-healing/07-assert.yaml b/e2e-tests/tests/gr-self-healing/07-assert.yaml new file mode 100644 index 000000000..d5acf9414 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/07-assert.yaml @@ -0,0 +1,30 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 07-read-from-replicas-0 +data: + data: |- + 100500 + 100501 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 07-read-from-replicas-1 +data: + data: |- + 100500 + 100501 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 07-read-from-replicas-2 +data: + data: |- + 100500 + 100501 diff --git a/e2e-tests/tests/gr-self-healing/07-read-from-replicas.yaml b/e2e-tests/tests/gr-self-healing/07-read-from-replicas.yaml new file mode 100644 index 000000000..30f4d2649 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/07-read-from-replicas.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 07-read-from-replicas-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-self-healing/08-assert.yaml b/e2e-tests/tests/gr-self-healing/08-assert.yaml new file mode 100644 index 000000000..eb55354ae --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/08-assert.yaml @@ -0,0 +1,166 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-self-healing-router +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: chaos-pod-failure-primary +spec: + action: pod-failure + duration: 60s + mode: one +status: + experiment: + containerRecords: + - events: + - operation: Apply + type: Succeeded + - operation: Recover + type: Succeeded + injectedCount: 1 + phase: Not Injected + recoveredCount: 1 + selectorKey: . + desiredPhase: Stop diff --git a/e2e-tests/tests/gr-self-healing/08-failure-primary.yaml b/e2e-tests/tests/gr-self-healing/08-failure-primary.yaml new file mode 100644 index 000000000..59d48c526 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/08-failure-primary.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + failure_pod "${NAMESPACE}" "$(get_primary_from_group_replication)" "primary" + sleep 10 # wait a bit for pod to be killed diff --git a/e2e-tests/tests/gr-self-healing/09-write-data.yaml b/e2e-tests/tests/gr-self-healing/09-write-data.yaml new file mode 100644 index 000000000..f3bb7eb48 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/09-write-data.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100502)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" diff --git a/e2e-tests/tests/gr-self-healing/10-assert.yaml b/e2e-tests/tests/gr-self-healing/10-assert.yaml new file mode 100644 index 000000000..2f9ba0826 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/10-assert.yaml @@ -0,0 +1,33 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 10-read-from-replicas-0 +data: + data: |- + 100500 + 100501 + 100502 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 10-read-from-replicas-1 +data: + data: |- + 100500 + 100501 + 100502 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 10-read-from-replicas-2 +data: + data: |- + 100500 + 100501 + 100502 diff --git a/e2e-tests/tests/gr-self-healing/10-read-from-replicas.yaml b/e2e-tests/tests/gr-self-healing/10-read-from-replicas.yaml new file mode 100644 index 000000000..55a419ab7 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/10-read-from-replicas.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 10-read-from-replicas-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-self-healing/11-assert.yaml b/e2e-tests/tests/gr-self-healing/11-assert.yaml new file mode 100644 index 000000000..972daa107 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/11-assert.yaml @@ -0,0 +1,170 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-self-healing-router +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: chaos-mesh.org/v1alpha1 +kind: NetworkChaos +metadata: + name: chaos-pod-network-loss-primary +spec: + action: loss + direction: to + duration: 60s + loss: + correlation: "100" + loss: "100" + mode: one +status: + experiment: + containerRecords: + - events: + - operation: Apply + type: Succeeded + - operation: Recover + type: Succeeded + injectedCount: 1 + phase: Not Injected + recoveredCount: 1 + selectorKey: . + desiredPhase: Stop diff --git a/e2e-tests/tests/gr-self-healing/11-network-loss-primary.yaml b/e2e-tests/tests/gr-self-healing/11-network-loss-primary.yaml new file mode 100644 index 000000000..f63192c0e --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/11-network-loss-primary.yaml @@ -0,0 +1,13 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 90 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + network_loss "${NAMESPACE}" "$(get_primary_from_group_replication)" "primary" + sleep 30 # wait for new master to get elected + timeout: 90 diff --git a/e2e-tests/tests/gr-self-healing/12-write-data.yaml b/e2e-tests/tests/gr-self-healing/12-write-data.yaml new file mode 100644 index 000000000..a683b8542 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/12-write-data.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100503)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" diff --git a/e2e-tests/tests/gr-self-healing/13-assert.yaml b/e2e-tests/tests/gr-self-healing/13-assert.yaml new file mode 100644 index 000000000..7d2f48cde --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/13-assert.yaml @@ -0,0 +1,36 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 13-read-from-replicas-0 +data: + data: |2- + 100500 + 100501 + 100502 + 100503 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 13-read-from-replicas-1 +data: + data: |2- + 100500 + 100501 + 100502 + 100503 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 13-read-from-replicas-2 +data: + data: |2- + 100500 + 100501 + 100502 + 100503 diff --git a/e2e-tests/tests/gr-self-healing/13-read-from-replicas.yaml b/e2e-tests/tests/gr-self-healing/13-read-from-replicas.yaml new file mode 100644 index 000000000..77b99efc0 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/13-read-from-replicas.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 13-read-from-replicas-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-self-healing/14-assert.yaml b/e2e-tests/tests/gr-self-healing/14-assert.yaml new file mode 100644 index 000000000..497b0571d --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/14-assert.yaml @@ -0,0 +1,198 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 480 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-self-healing-router +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-self-healing-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-self-healing +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-self-healing + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: chaos-mesh.org/v1alpha1 +kind: PodChaos +metadata: + name: chaos-kill-label-cluster-crash +spec: + action: pod-kill + mode: all +status: + experiment: + containerRecords: + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + - events: + - operation: Apply + type: Succeeded + injectedCount: 1 + phase: Injected + recoveredCount: 0 + selectorKey: . + desiredPhase: Run diff --git a/e2e-tests/tests/gr-self-healing/14-cluster-crash.yaml b/e2e-tests/tests/gr-self-healing/14-cluster-crash.yaml new file mode 100644 index 000000000..23a786193 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/14-cluster-crash.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + kill_pods "${NAMESPACE}" "label" "app.kubernetes.io/instance" "gr-self-healing" "cluster-crash" + sleep 30 # wait for crash diff --git a/e2e-tests/tests/gr-self-healing/15-write-data.yaml b/e2e-tests/tests/gr-self-healing/15-write-data.yaml new file mode 100644 index 000000000..9152934e0 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/15-write-data.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100504)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" diff --git a/e2e-tests/tests/gr-self-healing/16-assert.yaml b/e2e-tests/tests/gr-self-healing/16-assert.yaml new file mode 100644 index 000000000..5f278c285 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/16-assert.yaml @@ -0,0 +1,39 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 16-read-from-replicas-0 +data: + data: |- + 100500 + 100501 + 100502 + 100503 + 100504 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 16-read-from-replicas-1 +data: + data: |- + 100500 + 100501 + 100502 + 100503 + 100504 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 16-read-from-replicas-2 +data: + data: |- + 100500 + 100501 + 100502 + 100503 + 100504 diff --git a/e2e-tests/tests/gr-self-healing/16-read-from-replicas.yaml b/e2e-tests/tests/gr-self-healing/16-read-from-replicas.yaml new file mode 100644 index 000000000..ab4cfa84c --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/16-read-from-replicas.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 16-read-from-replicas-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-self-healing/17-destroy-chaos-mesh.yaml b/e2e-tests/tests/gr-self-healing/17-destroy-chaos-mesh.yaml new file mode 100644 index 000000000..3f0cbc6b8 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/17-destroy-chaos-mesh.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 120 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_chaos_mesh + timeout: 120 diff --git a/e2e-tests/tests/gr-self-healing/18-drop-finalizer.yaml b/e2e-tests/tests/gr-self-healing/18-drop-finalizer.yaml new file mode 100644 index 000000000..98952bc22 --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/18-drop-finalizer.yaml @@ -0,0 +1,5 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: [] diff --git a/e2e-tests/tests/operator-self-healing/00-assert.yaml b/e2e-tests/tests/operator-self-healing/00-assert.yaml new file mode 100644 index 000000000..d9146fe1b --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/00-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +metadata: + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml b/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml new file mode 100644 index 000000000..67307fe5d --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml @@ -0,0 +1,14 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + deploy_operator + deploy_non_tls_cluster_secrets + deploy_tls_cluster_secrets + deploy_client diff --git a/e2e-tests/tests/operator-self-healing/01-assert.yaml b/e2e-tests/tests/operator-self-healing/01-assert.yaml new file mode 100644 index 000000000..9caa36184 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/01-assert.yaml @@ -0,0 +1,27 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: chaos-controller-manager +spec: + replicas: 3 +status: + availableReplicas: 3 + readyReplicas: 3 + replicas: 3 + updatedReplicas: 3 +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: chaos-daemon +status: + currentNumberScheduled: 3 + desiredNumberScheduled: 3 + numberAvailable: 3 + numberMisscheduled: 0 + numberReady: 3 + updatedNumberScheduled: 3 diff --git a/e2e-tests/tests/operator-self-healing/01-deploy-chaos-mesh.yaml b/e2e-tests/tests/operator-self-healing/01-deploy-chaos-mesh.yaml new file mode 100644 index 000000000..2fcde5027 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/01-deploy-chaos-mesh.yaml @@ -0,0 +1,11 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + deploy_chaos_mesh diff --git a/e2e-tests/tests/operator-self-healing/02-assert.yaml b/e2e-tests/tests/operator-self-healing/02-assert.yaml new file mode 100644 index 000000000..143e658f6 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/02-assert.yaml @@ -0,0 +1,60 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-haproxy +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: operator-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/operator-self-healing/02-create-cluster.yaml b/e2e-tests/tests/operator-self-healing/02-create-cluster.yaml new file mode 100644 index 000000000..3dd3dea43 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/02-create-cluster.yaml @@ -0,0 +1,21 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.mysql.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=3' - \ + | yq eval '.spec.proxy.haproxy.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | yq eval '.spec.orchestrator.affinity.antiAffinityTopologyKey="none"' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/operator-self-healing/03-write-data.yaml b/e2e-tests/tests/operator-self-healing/03-write-data.yaml new file mode 100644 index 000000000..bc82e7920 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/03-write-data.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "CREATE DATABASE IF NOT EXISTS myDB; CREATE TABLE IF NOT EXISTS myDB.myTable (id int PRIMARY KEY)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100500)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" diff --git a/e2e-tests/tests/operator-self-healing/04-assert.yaml b/e2e-tests/tests/operator-self-healing/04-assert.yaml new file mode 100644 index 000000000..8a8037060 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/04-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-read-from-primary +data: + data: "100500" diff --git a/e2e-tests/tests/operator-self-healing/04-read-from-primary.yaml b/e2e-tests/tests/operator-self-healing/04-read-from-primary.yaml new file mode 100644 index 000000000..274332522 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/04-read-from-primary.yaml @@ -0,0 +1,13 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password") + + kubectl create configmap -n "${NAMESPACE}" 04-read-from-primary --from-literal=data="${data}" diff --git a/e2e-tests/tests/operator-self-healing/05-assert.yaml b/e2e-tests/tests/operator-self-healing/05-assert.yaml new file mode 100644 index 000000000..d9146fe1b --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/05-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +metadata: + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/operator-self-healing/05-kill-pod.yaml b/e2e-tests/tests/operator-self-healing/05-kill-pod.yaml new file mode 100644 index 000000000..7151998d3 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/05-kill-pod.yaml @@ -0,0 +1,19 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + init_pod=$(get_operator_pod) + kill_pods "${OPERATOR_NS:-$NAMESPACE}" "pod" "$init_pod" "" "operator" + sleep 10 # wait a bit for pod to be killed + wait_deployment percona-server-mysql-operator "${OPERATOR_NS:-$NAMESPACE}" + + if [ "$init_pod" == "$(get_operator_pod)" ]; then + echo "operator pod was not killed! something went wrong." + exit 1 + fi diff --git a/e2e-tests/tests/operator-self-healing/06-assert.yaml b/e2e-tests/tests/operator-self-healing/06-assert.yaml new file mode 100644 index 000000000..f5a696df9 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/06-assert.yaml @@ -0,0 +1,60 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-haproxy +status: + observedGeneration: 2 + replicas: 5 + readyReplicas: 5 + currentReplicas: 5 + updatedReplicas: 5 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: operator-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 5 + size: 5 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/operator-self-healing/06-scale-up.yaml b/e2e-tests/tests/operator-self-healing/06-scale-up.yaml new file mode 100644 index 000000000..aaa7cdb70 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/06-scale-up.yaml @@ -0,0 +1,21 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.mysql.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=5' - \ + | yq eval '.spec.proxy.haproxy.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | yq eval '.spec.orchestrator.affinity.antiAffinityTopologyKey="none"' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/operator-self-healing/07-assert.yaml b/e2e-tests/tests/operator-self-healing/07-assert.yaml new file mode 100644 index 000000000..d9146fe1b --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/07-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +metadata: + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/operator-self-healing/07-network-loss.yaml b/e2e-tests/tests/operator-self-healing/07-network-loss.yaml new file mode 100644 index 000000000..44fb0c5b1 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/07-network-loss.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + network_loss "${OPERATOR_NS:-$NAMESPACE}" "$(get_operator_pod)" "operator" + sleep 30 # wait for network loss to happen diff --git a/e2e-tests/tests/operator-self-healing/08-assert.yaml b/e2e-tests/tests/operator-self-healing/08-assert.yaml new file mode 100644 index 000000000..b4e8f08af --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/08-assert.yaml @@ -0,0 +1,60 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-haproxy +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: operator-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/operator-self-healing/08-scale-down.yaml b/e2e-tests/tests/operator-self-healing/08-scale-down.yaml new file mode 100644 index 000000000..3dd3dea43 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/08-scale-down.yaml @@ -0,0 +1,21 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.mysql.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=3' - \ + | yq eval '.spec.proxy.haproxy.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | yq eval '.spec.orchestrator.affinity.antiAffinityTopologyKey="none"' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/operator-self-healing/09-assert.yaml b/e2e-tests/tests/operator-self-healing/09-assert.yaml new file mode 100644 index 000000000..d9146fe1b --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/09-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +metadata: + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/operator-self-healing/09-pod-failure.yaml b/e2e-tests/tests/operator-self-healing/09-pod-failure.yaml new file mode 100644 index 000000000..1abeeb648 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/09-pod-failure.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + failure_pod "${OPERATOR_NS:-$NAMESPACE}" "$(get_operator_pod)" "operator" + sleep 30 # wait for pod failure to happen diff --git a/e2e-tests/tests/operator-self-healing/10-assert.yaml b/e2e-tests/tests/operator-self-healing/10-assert.yaml new file mode 100644 index 000000000..c3121eccc --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/10-assert.yaml @@ -0,0 +1,60 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: operator-self-healing-haproxy +status: + observedGeneration: 4 + replicas: 5 + readyReplicas: 5 + currentReplicas: 5 + updatedReplicas: 5 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: operator-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 5 + size: 5 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/operator-self-healing/10-scale-up.yaml b/e2e-tests/tests/operator-self-healing/10-scale-up.yaml new file mode 100644 index 000000000..aaa7cdb70 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/10-scale-up.yaml @@ -0,0 +1,21 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.mysql.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=5' - \ + | yq eval '.spec.proxy.haproxy.affinity.antiAffinityTopologyKey="none"' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | yq eval '.spec.orchestrator.affinity.antiAffinityTopologyKey="none"' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/operator-self-healing/11-destroy-chaos-mesh.yaml b/e2e-tests/tests/operator-self-healing/11-destroy-chaos-mesh.yaml new file mode 100644 index 000000000..3f0cbc6b8 --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/11-destroy-chaos-mesh.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 120 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_chaos_mesh + timeout: 120 diff --git a/e2e-tests/tests/operator-self-healing/12-drop-finalizer.yaml b/e2e-tests/tests/operator-self-healing/12-drop-finalizer.yaml new file mode 100644 index 000000000..73ab6351b --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/12-drop-finalizer.yaml @@ -0,0 +1,5 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: operator-self-healing + finalizers: [] From 9b59671274a3abcb1795fa2dbf9e535b7a17f9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Mon, 21 Aug 2023 14:40:19 +0300 Subject: [PATCH 004/192] K8SPS-292: Fix CR status if cluster is paused (#430) Co-authored-by: Tomislav Plavcic --- api/v1alpha1/perconaservermysql_types.go | 2 ++ pkg/controller/ps/status.go | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 8a543d88d..861ae026e 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -353,6 +353,8 @@ type StatefulAppState string const ( StateInitializing StatefulAppState = "initializing" + StateStopping StatefulAppState = "stopping" + StatePaused StatefulAppState = "paused" StateReady StatefulAppState = "ready" StateError StatefulAppState = "error" ) diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index 624419500..b17af8c30 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -286,11 +286,6 @@ func (r *PerconaServerMySQLReconciler) appStatus(ctx context.Context, cr *apiv1a if err != nil && !k8serrors.IsNotFound(err) { return status, err } - if sfsObj.Status.Replicas > sfsObj.Status.UpdatedReplicas { - return status, nil - } - - sfsObj.Size() pods, err := k8s.PodsByLabels(ctx, r.Client, labels) if err != nil { @@ -303,7 +298,14 @@ func (r *PerconaServerMySQLReconciler) appStatus(ctx context.Context, cr *apiv1a } } - if status.Ready == status.Size { + switch { + case cr.Spec.Pause && status.Ready > 0: + status.State = apiv1alpha1.StateStopping + case cr.Spec.Pause && status.Ready == 0: + status.State = apiv1alpha1.StatePaused + case sfsObj.Status.Replicas > sfsObj.Status.UpdatedReplicas: + status.State = apiv1alpha1.StateInitializing + case status.Ready == status.Size: status.State = apiv1alpha1.StateReady } From e8771781ab67f1897b2ab3c7ecc217025793fe08 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Wed, 23 Aug 2023 15:03:19 +0300 Subject: [PATCH 005/192] K8SPS-300 change default value for service annotation (#433) --- deploy/cr.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 9dad8d39c..1f781f8b3 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -76,7 +76,7 @@ spec: # enabled: false # type: ClusterIP # annotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http +# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: @@ -211,7 +211,7 @@ spec: # expose: # type: ClusterIP # annotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http +# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: @@ -255,7 +255,7 @@ spec: # expose: # type: ClusterIP # annotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http +# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: @@ -290,7 +290,7 @@ spec: # expose: # type: ClusterIP # annotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http +# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: From b30ff9c302eaa71ddd71aaa7576f852af9b67bfd Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Wed, 23 Aug 2023 15:26:33 +0200 Subject: [PATCH 006/192] K8SPS-292 - Add gr-recreate and recreate tests (#434) * K8SPS-292 - rename gr-bootstrap test to gr-recreate * Add pause check to gr-recreate test * Fix gr-recreate test * Add recreate test, increase number of PR test clusters to 7 --- Jenkinsfile | 30 +++ e2e-tests/run-distro.csv | 2 + e2e-tests/run-minikube.csv | 2 + e2e-tests/run-pr.csv | 3 +- e2e-tests/run-release.csv | 2 + e2e-tests/tests/gr-bootstrap/02-assert.yaml | 10 - e2e-tests/tests/gr-bootstrap/03-assert.yaml | 18 -- .../tests/gr-bootstrap/03-kill-primary.yaml | 14 -- e2e-tests/tests/gr-bootstrap/04-assert.yaml | 10 - .../tests/gr-bootstrap/04-read-data.yaml | 13 -- e2e-tests/tests/gr-bootstrap/05-assert.yaml | 18 -- e2e-tests/tests/gr-bootstrap/06-assert.yaml | 10 - .../tests/gr-bootstrap/06-read-data.yaml | 13 -- e2e-tests/tests/gr-bootstrap/07-assert.yaml | 18 -- e2e-tests/tests/gr-bootstrap/08-assert.yaml | 10 - .../tests/gr-bootstrap/08-read-data.yaml | 13 -- .../00-assert.yaml | 0 .../00-deploy-operator.yaml | 0 .../01-assert.yaml | 22 +-- .../tests/gr-recreate/01-create-cluster.yaml | 17 ++ e2e-tests/tests/gr-recreate/02-assert.yaml | 27 +++ .../02-write-data.yaml | 8 +- e2e-tests/tests/gr-recreate/03-assert.yaml | 175 ++++++++++++++++ .../03-pause.yaml} | 5 +- e2e-tests/tests/gr-recreate/04-assert.yaml | 145 ++++++++++++++ e2e-tests/tests/gr-recreate/04-unpause.yaml | 18 ++ e2e-tests/tests/gr-recreate/05-assert.yaml | 30 +++ .../tests/gr-recreate/05-write-data.yaml | 18 ++ .../tests/gr-recreate/07-delete-cluster.yaml | 12 ++ e2e-tests/tests/gr-recreate/07-errors.yaml | 24 +++ e2e-tests/tests/gr-recreate/08-assert.yaml | 42 ++++ e2e-tests/tests/gr-recreate/09-assert.yaml | 145 ++++++++++++++ .../09-recreate-cluster.yaml} | 4 +- e2e-tests/tests/gr-recreate/10-assert.yaml | 33 ++++ .../tests/gr-recreate/10-write-data.yaml | 18 ++ .../11-drop-finalizer.yaml} | 2 +- e2e-tests/tests/recreate/00-assert.yaml | 29 +++ .../00-deploy-operator.yaml} | 8 +- e2e-tests/tests/recreate/01-assert.yaml | 186 ++++++++++++++++++ .../tests/recreate/01-create-cluster.yaml | 18 ++ e2e-tests/tests/recreate/02-assert.yaml | 27 +++ e2e-tests/tests/recreate/02-write-data.yaml | 22 +++ e2e-tests/tests/recreate/03-assert.yaml | 168 ++++++++++++++++ e2e-tests/tests/recreate/03-pause.yaml | 19 ++ e2e-tests/tests/recreate/04-assert.yaml | 186 ++++++++++++++++++ e2e-tests/tests/recreate/04-unpause.yaml | 19 ++ e2e-tests/tests/recreate/05-assert.yaml | 30 +++ e2e-tests/tests/recreate/05-write-data.yaml | 18 ++ .../tests/recreate/07-delete-cluster.yaml | 12 ++ e2e-tests/tests/recreate/07-errors.yaml | 34 ++++ e2e-tests/tests/recreate/08-assert.yaml | 42 ++++ e2e-tests/tests/recreate/09-assert.yaml | 186 ++++++++++++++++++ .../tests/recreate/09-recreate-cluster.yaml | 19 ++ e2e-tests/tests/recreate/10-assert.yaml | 33 ++++ e2e-tests/tests/recreate/10-write-data.yaml | 18 ++ .../tests/recreate/11-drop-finalizer.yaml | 5 + 56 files changed, 1840 insertions(+), 170 deletions(-) delete mode 100644 e2e-tests/tests/gr-bootstrap/02-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/03-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/03-kill-primary.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/04-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/04-read-data.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/05-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/06-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/06-read-data.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/07-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/08-assert.yaml delete mode 100644 e2e-tests/tests/gr-bootstrap/08-read-data.yaml rename e2e-tests/tests/{gr-bootstrap => gr-recreate}/00-assert.yaml (100%) rename e2e-tests/tests/{gr-bootstrap => gr-recreate}/00-deploy-operator.yaml (100%) rename e2e-tests/tests/{gr-bootstrap => gr-recreate}/01-assert.yaml (88%) create mode 100644 e2e-tests/tests/gr-recreate/01-create-cluster.yaml create mode 100644 e2e-tests/tests/gr-recreate/02-assert.yaml rename e2e-tests/tests/{gr-bootstrap => gr-recreate}/02-write-data.yaml (64%) create mode 100644 e2e-tests/tests/gr-recreate/03-assert.yaml rename e2e-tests/tests/{gr-bootstrap/01-create-cluster.yaml => gr-recreate/03-pause.yaml} (71%) create mode 100644 e2e-tests/tests/gr-recreate/04-assert.yaml create mode 100644 e2e-tests/tests/gr-recreate/04-unpause.yaml create mode 100644 e2e-tests/tests/gr-recreate/05-assert.yaml create mode 100644 e2e-tests/tests/gr-recreate/05-write-data.yaml create mode 100644 e2e-tests/tests/gr-recreate/07-delete-cluster.yaml create mode 100644 e2e-tests/tests/gr-recreate/07-errors.yaml create mode 100644 e2e-tests/tests/gr-recreate/08-assert.yaml create mode 100644 e2e-tests/tests/gr-recreate/09-assert.yaml rename e2e-tests/tests/{gr-bootstrap/07-delete-and-recreate.yaml => gr-recreate/09-recreate-cluster.yaml} (81%) create mode 100644 e2e-tests/tests/gr-recreate/10-assert.yaml create mode 100644 e2e-tests/tests/gr-recreate/10-write-data.yaml rename e2e-tests/tests/{gr-bootstrap/09-drop-finalizer.yaml => gr-recreate/11-drop-finalizer.yaml} (80%) create mode 100644 e2e-tests/tests/recreate/00-assert.yaml rename e2e-tests/tests/{gr-bootstrap/05-kill-all-pods.yaml => recreate/00-deploy-operator.yaml} (50%) create mode 100644 e2e-tests/tests/recreate/01-assert.yaml create mode 100644 e2e-tests/tests/recreate/01-create-cluster.yaml create mode 100644 e2e-tests/tests/recreate/02-assert.yaml create mode 100644 e2e-tests/tests/recreate/02-write-data.yaml create mode 100644 e2e-tests/tests/recreate/03-assert.yaml create mode 100644 e2e-tests/tests/recreate/03-pause.yaml create mode 100644 e2e-tests/tests/recreate/04-assert.yaml create mode 100644 e2e-tests/tests/recreate/04-unpause.yaml create mode 100644 e2e-tests/tests/recreate/05-assert.yaml create mode 100644 e2e-tests/tests/recreate/05-write-data.yaml create mode 100644 e2e-tests/tests/recreate/07-delete-cluster.yaml create mode 100644 e2e-tests/tests/recreate/07-errors.yaml create mode 100644 e2e-tests/tests/recreate/08-assert.yaml create mode 100644 e2e-tests/tests/recreate/09-assert.yaml create mode 100644 e2e-tests/tests/recreate/09-recreate-cluster.yaml create mode 100644 e2e-tests/tests/recreate/10-assert.yaml create mode 100644 e2e-tests/tests/recreate/10-write-data.yaml create mode 100644 e2e-tests/tests/recreate/11-drop-finalizer.yaml diff --git a/Jenkinsfile b/Jenkinsfile index a2e68a6cb..a78db1202 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -500,6 +500,36 @@ pipeline { clusterRunner('cluster5') } } + stage('cluster6') { + when { + expression { + !skipBranchBuilds + } + } + agent { + label 'docker' + } + steps { + prepareNode() + unstash "sourceFILES" + clusterRunner('cluster6') + } + } + stage('cluster7') { + when { + expression { + !skipBranchBuilds + } + } + agent { + label 'docker' + } + steps { + prepareNode() + unstash "sourceFILES" + clusterRunner('cluster7') + } + } } } } diff --git a/e2e-tests/run-distro.csv b/e2e-tests/run-distro.csv index 18ce672e6..9406d08a7 100644 --- a/e2e-tests/run-distro.csv +++ b/e2e-tests/run-distro.csv @@ -6,6 +6,7 @@ gr-demand-backup gr-haproxy gr-init-deploy gr-one-pod +gr-recreate gr-scaling gr-self-healing gr-tls-cert-manager @@ -15,6 +16,7 @@ init-deploy monitoring one-pod operator-self-healing +recreate scaling service-per-pod sidecars diff --git a/e2e-tests/run-minikube.csv b/e2e-tests/run-minikube.csv index 7233abbc2..cd76bfa8e 100644 --- a/e2e-tests/run-minikube.csv +++ b/e2e-tests/run-minikube.csv @@ -6,6 +6,7 @@ gr-demand-backup gr-haproxy gr-init-deploy gr-one-pod +gr-recreate gr-scaling gr-self-healing gr-tls-cert-manager @@ -14,6 +15,7 @@ haproxy init-deploy one-pod operator-self-healing +recreate sidecars smart-update tls-cert-manager diff --git a/e2e-tests/run-pr.csv b/e2e-tests/run-pr.csv index ae8ef43a2..310d0d90a 100644 --- a/e2e-tests/run-pr.csv +++ b/e2e-tests/run-pr.csv @@ -3,12 +3,12 @@ auto-config config config-router demand-backup -gr-bootstrap gr-demand-backup gr-haproxy gr-ignore-annotations gr-init-deploy gr-one-pod +gr-recreate gr-scaling gr-self-healing gr-tls-cert-manager @@ -19,6 +19,7 @@ limits monitoring one-pod operator-self-healing +recreate scaling service-per-pod sidecars diff --git a/e2e-tests/run-release.csv b/e2e-tests/run-release.csv index 5d8cb6f7c..310d0d90a 100644 --- a/e2e-tests/run-release.csv +++ b/e2e-tests/run-release.csv @@ -8,6 +8,7 @@ gr-haproxy gr-ignore-annotations gr-init-deploy gr-one-pod +gr-recreate gr-scaling gr-self-healing gr-tls-cert-manager @@ -18,6 +19,7 @@ limits monitoring one-pod operator-self-healing +recreate scaling service-per-pod sidecars diff --git a/e2e-tests/tests/gr-bootstrap/02-assert.yaml b/e2e-tests/tests/gr-bootstrap/02-assert.yaml deleted file mode 100644 index 9859f8ad4..000000000 --- a/e2e-tests/tests/gr-bootstrap/02-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 02-write-data -data: - data: "100500" diff --git a/e2e-tests/tests/gr-bootstrap/03-assert.yaml b/e2e-tests/tests/gr-bootstrap/03-assert.yaml deleted file mode 100644 index f90ea552a..000000000 --- a/e2e-tests/tests/gr-bootstrap/03-assert.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 300 ---- -apiVersion: ps.percona.com/v1alpha1 -kind: PerconaServerMySQL -metadata: - name: gr-bootstrap -status: - mysql: - ready: 3 - size: 3 - state: ready - router: - ready: 3 - size: 3 - state: ready - state: ready \ No newline at end of file diff --git a/e2e-tests/tests/gr-bootstrap/03-kill-primary.yaml b/e2e-tests/tests/gr-bootstrap/03-kill-primary.yaml deleted file mode 100644 index c77e4d451..000000000 --- a/e2e-tests/tests/gr-bootstrap/03-kill-primary.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -timeout: 30 -commands: - - script: |- - set -o errexit - set -o xtrace - - source ../../functions - - kubectl delete pod -n ${NAMESPACE} gr-bootstrap-mysql-0 --force --grace-period=0 - - # give time for cluster state to change - sleep 10 \ No newline at end of file diff --git a/e2e-tests/tests/gr-bootstrap/04-assert.yaml b/e2e-tests/tests/gr-bootstrap/04-assert.yaml deleted file mode 100644 index 196566d20..000000000 --- a/e2e-tests/tests/gr-bootstrap/04-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 04-read-data -data: - data: "100500" diff --git a/e2e-tests/tests/gr-bootstrap/04-read-data.yaml b/e2e-tests/tests/gr-bootstrap/04-read-data.yaml deleted file mode 100644 index 1048fb0e7..000000000 --- a/e2e-tests/tests/gr-bootstrap/04-read-data.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -timeout: 30 -commands: - - script: |- - set -o errexit - set -o xtrace - - source ../../functions - - data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password") - - kubectl create configmap -n "${NAMESPACE}" 04-read-data --from-literal=data="${data}" diff --git a/e2e-tests/tests/gr-bootstrap/05-assert.yaml b/e2e-tests/tests/gr-bootstrap/05-assert.yaml deleted file mode 100644 index da32112c0..000000000 --- a/e2e-tests/tests/gr-bootstrap/05-assert.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 420 ---- -apiVersion: ps.percona.com/v1alpha1 -kind: PerconaServerMySQL -metadata: - name: gr-bootstrap -status: - mysql: - ready: 3 - size: 3 - state: ready - router: - ready: 3 - size: 3 - state: ready - state: ready \ No newline at end of file diff --git a/e2e-tests/tests/gr-bootstrap/06-assert.yaml b/e2e-tests/tests/gr-bootstrap/06-assert.yaml deleted file mode 100644 index 2c1528cea..000000000 --- a/e2e-tests/tests/gr-bootstrap/06-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 06-read-data -data: - data: "100500" \ No newline at end of file diff --git a/e2e-tests/tests/gr-bootstrap/06-read-data.yaml b/e2e-tests/tests/gr-bootstrap/06-read-data.yaml deleted file mode 100644 index 692a2c745..000000000 --- a/e2e-tests/tests/gr-bootstrap/06-read-data.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -timeout: 30 -commands: - - script: |- - set -o errexit - set -o xtrace - - source ../../functions - - data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password") - - kubectl create configmap -n "${NAMESPACE}" 06-read-data --from-literal=data="${data}" diff --git a/e2e-tests/tests/gr-bootstrap/07-assert.yaml b/e2e-tests/tests/gr-bootstrap/07-assert.yaml deleted file mode 100644 index da32112c0..000000000 --- a/e2e-tests/tests/gr-bootstrap/07-assert.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 420 ---- -apiVersion: ps.percona.com/v1alpha1 -kind: PerconaServerMySQL -metadata: - name: gr-bootstrap -status: - mysql: - ready: 3 - size: 3 - state: ready - router: - ready: 3 - size: 3 - state: ready - state: ready \ No newline at end of file diff --git a/e2e-tests/tests/gr-bootstrap/08-assert.yaml b/e2e-tests/tests/gr-bootstrap/08-assert.yaml deleted file mode 100644 index cdaebcea4..000000000 --- a/e2e-tests/tests/gr-bootstrap/08-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 08-read-data -data: - data: "100500" \ No newline at end of file diff --git a/e2e-tests/tests/gr-bootstrap/08-read-data.yaml b/e2e-tests/tests/gr-bootstrap/08-read-data.yaml deleted file mode 100644 index 496e3cae6..000000000 --- a/e2e-tests/tests/gr-bootstrap/08-read-data.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -timeout: 30 -commands: - - script: |- - set -o errexit - set -o xtrace - - source ../../functions - - data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password") - - kubectl create configmap -n "${NAMESPACE}" 08-read-data --from-literal=data="${data}" diff --git a/e2e-tests/tests/gr-bootstrap/00-assert.yaml b/e2e-tests/tests/gr-recreate/00-assert.yaml similarity index 100% rename from e2e-tests/tests/gr-bootstrap/00-assert.yaml rename to e2e-tests/tests/gr-recreate/00-assert.yaml diff --git a/e2e-tests/tests/gr-bootstrap/00-deploy-operator.yaml b/e2e-tests/tests/gr-recreate/00-deploy-operator.yaml similarity index 100% rename from e2e-tests/tests/gr-bootstrap/00-deploy-operator.yaml rename to e2e-tests/tests/gr-recreate/00-deploy-operator.yaml diff --git a/e2e-tests/tests/gr-bootstrap/01-assert.yaml b/e2e-tests/tests/gr-recreate/01-assert.yaml similarity index 88% rename from e2e-tests/tests/gr-bootstrap/01-assert.yaml rename to e2e-tests/tests/gr-recreate/01-assert.yaml index 37e869389..ccdaa8c93 100644 --- a/e2e-tests/tests/gr-bootstrap/01-assert.yaml +++ b/e2e-tests/tests/gr-recreate/01-assert.yaml @@ -5,7 +5,7 @@ timeout: 420 kind: StatefulSet apiVersion: apps/v1 metadata: - name: gr-bootstrap-mysql + name: gr-recreate-mysql status: observedGeneration: 1 replicas: 3 @@ -17,7 +17,7 @@ status: kind: Deployment apiVersion: apps/v1 metadata: - name: gr-bootstrap-router + name: gr-recreate-router status: observedGeneration: 1 replicas: 3 @@ -27,7 +27,7 @@ status: apiVersion: ps.percona.com/v1alpha1 kind: PerconaServerMySQL metadata: - name: gr-bootstrap + name: gr-recreate finalizers: - delete-mysql-pods-in-order status: @@ -46,17 +46,17 @@ kind: Service metadata: labels: app.kubernetes.io/component: mysql - app.kubernetes.io/instance: gr-bootstrap + app.kubernetes.io/instance: gr-recreate app.kubernetes.io/managed-by: percona-server-operator app.kubernetes.io/name: percona-server app.kubernetes.io/part-of: percona-server - name: gr-bootstrap-mysql + name: gr-recreate-mysql ownerReferences: - apiVersion: ps.percona.com/v1alpha1 blockOwnerDeletion: true controller: true kind: PerconaServerMySQL - name: gr-bootstrap + name: gr-recreate spec: clusterIP: None ports: @@ -82,7 +82,7 @@ spec: targetPort: 33061 selector: app.kubernetes.io/component: mysql - app.kubernetes.io/instance: gr-bootstrap + app.kubernetes.io/instance: gr-recreate app.kubernetes.io/managed-by: percona-server-operator app.kubernetes.io/name: percona-server app.kubernetes.io/part-of: percona-server @@ -94,17 +94,17 @@ kind: Service metadata: labels: app.kubernetes.io/component: router - app.kubernetes.io/instance: gr-bootstrap + app.kubernetes.io/instance: gr-recreate app.kubernetes.io/managed-by: percona-server-operator app.kubernetes.io/name: percona-server app.kubernetes.io/part-of: percona-server - name: gr-bootstrap-router + name: gr-recreate-router ownerReferences: - apiVersion: ps.percona.com/v1alpha1 blockOwnerDeletion: true controller: true kind: PerconaServerMySQL - name: gr-bootstrap + name: gr-recreate spec: ports: - name: http @@ -137,7 +137,7 @@ spec: targetPort: 33062 selector: app.kubernetes.io/component: router - app.kubernetes.io/instance: gr-bootstrap + app.kubernetes.io/instance: gr-recreate app.kubernetes.io/managed-by: percona-server-operator app.kubernetes.io/name: percona-server app.kubernetes.io/part-of: percona-server diff --git a/e2e-tests/tests/gr-recreate/01-create-cluster.yaml b/e2e-tests/tests/gr-recreate/01-create-cluster.yaml new file mode 100644 index 000000000..01393b781 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/01-create-cluster.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.proxy.router.enabled=true' - \ + | yq eval '.spec.proxy.router.size=3' - \ + | yq eval '.spec.proxy.haproxy.enabled=false' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-recreate/02-assert.yaml b/e2e-tests/tests/gr-recreate/02-assert.yaml new file mode 100644 index 000000000..a0f47e109 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/02-assert.yaml @@ -0,0 +1,27 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 02-write-data-0 +data: + data: |- + 100500 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 02-write-data-1 +data: + data: |- + 100500 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 02-write-data-2 +data: + data: |- + 100500 diff --git a/e2e-tests/tests/gr-bootstrap/02-write-data.yaml b/e2e-tests/tests/gr-recreate/02-write-data.yaml similarity index 64% rename from e2e-tests/tests/gr-bootstrap/02-write-data.yaml rename to e2e-tests/tests/gr-recreate/02-write-data.yaml index d74701a67..93dbb8aa7 100644 --- a/e2e-tests/tests/gr-bootstrap/02-write-data.yaml +++ b/e2e-tests/tests/gr-recreate/02-write-data.yaml @@ -15,6 +15,8 @@ commands: "INSERT myDB.myTable (id) VALUES (100500)" \ "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" - data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password") - - kubectl create configmap -n "${NAMESPACE}" 02-write-data --from-literal=data="${data}" \ No newline at end of file + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 02-write-data-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-recreate/03-assert.yaml b/e2e-tests/tests/gr-recreate/03-assert.yaml new file mode 100644 index 000000000..d7f76e017 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/03-assert.yaml @@ -0,0 +1,175 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-recreate + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + state: paused + router: + state: paused + state: paused +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-gr-recreate-mysql-0 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-gr-recreate-mysql-1 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-gr-recreate-mysql-2 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-recreate-mysql +status: + availableReplicas: 0 + collisionCount: 0 + observedGeneration: 2 + replicas: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-recreate-router +status: + observedGeneration: 2 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-recreate-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-recreate +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-recreate-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-recreate +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/gr-bootstrap/01-create-cluster.yaml b/e2e-tests/tests/gr-recreate/03-pause.yaml similarity index 71% rename from e2e-tests/tests/gr-bootstrap/01-create-cluster.yaml rename to e2e-tests/tests/gr-recreate/03-pause.yaml index 4636d46f2..ef7ab7c50 100644 --- a/e2e-tests/tests/gr-bootstrap/01-create-cluster.yaml +++ b/e2e-tests/tests/gr-recreate/03-pause.yaml @@ -1,6 +1,5 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep -timeout: 10 commands: - script: |- set -o errexit @@ -9,7 +8,11 @@ commands: source ../../functions get_cr \ + | yq eval '.spec.pause=true' - \ | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.mysql.size=3' - \ | yq eval '.spec.proxy.router.enabled=true' - \ + | yq eval '.spec.proxy.router.size=3' - \ | yq eval '.spec.proxy.haproxy.enabled=false' - \ | kubectl -n "${NAMESPACE}" apply -f - + timeout: 120 diff --git a/e2e-tests/tests/gr-recreate/04-assert.yaml b/e2e-tests/tests/gr-recreate/04-assert.yaml new file mode 100644 index 000000000..1ea611d15 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/04-assert.yaml @@ -0,0 +1,145 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 480 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-recreate-mysql +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-recreate-router +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-recreate + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-recreate-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-recreate +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-recreate-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-recreate +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/gr-recreate/04-unpause.yaml b/e2e-tests/tests/gr-recreate/04-unpause.yaml new file mode 100644 index 000000000..a31679b33 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/04-unpause.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.pause=false' - \ + | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.proxy.router.enabled=true' - \ + | yq eval '.spec.proxy.router.size=3' - \ + | yq eval '.spec.proxy.haproxy.enabled=false' - \ + | kubectl -n "${NAMESPACE}" apply -f - + timeout: 120 diff --git a/e2e-tests/tests/gr-recreate/05-assert.yaml b/e2e-tests/tests/gr-recreate/05-assert.yaml new file mode 100644 index 000000000..0ddeb1c33 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/05-assert.yaml @@ -0,0 +1,30 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-write-data-0 +data: + data: |- + 100500 + 100501 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-write-data-1 +data: + data: |- + 100500 + 100501 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-write-data-2 +data: + data: |- + 100500 + 100501 diff --git a/e2e-tests/tests/gr-recreate/05-write-data.yaml b/e2e-tests/tests/gr-recreate/05-write-data.yaml new file mode 100644 index 000000000..7d3fcc717 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/05-write-data.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100501)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 06-write-data-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-recreate/07-delete-cluster.yaml b/e2e-tests/tests/gr-recreate/07-delete-cluster.yaml new file mode 100644 index 000000000..d79389828 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/07-delete-cluster.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + kubectl delete ps -n ${NAMESPACE} gr-recreate + + timeout: 120 diff --git a/e2e-tests/tests/gr-recreate/07-errors.yaml b/e2e-tests/tests/gr-recreate/07-errors.yaml new file mode 100644 index 000000000..bcff4c1d4 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/07-errors.yaml @@ -0,0 +1,24 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-recreate +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-recreate-mysql +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-recreate-router +--- +apiVersion: v1 +kind: Service +metadata: + name: gr-recreate-mysql +--- +apiVersion: v1 +kind: Service +metadata: + name: gr-recreate-router diff --git a/e2e-tests/tests/gr-recreate/08-assert.yaml b/e2e-tests/tests/gr-recreate/08-assert.yaml new file mode 100644 index 000000000..d867cb58b --- /dev/null +++ b/e2e-tests/tests/gr-recreate/08-assert.yaml @@ -0,0 +1,42 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-gr-recreate-mysql-0 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-gr-recreate-mysql-1 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-gr-recreate-mysql-2 diff --git a/e2e-tests/tests/gr-recreate/09-assert.yaml b/e2e-tests/tests/gr-recreate/09-assert.yaml new file mode 100644 index 000000000..e76c4c22b --- /dev/null +++ b/e2e-tests/tests/gr-recreate/09-assert.yaml @@ -0,0 +1,145 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 480 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-recreate-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-recreate-router +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-recreate + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-recreate-mysql + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-recreate +spec: + clusterIP: None + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + - name: mysql-gr + port: 33061 + protocol: TCP + targetPort: 33061 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: gr-recreate-router + ownerReferences: + - apiVersion: ps.percona.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: PerconaServerMySQL + name: gr-recreate +spec: + ports: + - name: http + port: 8443 + protocol: TCP + targetPort: 8443 + - name: rw-default + port: 3306 + protocol: TCP + targetPort: 6446 + - name: read-write + port: 6446 + protocol: TCP + targetPort: 6446 + - name: read-only + port: 6447 + protocol: TCP + targetPort: 6447 + - name: x-read-write + port: 6448 + protocol: TCP + targetPort: 6448 + - name: x-read-only + port: 6449 + protocol: TCP + targetPort: 6449 + - name: rw-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/gr-bootstrap/07-delete-and-recreate.yaml b/e2e-tests/tests/gr-recreate/09-recreate-cluster.yaml similarity index 81% rename from e2e-tests/tests/gr-bootstrap/07-delete-and-recreate.yaml rename to e2e-tests/tests/gr-recreate/09-recreate-cluster.yaml index 1b610e7df..a372972e9 100644 --- a/e2e-tests/tests/gr-bootstrap/07-delete-and-recreate.yaml +++ b/e2e-tests/tests/gr-recreate/09-recreate-cluster.yaml @@ -7,11 +7,11 @@ commands: source ../../functions - kubectl delete ps -n ${NAMESPACE} gr-bootstrap - get_cr \ | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.mysql.size=3' - \ | yq eval '.spec.proxy.router.enabled=true' - \ + | yq eval '.spec.proxy.router.size=3' - \ | yq eval '.spec.proxy.haproxy.enabled=false' - \ | kubectl -n "${NAMESPACE}" apply -f - timeout: 120 diff --git a/e2e-tests/tests/gr-recreate/10-assert.yaml b/e2e-tests/tests/gr-recreate/10-assert.yaml new file mode 100644 index 000000000..5d31cbb83 --- /dev/null +++ b/e2e-tests/tests/gr-recreate/10-assert.yaml @@ -0,0 +1,33 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-write-data-0 +data: + data: |- + 100500 + 100501 + 100502 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-write-data-1 +data: + data: |- + 100500 + 100501 + 100502 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-write-data-2 +data: + data: |- + 100500 + 100501 + 100502 diff --git a/e2e-tests/tests/gr-recreate/10-write-data.yaml b/e2e-tests/tests/gr-recreate/10-write-data.yaml new file mode 100644 index 000000000..eae3cbdcb --- /dev/null +++ b/e2e-tests/tests/gr-recreate/10-write-data.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100502)" \ + "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 11-write-data-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-bootstrap/09-drop-finalizer.yaml b/e2e-tests/tests/gr-recreate/11-drop-finalizer.yaml similarity index 80% rename from e2e-tests/tests/gr-bootstrap/09-drop-finalizer.yaml rename to e2e-tests/tests/gr-recreate/11-drop-finalizer.yaml index 1980eb23c..3ba8ca924 100644 --- a/e2e-tests/tests/gr-bootstrap/09-drop-finalizer.yaml +++ b/e2e-tests/tests/gr-recreate/11-drop-finalizer.yaml @@ -1,5 +1,5 @@ apiVersion: ps.percona.com/v1alpha1 kind: PerconaServerMySQL metadata: - name: gr-bootstrap + name: gr-recreate finalizers: [] diff --git a/e2e-tests/tests/recreate/00-assert.yaml b/e2e-tests/tests/recreate/00-assert.yaml new file mode 100644 index 000000000..1f9a51683 --- /dev/null +++ b/e2e-tests/tests/recreate/00-assert.yaml @@ -0,0 +1,29 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +status: + availableReplicas: 1 + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updatedReplicas: 1 diff --git a/e2e-tests/tests/gr-bootstrap/05-kill-all-pods.yaml b/e2e-tests/tests/recreate/00-deploy-operator.yaml similarity index 50% rename from e2e-tests/tests/gr-bootstrap/05-kill-all-pods.yaml rename to e2e-tests/tests/recreate/00-deploy-operator.yaml index 839d44f8c..67307fe5d 100644 --- a/e2e-tests/tests/gr-bootstrap/05-kill-all-pods.yaml +++ b/e2e-tests/tests/recreate/00-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions - kubectl delete statefulset -n ${NAMESPACE} gr-bootstrap-mysql --force --grace-period=0 - - # give time for cluster state to change - sleep 10 \ No newline at end of file + deploy_operator + deploy_non_tls_cluster_secrets + deploy_tls_cluster_secrets + deploy_client diff --git a/e2e-tests/tests/recreate/01-assert.yaml b/e2e-tests/tests/recreate/01-assert.yaml new file mode 100644 index 000000000..aaee4e863 --- /dev/null +++ b/e2e-tests/tests/recreate/01-assert.yaml @@ -0,0 +1,186 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-haproxy +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: recreate + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-mysql +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-haproxy +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-replicas + port: 3307 + protocol: TCP + targetPort: 3307 + - name: proxy-protocol + port: 3309 + protocol: TCP + targetPort: 3309 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-orc +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: web + port: 3000 + protocol: TCP + targetPort: 3000 + - name: raft + port: 10008 + protocol: TCP + targetPort: 10008 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/recreate/01-create-cluster.yaml b/e2e-tests/tests/recreate/01-create-cluster.yaml new file mode 100644 index 000000000..44a61e442 --- /dev/null +++ b/e2e-tests/tests/recreate/01-create-cluster.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=3' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/recreate/02-assert.yaml b/e2e-tests/tests/recreate/02-assert.yaml new file mode 100644 index 000000000..a0f47e109 --- /dev/null +++ b/e2e-tests/tests/recreate/02-assert.yaml @@ -0,0 +1,27 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 02-write-data-0 +data: + data: |- + 100500 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 02-write-data-1 +data: + data: |- + 100500 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 02-write-data-2 +data: + data: |- + 100500 diff --git a/e2e-tests/tests/recreate/02-write-data.yaml b/e2e-tests/tests/recreate/02-write-data.yaml new file mode 100644 index 000000000..cffb9e3d7 --- /dev/null +++ b/e2e-tests/tests/recreate/02-write-data.yaml @@ -0,0 +1,22 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "CREATE DATABASE IF NOT EXISTS myDB; CREATE TABLE IF NOT EXISTS myDB.myTable (id int PRIMARY KEY)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100500)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 02-write-data-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/recreate/03-assert.yaml b/e2e-tests/tests/recreate/03-assert.yaml new file mode 100644 index 000000000..8dd1c9732 --- /dev/null +++ b/e2e-tests/tests/recreate/03-assert.yaml @@ -0,0 +1,168 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: recreate + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + state: paused + mysql: + state: paused + orchestrator: + state: paused + state: paused +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-mysql +status: + availableReplicas: 0 + collisionCount: 0 + observedGeneration: 2 + replicas: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-haproxy +status: + availableReplicas: 0 + collisionCount: 0 + observedGeneration: 2 + replicas: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-orc +status: + availableReplicas: 0 + collisionCount: 0 + observedGeneration: 2 + replicas: 0 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-recreate-mysql-0 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-recreate-mysql-1 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-recreate-mysql-2 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-mysql +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-orc +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: web + port: 3000 + protocol: TCP + targetPort: 3000 + - name: raft + port: 10008 + protocol: TCP + targetPort: 10008 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/recreate/03-pause.yaml b/e2e-tests/tests/recreate/03-pause.yaml new file mode 100644 index 000000000..b57b89630 --- /dev/null +++ b/e2e-tests/tests/recreate/03-pause.yaml @@ -0,0 +1,19 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.pause=true' - \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=3' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | kubectl -n "${NAMESPACE}" apply -f - + timeout: 120 diff --git a/e2e-tests/tests/recreate/04-assert.yaml b/e2e-tests/tests/recreate/04-assert.yaml new file mode 100644 index 000000000..0eb6c8028 --- /dev/null +++ b/e2e-tests/tests/recreate/04-assert.yaml @@ -0,0 +1,186 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 480 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-mysql +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-orc +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-haproxy +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: recreate + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-mysql +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-haproxy +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-replicas + port: 3307 + protocol: TCP + targetPort: 3307 + - name: proxy-protocol + port: 3309 + protocol: TCP + targetPort: 3309 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-orc +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: web + port: 3000 + protocol: TCP + targetPort: 3000 + - name: raft + port: 10008 + protocol: TCP + targetPort: 10008 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/recreate/04-unpause.yaml b/e2e-tests/tests/recreate/04-unpause.yaml new file mode 100644 index 000000000..904f2b2ba --- /dev/null +++ b/e2e-tests/tests/recreate/04-unpause.yaml @@ -0,0 +1,19 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.pause=false' - \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=3' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | kubectl -n "${NAMESPACE}" apply -f - + timeout: 120 diff --git a/e2e-tests/tests/recreate/05-assert.yaml b/e2e-tests/tests/recreate/05-assert.yaml new file mode 100644 index 000000000..0ddeb1c33 --- /dev/null +++ b/e2e-tests/tests/recreate/05-assert.yaml @@ -0,0 +1,30 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-write-data-0 +data: + data: |- + 100500 + 100501 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-write-data-1 +data: + data: |- + 100500 + 100501 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-write-data-2 +data: + data: |- + 100500 + 100501 diff --git a/e2e-tests/tests/recreate/05-write-data.yaml b/e2e-tests/tests/recreate/05-write-data.yaml new file mode 100644 index 000000000..0b9d85ebb --- /dev/null +++ b/e2e-tests/tests/recreate/05-write-data.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100501)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 06-write-data-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/recreate/07-delete-cluster.yaml b/e2e-tests/tests/recreate/07-delete-cluster.yaml new file mode 100644 index 000000000..7ddaf223f --- /dev/null +++ b/e2e-tests/tests/recreate/07-delete-cluster.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + kubectl delete ps -n ${NAMESPACE} recreate + + timeout: 120 diff --git a/e2e-tests/tests/recreate/07-errors.yaml b/e2e-tests/tests/recreate/07-errors.yaml new file mode 100644 index 000000000..6eb981524 --- /dev/null +++ b/e2e-tests/tests/recreate/07-errors.yaml @@ -0,0 +1,34 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: recreate +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-mysql +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-orc +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-haproxy +--- +apiVersion: v1 +kind: Service +metadata: + name: recreate-mysql +--- +apiVersion: v1 +kind: Service +metadata: + name: recreate-haproxy +--- +apiVersion: v1 +kind: Service +metadata: + name: recreate-orc diff --git a/e2e-tests/tests/recreate/08-assert.yaml b/e2e-tests/tests/recreate/08-assert.yaml new file mode 100644 index 000000000..f20b4299c --- /dev/null +++ b/e2e-tests/tests/recreate/08-assert.yaml @@ -0,0 +1,42 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-recreate-mysql-0 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-recreate-mysql-1 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + finalizers: + - kubernetes.io/pvc-protection + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: datadir-recreate-mysql-2 diff --git a/e2e-tests/tests/recreate/09-assert.yaml b/e2e-tests/tests/recreate/09-assert.yaml new file mode 100644 index 000000000..4c3ff6477 --- /dev/null +++ b/e2e-tests/tests/recreate/09-assert.yaml @@ -0,0 +1,186 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 480 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: recreate-haproxy +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: recreate + finalizers: + - delete-mysql-pods-in-order +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-mysql +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: http + port: 6033 + protocol: TCP + targetPort: 6033 + selector: + app.kubernetes.io/component: mysql + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-haproxy +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-replicas + port: 3307 + protocol: TCP + targetPort: 3307 + - name: proxy-protocol + port: 3309 + protocol: TCP + targetPort: 3309 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-orc +spec: + clusterIP: None + clusterIPs: + - None + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: web + port: 3000 + protocol: TCP + targetPort: 3000 + - name: raft + port: 10008 + protocol: TCP + targetPort: 10008 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/e2e-tests/tests/recreate/09-recreate-cluster.yaml b/e2e-tests/tests/recreate/09-recreate-cluster.yaml new file mode 100644 index 000000000..904f2b2ba --- /dev/null +++ b/e2e-tests/tests/recreate/09-recreate-cluster.yaml @@ -0,0 +1,19 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.pause=false' - \ + | yq eval '.spec.mysql.clusterType="async"' - \ + | yq eval '.spec.mysql.size=3' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.size=3' - \ + | yq eval '.spec.orchestrator.enabled=true' - \ + | yq eval '.spec.orchestrator.size=3' - \ + | kubectl -n "${NAMESPACE}" apply -f - + timeout: 120 diff --git a/e2e-tests/tests/recreate/10-assert.yaml b/e2e-tests/tests/recreate/10-assert.yaml new file mode 100644 index 000000000..5d31cbb83 --- /dev/null +++ b/e2e-tests/tests/recreate/10-assert.yaml @@ -0,0 +1,33 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-write-data-0 +data: + data: |- + 100500 + 100501 + 100502 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-write-data-1 +data: + data: |- + 100500 + 100501 + 100502 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-write-data-2 +data: + data: |- + 100500 + 100501 + 100502 diff --git a/e2e-tests/tests/recreate/10-write-data.yaml b/e2e-tests/tests/recreate/10-write-data.yaml new file mode 100644 index 000000000..e42bc7182 --- /dev/null +++ b/e2e-tests/tests/recreate/10-write-data.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100502)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + for i in 0 1 2; do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${host} -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 11-write-data-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/recreate/11-drop-finalizer.yaml b/e2e-tests/tests/recreate/11-drop-finalizer.yaml new file mode 100644 index 000000000..878522b5f --- /dev/null +++ b/e2e-tests/tests/recreate/11-drop-finalizer.yaml @@ -0,0 +1,5 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: recreate + finalizers: [] From 17c10497c9c429cac65e5a358436baca7739eff5 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Fri, 25 Aug 2023 19:00:01 +0300 Subject: [PATCH 007/192] K8SPS-305: fix pause for gr cluster with haproxy (#435) * K8SPS-305: fix pause for gr cluster with haproxy https://jira.percona.com/browse/K8SPS-305 * add `gr-demand-backup-haproxy` test to csv files * add `gr-demand-backup-haproxy` to all csv files --- e2e-tests/run-distro.csv | 1 + e2e-tests/run-minikube.csv | 1 + e2e-tests/run-pr.csv | 1 + e2e-tests/run-release.csv | 1 + .../gr-demand-backup-haproxy/00-assert.yaml | 9 ++++ .../00-minio-secret.yaml | 7 +++ .../gr-demand-backup-haproxy/01-assert.yaml | 29 ++++++++++++ .../01-deploy-operator.yaml | 15 ++++++ .../gr-demand-backup-haproxy/02-assert.yaml | 47 +++++++++++++++++++ .../02-create-cluster.yaml | 20 ++++++++ .../03-write-data.yaml | 17 +++++++ .../gr-demand-backup-haproxy/04-assert.yaml | 34 ++++++++++++++ .../04-create-backup-minio.yaml | 7 +++ .../gr-demand-backup-haproxy/05-assert.yaml | 24 ++++++++++ .../05-delete-data.yaml | 18 +++++++ .../gr-demand-backup-haproxy/06-assert.yaml | 25 ++++++++++ .../06-restore-from-minio.yaml | 7 +++ .../gr-demand-backup-haproxy/07-assert.yaml | 24 ++++++++++ .../07-read-data.yaml | 15 ++++++ .../08-drop-finalizer.yaml | 5 ++ pkg/controller/psrestore/controller.go | 26 +++++++--- 21 files changed, 327 insertions(+), 6 deletions(-) create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/00-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/00-minio-secret.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/03-write-data.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/04-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/04-create-backup-minio.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/05-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/05-delete-data.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/06-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/06-restore-from-minio.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/07-assert.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/07-read-data.yaml create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/08-drop-finalizer.yaml diff --git a/e2e-tests/run-distro.csv b/e2e-tests/run-distro.csv index 9406d08a7..6d244cee2 100644 --- a/e2e-tests/run-distro.csv +++ b/e2e-tests/run-distro.csv @@ -3,6 +3,7 @@ config config-router demand-backup gr-demand-backup +gr-demand-backup-haproxy gr-haproxy gr-init-deploy gr-one-pod diff --git a/e2e-tests/run-minikube.csv b/e2e-tests/run-minikube.csv index cd76bfa8e..c2dbee3f3 100644 --- a/e2e-tests/run-minikube.csv +++ b/e2e-tests/run-minikube.csv @@ -3,6 +3,7 @@ config config-router demand-backup gr-demand-backup +gr-demand-backup-haproxy gr-haproxy gr-init-deploy gr-one-pod diff --git a/e2e-tests/run-pr.csv b/e2e-tests/run-pr.csv index 310d0d90a..d9ea3cf60 100644 --- a/e2e-tests/run-pr.csv +++ b/e2e-tests/run-pr.csv @@ -4,6 +4,7 @@ config config-router demand-backup gr-demand-backup +gr-demand-backup-haproxy gr-haproxy gr-ignore-annotations gr-init-deploy diff --git a/e2e-tests/run-release.csv b/e2e-tests/run-release.csv index 310d0d90a..d9ea3cf60 100644 --- a/e2e-tests/run-release.csv +++ b/e2e-tests/run-release.csv @@ -4,6 +4,7 @@ config config-router demand-backup gr-demand-backup +gr-demand-backup-haproxy gr-haproxy gr-ignore-annotations gr-init-deploy diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/00-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/00-assert.yaml new file mode 100644 index 000000000..fecdb222e --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/00-assert.yaml @@ -0,0 +1,9 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- +apiVersion: v1 +kind: Secret +metadata: + name: minio-secret +type: Opaque diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/00-minio-secret.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/00-minio-secret.yaml new file mode 100644 index 000000000..3c797f054 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/00-minio-secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: minio-secret +stringData: + AWS_ACCESS_KEY_ID: some-access$\n"-key + AWS_SECRET_ACCESS_KEY: some-$\n"secret-key diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml new file mode 100644 index 000000000..30e8e19de --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml @@ -0,0 +1,29 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +status: + availableReplicas: 1 + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updatedReplicas: 1 diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml new file mode 100644 index 000000000..d02bc8b9d --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + deploy_operator + deploy_non_tls_cluster_secrets + deploy_tls_cluster_secrets + deploy_client + deploy_minio + timeout: 300 diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml new file mode 100644 index 000000000..ccac3e744 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml @@ -0,0 +1,47 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-demand-backup-haproxy-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-demand-backup-haproxy-haproxy +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-demand-backup-haproxy +status: + conditions: + - message: InnoDB cluster successfully bootstrapped with 3 nodes + reason: InnoDBClusterBootstrapped + status: "True" + type: InnoDBClusterBootstrapped + mysql: + ready: 3 + size: 3 + state: ready + haproxy: + ready: 3 + size: 3 + state: ready + state: ready \ No newline at end of file diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml new file mode 100644 index 000000000..7e50ded2d --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml @@ -0,0 +1,20 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.backup.storages.minio.type="s3"' - \ + | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ + | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ + | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ + | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ + | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.proxy.router.enabled=false' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/03-write-data.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/03-write-data.yaml new file mode 100644 index 000000000..c7ae38cbf --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/03-write-data.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o pipefail + set -o xtrace + + source ../../functions + + run_mysql \ + "CREATE DATABASE IF NOT EXISTS myDB; CREATE TABLE IF NOT EXISTS myDB.myTable (id int PRIMARY KEY)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100500)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/04-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/04-assert.yaml new file mode 100644 index 000000000..c72e6a09e --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/04-assert.yaml @@ -0,0 +1,34 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 300 +--- +kind: PerconaServerMySQLBackup +apiVersion: ps.percona.com/v1alpha1 +metadata: + name: gr-demand-backup-haproxy-minio +status: + state: Succeeded +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-demand-backup-haproxy-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-demand-backup-haproxy-haproxy +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 \ No newline at end of file diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/04-create-backup-minio.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/04-create-backup-minio.yaml new file mode 100644 index 000000000..28dd184f0 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/04-create-backup-minio.yaml @@ -0,0 +1,7 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQLBackup +metadata: + name: gr-demand-backup-haproxy-minio +spec: + clusterName: gr-demand-backup-haproxy + storageName: minio diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/05-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/05-assert.yaml new file mode 100644 index 000000000..b9141ada3 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/05-assert.yaml @@ -0,0 +1,24 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-0 +data: + data: "" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-1 +data: + data: "" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-2 +data: + data: "" diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/05-delete-data.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/05-delete-data.yaml new file mode 100644 index 000000000..7857b208e --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/05-delete-data.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "TRUNCATE TABLE myDB.myTable" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + cluster_name=$(get_cluster_name) + for i in 0 1 2; do + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${cluster_name}-mysql-${i}.${cluster_name}-mysql -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 04-delete-data-minio-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/06-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/06-assert.yaml new file mode 100644 index 000000000..b14f783b2 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/06-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 500 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-demand-backup-haproxy +status: + mysql: + ready: 3 + size: 3 + state: ready + haproxy: + ready: 3 + size: 3 + state: ready + state: ready +--- +kind: PerconaServerMySQLRestore +apiVersion: ps.percona.com/v1alpha1 +metadata: + name: gr-demand-backup-haproxy-restore-minio +status: + state: Succeeded diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/06-restore-from-minio.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/06-restore-from-minio.yaml new file mode 100644 index 000000000..bf976bee9 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/06-restore-from-minio.yaml @@ -0,0 +1,7 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQLRestore +metadata: + name: gr-demand-backup-haproxy-restore-minio +spec: + clusterName: gr-demand-backup-haproxy + backupName: gr-demand-backup-haproxy-minio diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/07-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/07-assert.yaml new file mode 100644 index 000000000..17deff5a9 --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/07-assert.yaml @@ -0,0 +1,24 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-0 +data: + data: "100500" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-1 +data: + data: "100500" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-2 +data: + data: "100500" diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/07-read-data.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/07-read-data.yaml new file mode 100644 index 000000000..7e6c5df6e --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/07-read-data.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + cluster_name=$(get_cluster_name) + for i in 0 1 2; do + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${cluster_name}-mysql-${i}.${cluster_name}-mysql -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 06-read-data-minio-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/08-drop-finalizer.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/08-drop-finalizer.yaml new file mode 100644 index 000000000..f2b52fd8e --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/08-drop-finalizer.yaml @@ -0,0 +1,5 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-demand-backup-haproxy + finalizers: [] diff --git a/pkg/controller/psrestore/controller.go b/pkg/controller/psrestore/controller.go index 743f9edb3..78703d104 100644 --- a/pkg/controller/psrestore/controller.go +++ b/pkg/controller/psrestore/controller.go @@ -39,6 +39,7 @@ import ( "github.com/pkg/errors" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/haproxy" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" @@ -434,13 +435,26 @@ func (r *PerconaServerMySQLRestoreReconciler) pauseCluster(ctx context.Context, return ErrWaitingTermination } case apiv1alpha1.ClusterTypeGR: - deployment := new(appsv1.Deployment) - nn = types.NamespacedName{Name: router.Name(cluster), Namespace: cluster.Namespace} - if err := r.Client.Get(ctx, nn, deployment); err != nil { - return errors.Wrapf(err, "get deployment %s", nn) + if cluster.HAProxyEnabled() { + sts := new(appsv1.StatefulSet) + nn = types.NamespacedName{Name: haproxy.Name(cluster), Namespace: cluster.Namespace} + if err := r.Client.Get(ctx, nn, sts); err != nil { + return errors.Wrapf(err, "get deployment %s", nn) + } + if sts.Status.Replicas != 0 { + return ErrWaitingTermination + } } - if deployment.Status.Replicas != 0 { - return ErrWaitingTermination + + if cluster.RouterEnabled() { + deployment := new(appsv1.Deployment) + nn = types.NamespacedName{Name: router.Name(cluster), Namespace: cluster.Namespace} + if err := r.Client.Get(ctx, nn, deployment); err != nil { + return errors.Wrapf(err, "get deployment %s", nn) + } + if deployment.Status.Replicas != 0 { + return ErrWaitingTermination + } } } From 4f987a35e0bd5a025cd060bec9aea5977f8df510 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Mon, 28 Aug 2023 09:34:37 +0300 Subject: [PATCH 008/192] K8SPS-297: restart mysql and haproxy on pmm key update (#437) https://jira.percona.com/browse/K8SPS-297 --- e2e-tests/functions | 32 +- e2e-tests/tests/monitoring/03-assert.yaml | 306 ++++++++++++++++++ .../tests/monitoring/03-rotate-pmm-key.yaml | 17 + ...eck-metrics.yaml => 04-check-metrics.yaml} | 4 +- ...-leak.yaml => 05-check-password-leak.yaml} | 0 ...-finalizer.yaml => 06-drop-finalizer.yaml} | 0 pkg/controller/ps/user.go | 21 +- pkg/haproxy/haproxy.go | 5 + 8 files changed, 377 insertions(+), 8 deletions(-) create mode 100644 e2e-tests/tests/monitoring/03-assert.yaml create mode 100644 e2e-tests/tests/monitoring/03-rotate-pmm-key.yaml rename e2e-tests/tests/monitoring/{03-check-metrics.yaml => 04-check-metrics.yaml} (87%) rename e2e-tests/tests/monitoring/{04-check-password-leak.yaml => 05-check-password-leak.yaml} (100%) rename e2e-tests/tests/monitoring/{05-drop-finalizer.yaml => 06-drop-finalizer.yaml} (100%) diff --git a/e2e-tests/functions b/e2e-tests/functions index da4edff0f..fcee9bab0 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -13,6 +13,7 @@ deploy_operator() { "$(printf 'select(documentIndex==1).spec.template.spec.containers[0].image="%s"' "${IMAGE}")" \ "${DEPLOY_DIR}/operator.yaml" \ | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="DISABLE_TELEMETRY").value) = "true"' \ + | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="LOG_LEVEL").value) = "DEBUG"' \ | kubectl -n "${NAMESPACE}" apply -f - } @@ -63,8 +64,30 @@ deploy_pmm_server() { } get_pmm_api_key() { - local ADMIN_PASSWORD=$(kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "printenv | grep ADMIN_PASSWORD | cut -d '=' -f2") - echo $(curl --insecure -X POST -H "Content-Type: application/json" -d '{"name":"operator", "role": "Admin"}' "https://admin:$ADMIN_PASSWORD@"$(get_service_ip monitoring-service)"/graph/api/auth/keys" | jq .key) + local key_name=$1 + + if [[ -z $key_name ]]; then + key_name="operator" + fi + + local ADMIN_PASSWORD + ADMIN_PASSWORD=$(kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "printenv | grep ADMIN_PASSWORD | cut -d '=' -f2") + curl --insecure -X POST -H "Content-Type: application/json" -d "{\"name\":\"$key_name\", \"role\": \"Admin\"}" "https://admin:$ADMIN_PASSWORD@$(get_service_ip monitoring-service)/graph/api/auth/keys" | jq .key +} + +delete_pmm_api_key() { + local key_name=$1 + + if [[ -z $key_name ]]; then + key_name="operator" + fi + + local ADMIN_PASSWORD + ADMIN_PASSWORD=$(kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "printenv | grep ADMIN_PASSWORD | cut -d '=' -f2") + + local key_id + key_id=$(curl --insecure -X GET "https://admin:$ADMIN_PASSWORD@$(get_service_ip monitoring-service)/graph/api/auth/keys" | jq '.[] | select( .name == "operator").id') + curl --insecure -X DELETE "https://admin:$ADMIN_PASSWORD@$(get_service_ip monitoring-service)/graph/api/auth/keys/$key_id" } deploy_minio() { @@ -507,7 +530,10 @@ verify_certificate_sans() { check_passwords_leak() { local secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12")) | not) | .value') - local passwords="$(for i in $secrets; do base64 -d <<< $i; echo; done) $secrets" + local passwords="$(for i in $secrets; do + base64 -d <<<$i + echo + done) $secrets" local pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') collect_logs() { diff --git a/e2e-tests/tests/monitoring/03-assert.yaml b/e2e-tests/tests/monitoring/03-assert.yaml new file mode 100644 index 000000000..ba64a6145 --- /dev/null +++ b/e2e-tests/tests/monitoring/03-assert.yaml @@ -0,0 +1,306 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 500 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: monitoring-mysql +spec: + template: + spec: + containers: + - name: mysql + - name: xtrabackup + - name: pt-heartbeat + - name: pmm-client + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: CLUSTER_NAME + value: monitoring + - name: CLIENT_PORT_LISTEN + value: "7777" + - name: CLIENT_PORT_MIN + value: "30100" + - name: CLIENT_PORT_MAX + value: "30105" + - name: PMM_AGENT_SERVER_ADDRESS + value: monitoring-service + - name: PMM_AGENT_SERVER_USERNAME + value: api_key + - name: PMM_AGENT_SERVER_PASSWORD + valueFrom: + secretKeyRef: + key: pmmserverkey + name: internal-monitoring + - name: PMM_SERVER + value: monitoring-service + - name: PMM_USER + value: api_key + - name: PMM_PASSWORD + valueFrom: + secretKeyRef: + key: pmmserverkey + name: internal-monitoring + - name: PMM_AGENT_LISTEN_PORT + value: "7777" + - name: PMM_AGENT_PORTS_MIN + value: "30100" + - name: PMM_AGENT_PORTS_MAX + value: "30105" + - name: PMM_AGENT_CONFIG_FILE + value: /usr/local/percona/pmm2/config/pmm-agent.yaml + - name: PMM_AGENT_SERVER_INSECURE_TLS + value: "1" + - name: PMM_AGENT_LISTEN_ADDRESS + value: 0.0.0.0 + - name: PMM_AGENT_SETUP_NODE_NAME + value: $(POD_NAMESPACE)-$(POD_NAME) + - name: PMM_AGENT_SETUP_METRICS_MODE + value: push + - name: PMM_AGENT_SETUP + value: "1" + - name: PMM_AGENT_SETUP_FORCE + value: "1" + - name: PMM_AGENT_SETUP_NODE_TYPE + value: container + - name: PMM_AGENT_PRERUN_SCRIPT + value: /opt/percona/pmm-prerun.sh + - name: PMM_AGENT_SIDECAR + value: "true" + - name: PMM_AGENT_SIDECAR_SLEEP + value: "5" + - name: DB_CLUSTER + value: monitoring + - name: DB_TYPE + value: mysql + - name: DB_HOST + value: localhost + - name: DB_PORT + value: "33062" + - name: DB_USER + value: monitor + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + key: monitor + name: internal-monitoring + - name: DB_ARGS + value: --query-source=perfschema +status: + observedGeneration: 2 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: monitoring-orc +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: monitoring + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: monitoring-haproxy +spec: + template: + spec: + containers: + - name: haproxy + - name: mysql-monit + - name: pmm-client + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: CLUSTER_NAME + value: monitoring + - name: CLIENT_PORT_LISTEN + value: "7777" + - name: CLIENT_PORT_MIN + value: "30100" + - name: CLIENT_PORT_MAX + value: "30105" + - name: PMM_AGENT_SERVER_ADDRESS + value: monitoring-service + - name: PMM_AGENT_SERVER_USERNAME + value: api_key + - name: PMM_AGENT_SERVER_PASSWORD + valueFrom: + secretKeyRef: + key: pmmserverkey + name: internal-monitoring + - name: PMM_SERVER + value: monitoring-service + - name: PMM_USER + value: api_key + - name: PMM_PASSWORD + valueFrom: + secretKeyRef: + key: pmmserverkey + name: internal-monitoring + - name: PMM_AGENT_LISTEN_PORT + value: "7777" + - name: PMM_AGENT_PORTS_MIN + value: "30100" + - name: PMM_AGENT_PORTS_MAX + value: "30105" + - name: PMM_AGENT_CONFIG_FILE + value: /usr/local/percona/pmm2/config/pmm-agent.yaml + - name: PMM_AGENT_SERVER_INSECURE_TLS + value: "1" + - name: PMM_AGENT_LISTEN_ADDRESS + value: 0.0.0.0 + - name: PMM_AGENT_SETUP_NODE_NAME + value: $(POD_NAMESPACE)-$(POD_NAME) + - name: PMM_AGENT_SETUP_METRICS_MODE + value: push + - name: PMM_AGENT_SETUP + value: "1" + - name: PMM_AGENT_SETUP_FORCE + value: "1" + - name: PMM_AGENT_SETUP_NODE_TYPE + value: container + - name: PMM_AGENT_PRERUN_SCRIPT + value: /opt/percona/pmm-prerun.sh + - name: PMM_AGENT_SIDECAR + value: "true" + - name: PMM_AGENT_SIDECAR_SLEEP + value: "5" + - name: DB_CLUSTER + value: monitoring + - name: DB_TYPE + value: haproxy + - name: DB_HOST + value: localhost + - name: DB_PORT + value: "33062" + - name: DB_USER + value: monitor + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + key: monitor + name: internal-monitoring + - name: DB_ARGS + value: --query-source=perfschema + - name: PMM_ADMIN_CUSTOM_PARAMS + value: --listen-port=8404 + image: perconalab/pmm-client:dev-latest + imagePullPolicy: Always + ports: + - containerPort: 7777 + protocol: TCP + - containerPort: 30100 + protocol: TCP + - containerPort: 30101 + protocol: TCP + - containerPort: 30102 + protocol: TCP + - containerPort: 30103 + protocol: TCP + - containerPort: 30104 + protocol: TCP + - containerPort: 30105 + protocol: TCP + - containerPort: 8404 + protocol: TCP + resources: + requests: + cpu: 300m + memory: 150M + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin + dnsPolicy: ClusterFirst + initContainers: + - command: + - /opt/percona-server-mysql-operator/ps-init-entrypoint.sh + imagePullPolicy: Always + name: haproxy-init + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 + volumes: + - emptyDir: {} + name: bin + - emptyDir: {} + name: haproxy-config + - name: users + secret: + defaultMode: 420 + secretName: internal-monitoring + - name: tls + secret: + defaultMode: 420 + secretName: test-ssl + - name: config + projected: + defaultMode: 420 + sources: + - configMap: + items: + - key: haproxy.cfg + path: haproxy.cfg + name: monitoring-haproxy + optional: true + updateStrategy: + rollingUpdate: + partition: 0 + type: RollingUpdate +status: + availableReplicas: 3 + observedGeneration: 2 + readyReplicas: 3 + replicas: 3 + updatedReplicas: 3 diff --git a/e2e-tests/tests/monitoring/03-rotate-pmm-key.yaml b/e2e-tests/tests/monitoring/03-rotate-pmm-key.yaml new file mode 100644 index 000000000..d5b20f0e6 --- /dev/null +++ b/e2e-tests/tests/monitoring/03-rotate-pmm-key.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + # add new PMM API key to secret + API_KEY_NEW=$(get_pmm_api_key "operator-new") + kubectl patch -n "${NAMESPACE}" secret test-secrets --type merge --patch '{"stringData": {"pmmserverkey": '$API_KEY_NEW'}}' + + # delete old PMM key + delete_pmm_api_key "operator" + sleep 10 + timeout: 120 diff --git a/e2e-tests/tests/monitoring/03-check-metrics.yaml b/e2e-tests/tests/monitoring/04-check-metrics.yaml similarity index 87% rename from e2e-tests/tests/monitoring/03-check-metrics.yaml rename to e2e-tests/tests/monitoring/04-check-metrics.yaml index c10f45837..509caff8b 100644 --- a/e2e-tests/tests/monitoring/03-check-metrics.yaml +++ b/e2e-tests/tests/monitoring/04-check-metrics.yaml @@ -7,6 +7,8 @@ commands: source ../../functions + sleep 70 # we should wait more than one minute because `get_metric_values` gets data for the last 60 seconds + API_KEY=$(kubectl get secret internal-monitoring -o jsonpath='{.data.pmmserverkey}' -n "${NAMESPACE}" | base64 --decode) for i in $(seq 0 2); do @@ -24,4 +26,4 @@ commands: echo "Error: http code is $http_code" exit 1 fi - timeout: 120 + timeout: 300 diff --git a/e2e-tests/tests/monitoring/04-check-password-leak.yaml b/e2e-tests/tests/monitoring/05-check-password-leak.yaml similarity index 100% rename from e2e-tests/tests/monitoring/04-check-password-leak.yaml rename to e2e-tests/tests/monitoring/05-check-password-leak.yaml diff --git a/e2e-tests/tests/monitoring/05-drop-finalizer.yaml b/e2e-tests/tests/monitoring/06-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/monitoring/05-drop-finalizer.yaml rename to e2e-tests/tests/monitoring/06-drop-finalizer.yaml diff --git a/pkg/controller/ps/user.go b/pkg/controller/ps/user.go index cd3f46138..ccfff446c 100644 --- a/pkg/controller/ps/user.go +++ b/pkg/controller/ps/user.go @@ -166,6 +166,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a restartMySQL bool restartReplication bool restartOrchestrator bool + restartPMM bool ) updatedUsers := make([]mysql.User, 0) @@ -178,11 +179,11 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a mysqlUser := allUsers[apiv1alpha1.SystemUser(user)] mysqlUser.Password = string(pass) - switch mysqlUser.Username { + switch apiv1alpha1.SystemUser(user) { case apiv1alpha1.UserMonitor: restartMySQL = cr.PMMEnabled(internalSecret) case apiv1alpha1.UserPMMServerKey: - restartMySQL = cr.PMMEnabled(internalSecret) + restartPMM = cr.PMMEnabled(internalSecret) continue // PMM server user credentials are not stored in db case apiv1alpha1.UserReplication: restartReplication = true @@ -267,8 +268,8 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a } } - if restartMySQL { - log.Info("Monitor user password updated. Restarting MySQL.") + if restartMySQL || restartPMM { + log.Info("Monitor user password or pmmserverkey updated. Restarting MySQL.") sts := &appsv1.StatefulSet{} if err := r.Client.Get(ctx, mysql.NamespacedName(cr), sts); err != nil { @@ -279,6 +280,18 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a } } + if cr.HAProxyEnabled() && restartPMM { + log.Info("pmmserverkey updated. Restarting HAProxy.") + + sts := new(appsv1.StatefulSet) + if err := r.Get(ctx, haproxy.NamespacedName(cr), sts); err != nil { + return errors.Wrap(err, "get HAProxy statefulset") + } + if err := k8s.RolloutRestart(ctx, r.Client, sts, apiv1alpha1.AnnotationSecretHash, hash); err != nil { + return errors.Wrap(err, "restart MySQL") + } + } + if cr.Status.State != apiv1alpha1.StateReady { log.Info("Waiting cluster to be ready") return nil diff --git a/pkg/haproxy/haproxy.go b/pkg/haproxy/haproxy.go index 9f6c8d56b..ad75fe949 100644 --- a/pkg/haproxy/haproxy.go +++ b/pkg/haproxy/haproxy.go @@ -7,6 +7,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" @@ -36,6 +37,10 @@ func Name(cr *apiv1alpha1.PerconaServerMySQL) string { return cr.Name + "-" + ComponentName } +func NamespacedName(cr *apiv1alpha1.PerconaServerMySQL) types.NamespacedName { + return types.NamespacedName{Name: Name(cr), Namespace: cr.Namespace} +} + func ServiceName(cr *apiv1alpha1.PerconaServerMySQL) string { return Name(cr) } From 892642c77583860327561f72c1f8237102aeda35 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Mon, 28 Aug 2023 17:15:19 +0300 Subject: [PATCH 009/192] K8SPS-306 update haproxy_check_* scripts (#436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * K8SPS-306 update haproxy_check_* scripts * Update build/haproxy_check_replicas.sh Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * ensure primary is writeable in one pod deployments --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ege Güneş --- build/haproxy_check_primary.sh | 28 +++++++++++++++++----------- build/haproxy_check_replicas.sh | 30 ++++++++++++++++++------------ pkg/controller/ps/controller.go | 7 +++++++ pkg/orchestrator/client.go | 1 + pkg/orchestrator/clientexec.go | 26 ++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 23 deletions(-) diff --git a/build/haproxy_check_primary.sh b/build/haproxy_check_primary.sh index 1d0c31712..d5a588789 100755 --- a/build/haproxy_check_primary.sh +++ b/build/haproxy_check_primary.sh @@ -17,20 +17,22 @@ MONITOR_USER='monitor' MONITOR_PASSWORD=$(/bin/cat /etc/mysql/mysql-users-secret/monitor) TIMEOUT=${HA_CONNECTION_TIMEOUT:-10} -MYSQL_CMDLINE="/usr/bin/timeout $TIMEOUT /usr/bin/mysql -nNE -u${MONITOR_USER} -h ${MYSQL_SERVER_IP} -P ${MYSQL_SERVER_PORT}" +MYSQL_CMDLINE="/usr/bin/timeout $TIMEOUT /usr/bin/mysql -BnN -u${MONITOR_USER} -h ${MYSQL_SERVER_IP} -P ${MYSQL_SERVER_PORT}" CLUSTER_TYPE=$(/bin/cat /tmp/cluster_type) check_async() { - READ_ONLY=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e 'select @@super_read_only' | /usr/bin/sed -n -e '2p' | /usr/bin/tr -d '\n') + local VALUES=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e "select concat(concat(@@global.read_only,',', @@global.super_read_only));select service_state from performance_schema.replication_connection_status where channel_name='';select service_state from performance_schema.replication_applier_status where channel_name='';") - # ${REPLICATION_STATUS[0]} - Replica_IO_Running - # ${REPLICATION_STATUS[1]} - Replica_SQL_Running - REPLICATION_STATUS=($(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e 'SHOW REPLICA STATUS' | /usr/bin/sed -n -e '12p' -e '13p' | /usr/bin/tr '\n' ' ')) + local REPLICATION_STATUS=($(echo $VALUES | /bin/tr "," "\n")) + local READ_ONLY=${REPLICATION_STATUS[0]} + local SUPER_RO=${REPLICATION_STATUS[1]} + local REP_IO_STATUS=${REPLICATION_STATUS[2]} + local REP_SQL_STATUS=${REPLICATION_STATUS[3]} - log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} super_read_only: ${READ_ONLY} Replica_IO_Running: ${REPLICATION_STATUS[0]} Replica_SQL_Running: ${REPLICATION_STATUS[1]}" + log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} Super_Read_Only: ${SUPER_RO} Read_Only: ${READ_ONLY} Replica_IO_Running: ${REP_IO_STATUS} Replica_SQL_Running: ${REP_SQL_STATUS}" - if [[ ${READ_ONLY} == '0' ]] && [[ ${REPLICATION_STATUS[0]} != 'Yes' ]] && [[ ${REPLICATION_STATUS[1]} != 'Yes' ]]; then + if [[ ${SUPER_RO} == '0' ]] && [[ ${READ_ONLY} == '0' ]] && [[ ${REP_IO_STATUS} != 'ON' ]] && [[ ${REP_SQL_STATUS} != 'ON' ]]; then log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} for backend ${HAPROXY_PROXY_NAME} is OK" exit 0 else @@ -40,12 +42,16 @@ check_async() { } check_gr() { - READ_ONLY=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e 'select @@super_read_only' | /usr/bin/sed -n -e '2p' | /usr/bin/tr -d '\n') - APPLIER_STATUS=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e "SELECT SERVICE_STATE FROM performance_schema.replication_connection_status WHERE channel_name = 'group_replication_applier'" | /usr/bin/sed -n -e '2p' | /usr/bin/tr -d '\n') + local VALUES=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e "select concat(concat(@@global.read_only,',', @@global.super_read_only),',',(select MEMBER_STATE from performance_schema.replication_group_members where MEMBER_ID = @@global.server_uuid ));") - log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} @@super_read_only: ${READ_ONLY} Applier: ${APPLIER_STATUS}" + local REPLICATION_STATUS=($(echo $VALUES | /bin/tr "," "\n")) + local READ_ONLY=${REPLICATION_STATUS[0]} + local SUPER_RO=${REPLICATION_STATUS[1]} + local NODE_STATUS=${REPLICATION_STATUS[2]} - if [[ ${READ_ONLY} == '0' ]] && [[ ${APPLIER_STATUS} == "ON" ]]; then + log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} Super_Read_Only: ${SUPER_RO} Read_Only: ${READ_ONLY} Node_Status: ${NODE_STATUS}" + + if [[ ${SUPER_RO} == '0' ]] && [[ ${READ_ONLY} == '0' ]] && [[ ${NODE_STATUS} == "ONLINE" ]]; then log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} for backend ${HAPROXY_PROXY_NAME} is OK" exit 0 else diff --git a/build/haproxy_check_replicas.sh b/build/haproxy_check_replicas.sh index acc8e6419..7da6f95bc 100755 --- a/build/haproxy_check_replicas.sh +++ b/build/haproxy_check_replicas.sh @@ -16,21 +16,23 @@ MYSQL_SERVER_PORT='33062' MONITOR_USER='monitor' MONITOR_PASSWORD=$(/bin/cat /etc/mysql/mysql-users-secret/monitor) -TIMEOUT=${CUSTOM_TIMEOUT:-10} -MYSQL_CMDLINE="/usr/bin/timeout $TIMEOUT /usr/bin/mysql -nNE -u${MONITOR_USER} -h ${MYSQL_SERVER_IP} -P ${MYSQL_SERVER_PORT}" +TIMEOUT=${HA_CONNECTION_TIMEOUT:-10} +MYSQL_CMDLINE="/usr/bin/timeout $TIMEOUT /usr/bin/mysql -BnN -u${MONITOR_USER} -h ${MYSQL_SERVER_IP} -P ${MYSQL_SERVER_PORT}" CLUSTER_TYPE=$(/bin/cat /tmp/cluster_type) check_async() { - READ_ONLY=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e 'select @@super_read_only' | /usr/bin/sed -n -e '2p' | /usr/bin/tr -d '\n') + local VALUES=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e "select concat(concat(@@global.read_only,',', @@global.super_read_only));select service_state from performance_schema.replication_connection_status where channel_name='';select service_state from performance_schema.replication_applier_status where channel_name='';") - # ${REPLICATION_STATUS[0]} - Replica_IO_Running - # ${REPLICATION_STATUS[1]} - Replica_SQL_Running - REPLICATION_STATUS=($(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e 'SHOW REPLICA STATUS' | /usr/bin/sed -n -e '12p' -e '13p' | /usr/bin/tr '\n' ' ')) + local REPLICATION_STATUS=($(echo $VALUES | /bin/tr "," "\n")) + local READ_ONLY=${REPLICATION_STATUS[0]} + local SUPER_RO=${REPLICATION_STATUS[1]} + local REP_IO_STATUS=${REPLICATION_STATUS[2]} + local REP_SQL_STATUS=${REPLICATION_STATUS[3]} - log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} @@super_read_only: ${READ_ONLY} Replica_IO_Running: ${REPLICATION_STATUS[0]} Replica_SQL_Running: ${REPLICATION_STATUS[1]}" + log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} Super_Read_Only: ${SUPER_RO} Read_Only: ${READ_ONLY} Replica_IO_Running: ${REP_IO_STATUS} Replica_SQL_Running: ${REP_SQL_STATUS}" - if [[ ${READ_ONLY} == '1' ]] && [[ ${REPLICATION_STATUS[0]} == 'Yes' ]] && [[ ${REPLICATION_STATUS[1]} == 'Yes' ]]; then + if [[ ${SUPER_RO} == '1' ]] && [[ ${READ_ONLY} == '1' ]] && [[ ${REP_IO_STATUS} == 'ON' ]] && [[ ${REP_SQL_STATUS} == 'ON' ]]; then log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} for backend ${HAPROXY_PROXY_NAME} is OK" exit 0 else @@ -40,12 +42,16 @@ check_async() { } check_gr() { - READ_ONLY=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e 'SELECT @@super_read_only' | /usr/bin/sed -n -e '2p' | /usr/bin/tr -d '\n') - APPLIER_STATUS=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e "SELECT SERVICE_STATE FROM performance_schema.replication_connection_status WHERE channel_name = 'group_replication_applier'" | /usr/bin/sed -n -e '2p' | /usr/bin/tr -d '\n') + local VALUES=$(MYSQL_PWD="${MONITOR_PASSWORD}" ${MYSQL_CMDLINE} -e "select concat(concat(@@global.read_only,',', @@global.super_read_only),',',(select MEMBER_STATE from performance_schema.replication_group_members where MEMBER_ID = @@global.server_uuid ));") - log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} @@super_read_only: ${READ_ONLY} Applier: ${APPLIER_STATUS}" + local REPLICATION_STATUS=($(echo $VALUES | /bin/tr "," "\n")) + local READ_ONLY=${REPLICATION_STATUS[0]} + local SUPER_RO=${REPLICATION_STATUS[1]} + local NODE_STATUS=${REPLICATION_STATUS[2]} - if [[ ${READ_ONLY} == '1' ]] && [[ ${APPLIER_STATUS} == "ON" ]]; then + log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} Super_Read_Only: ${SUPER_RO} Read_Only: ${READ_ONLY} Node_Status: ${NODE_STATUS}" + + if [[ ${SUPER_RO} == '1' ]] && [[ ${READ_ONLY} == '1' ]] && [[ ${NODE_STATUS} == "ONLINE" ]]; then log INFO "${MYSQL_SERVER_IP}:${MYSQL_SERVER_PORT} for backend ${HAPROXY_PROXY_NAME} is OK" exit 0 else diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 3a99da2dd..0a7290c61 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -757,6 +757,13 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, return nil } + // orchestrator doesn't attempt to recover from NonWriteableMaster if there's only 1 MySQL pod + if cr.MySQLSpec().Size == 1 && primary.ReadOnly { + if err := orchestrator.SetWriteableExec(ctx, r.ClientCmd, pod, primary.Key.Hostname, int(primary.Key.Port)); err != nil { + return errors.Wrapf(err, "set %s writeable", primary.Key.Hostname) + } + } + return nil } diff --git a/pkg/orchestrator/client.go b/pkg/orchestrator/client.go index 6cfc6e517..5f9ef2bbe 100644 --- a/pkg/orchestrator/client.go +++ b/pkg/orchestrator/client.go @@ -26,6 +26,7 @@ type Instance struct { Alias string `json:"InstanceAlias"` MasterKey InstanceKey `json:"MasterKey"` Replicas []InstanceKey `json:"Replicas"` + ReadOnly bool `json:"ReadOnly"` } func ClusterPrimary(ctx context.Context, apiHost, clusterHint string) (*Instance, error) { diff --git a/pkg/orchestrator/clientexec.go b/pkg/orchestrator/clientexec.go index 358ea8d39..41242621d 100644 --- a/pkg/orchestrator/clientexec.go +++ b/pkg/orchestrator/clientexec.go @@ -211,3 +211,29 @@ func DiscoverExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, } return nil } + +func SetWriteableExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error { + url := fmt.Sprintf("api/set-writeable/%s/%d", host, port) + + var res, errb bytes.Buffer + err := exec(ctx, cliCmd, pod, url, &res, &errb) + if err != nil { + return err + } + + orcResp := new(orcResponse) + body := res.Bytes() + + if len(body) == 0 { + return ErrEmptyResponse + } + + if err := json.Unmarshal(body, orcResp); err != nil { + return errors.Wrapf(err, "json decode \"%s\"", string(body)) + } + + if orcResp.Code == "ERROR" { + return errors.New(orcResp.Message) + } + return nil +} From 97facf2ffe12d5f574e455e648fd440c201ce4ef Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Wed, 30 Aug 2023 15:59:50 +0300 Subject: [PATCH 010/192] K8SPS-309: restore doesn't restart cluster (#439) https://jira.percona.com/browse/K8SPS-309 --- go.mod | 2 +- go.sum | 4 +-- pkg/controller/ps/status.go | 6 +---- pkg/controller/psbackup/controller.go | 6 +---- pkg/controller/psrestore/controller.go | 35 +++++++++++++++++--------- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index eec2d4d4b..9635ced52 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( k8s.io/apimachinery v0.27.4 k8s.io/client-go v0.27.4 k8s.io/utils v0.0.0-20230505201702-9f6742963106 - sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/controller-runtime v0.15.2 ) require ( diff --git a/go.sum b/go.sum index f55866c79..50f93bd63 100644 --- a/go.sum +++ b/go.sum @@ -863,8 +863,8 @@ k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/controller-runtime v0.15.2 h1:9V7b7SDQSJ08IIsJ6CY1CE85Okhp87dyTMNDG0FS7f4= +sigs.k8s.io/controller-runtime v0.15.2/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY= sigs.k8s.io/gateway-api v0.7.0/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index b17af8c30..eddf7e194 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -322,10 +322,6 @@ func writeStatus(ctx context.Context, cl client.Client, nn types.NamespacedName, } cr.Status = status - if err := cl.Status().Update(ctx, cr); err != nil { - return errors.Wrapf(err, "update %v", nn.String()) - } - - return nil + return cl.Status().Update(ctx, cr) }) } diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index f1e87caaa..9b81b1bf1 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -105,11 +105,7 @@ func (r *PerconaServerMySQLBackupReconciler) Reconcile(ctx context.Context, req cr.Status = status log.Info("Updating status", "state", cr.Status.State) - if err := r.Client.Status().Update(ctx, cr); err != nil { - return errors.Wrapf(err, "update %v", req.NamespacedName.String()) - } - - return nil + return r.Client.Status().Update(ctx, cr) }) if err != nil { log.Error(err, "failed to update status") diff --git a/pkg/controller/psrestore/controller.go b/pkg/controller/psrestore/controller.go index 78703d104..d083a25b3 100644 --- a/pkg/controller/psrestore/controller.go +++ b/pkg/controller/psrestore/controller.go @@ -90,7 +90,10 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req return } - err := k8sretry.RetryOnConflict(k8sretry.DefaultRetry, func() error { + retriable := func(err error) bool { + return err != nil + } + err := k8sretry.OnError(k8sretry.DefaultRetry, retriable, func() error { cr := &apiv1alpha1.PerconaServerMySQLRestore{} if err := r.Client.Get(ctx, req.NamespacedName, cr); err != nil { return errors.Wrapf(err, "get %v", req.NamespacedName.String()) @@ -99,16 +102,30 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req cr.Status = status log.Info("Updating status", "state", cr.Status.State) if err := r.Client.Status().Update(ctx, cr); err != nil { - return errors.Wrapf(err, "update %v", req.NamespacedName.String()) + return errors.Wrap(err, "update status") } + if err := r.Client.Get(ctx, req.NamespacedName, cr); err != nil { + return errors.Wrapf(err, "get %v", req.NamespacedName.String()) + } + if cr.Status.State != status.State { + return errors.Errorf("status %s was not updated to %s", cr.Status.State, status.State) + } return nil }) if err != nil { log.Error(err, "failed to update status") + return } + + log.V(1).Info("status updated", "state", status.State) }() + switch status.State { + case apiv1alpha1.RestoreFailed, apiv1alpha1.RestoreSucceeded: + return ctrl.Result{}, nil + } + cluster := &apiv1alpha1.PerconaServerMySQL{} nn := types.NamespacedName{Name: cr.Spec.ClusterName, Namespace: cr.Namespace} if err := r.Client.Get(ctx, nn, cluster); err != nil { @@ -161,11 +178,6 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req return ctrl.Result{}, nil } - switch status.State { - case apiv1alpha1.RestoreFailed, apiv1alpha1.RestoreSucceeded: - return ctrl.Result{}, nil - } - restoreList := &apiv1alpha1.PerconaServerMySQLRestoreList{} if err := r.List(ctx, restoreList, &client.ListOptions{Namespace: cr.Namespace}); err != nil { return ctrl.Result{}, errors.Wrap(err, "get restore jobs list") @@ -302,12 +314,9 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req } switch status.State { - case apiv1alpha1.RestoreStarting: + case apiv1alpha1.RestoreStarting, apiv1alpha1.RestoreRunning: if job.Status.Active > 0 { status.State = apiv1alpha1.RestoreRunning - } - case apiv1alpha1.RestoreRunning: - if job.Status.Active > 0 { return ctrl.Result{}, nil } @@ -358,7 +367,9 @@ func (r *PerconaServerMySQLRestoreReconciler) deletePVCs(ctx context.Context, cl } if err := r.Client.Delete(ctx, &pvc); err != nil { - log.Error(err, "failed to delete PVC") + if !k8serrors.IsNotFound(err) { + log.Error(err, "failed to delete PVC") + } continue } From 469d94d06312a6f1f8a7122732c7077381cd007f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Wed, 30 Aug 2023 18:04:06 +0300 Subject: [PATCH 011/192] K8SPS-232: Ensure all members have up-to-date group seeds (#438) * K8SPS-232: Ensure all members have up-to-date group seeds * persist group seeds * don't return on error * create a special MySQL service for haproxy * fix variable name * don't sort set, get sorted list * ensure read only on startup * address review comments * Update build/ps-entrypoint.sh Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Viacheslav Sarzhan Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- build/ps-entrypoint.sh | 1 + cmd/bootstrap/group_replication.go | 91 +++++++++++++++++-- e2e-tests/tests/gr-init-deploy/07-assert.yaml | 12 +++ .../gr-init-deploy/07-check-group-seeds.yaml | 19 ++++ ...-finalizer.yaml => 08-drop-finalizer.yaml} | 0 pkg/controller/ps/controller.go | 4 + pkg/haproxy/haproxy.go | 2 +- pkg/mysql/mysql.go | 26 ++++++ 8 files changed, 145 insertions(+), 10 deletions(-) create mode 100644 e2e-tests/tests/gr-init-deploy/07-assert.yaml create mode 100644 e2e-tests/tests/gr-init-deploy/07-check-group-seeds.yaml rename e2e-tests/tests/gr-init-deploy/{07-drop-finalizer.yaml => 08-drop-finalizer.yaml} (100%) diff --git a/build/ps-entrypoint.sh b/build/ps-entrypoint.sh index 9bb4b0593..78a6053b1 100755 --- a/build/ps-entrypoint.sh +++ b/build/ps-entrypoint.sh @@ -394,6 +394,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then fi load_group_replication_plugin + ensure_read_only # exit when MYSQL_INIT_ONLY environment variable is set to avoid starting mysqld if [ -n "$MYSQL_INIT_ONLY" ]; then diff --git a/cmd/bootstrap/group_replication.go b/cmd/bootstrap/group_replication.go index adaab60b0..2e725de0e 100644 --- a/cmd/bootstrap/group_replication.go +++ b/cmd/bootstrap/group_replication.go @@ -89,7 +89,12 @@ func (m *mysqlsh) clusterStatus(ctx context.Context) (innodbcluster.Status, erro return status, nil } -func (m *mysqlsh) runSQL(ctx context.Context, sql string) (string, error) { +type SQLResult struct { + Error string `json:"error,omitempty"` + Rows []map[string]string `json:"rows,omitempty"` +} + +func (m *mysqlsh) runSQL(ctx context.Context, sql string) (SQLResult, error) { var stdoutb, stderrb bytes.Buffer cmd := fmt.Sprintf("session.runSql('%s')", sql) @@ -99,26 +104,90 @@ func (m *mysqlsh) runSQL(ctx context.Context, sql string) (string, error) { c.Stdout = &stdoutb c.Stderr = &stderrb - var result struct { - Error string `json:"error,omitempty"` - Rows []map[string]string `json:"rows,omitempty"` - } + var result SQLResult if err := c.Run(); err != nil { - return "", errors.Wrapf(err, "run %s, stdout: %s, stderr: %s", cmd, stdoutb.String(), stderrb.String()) + return result, errors.Wrapf(err, "run %s, stdout: %s, stderr: %s", cmd, stdoutb.String(), stderrb.String()) } if err := json.Unmarshal(stdoutb.Bytes(), &result); err != nil { - return "", errors.Wrap(err, "unmarshal result") + return result, errors.Wrap(err, "unmarshal result") } if len(result.Error) > 0 { - return "", errors.New(result.Error) + return result, errors.New(result.Error) + } + + return result, nil +} + +func (m *mysqlsh) getGTIDExecuted(ctx context.Context) (string, error) { + result, err := m.runSQL(ctx, "SELECT @@GTID_EXECUTED") + if err != nil { + return "", err } return result.Rows[0]["@@GTID_EXECUTED"], nil } +func (m *mysqlsh) getGroupSeeds(ctx context.Context) (string, error) { + result, err := m.runSQL(ctx, "SELECT @@group_replication_group_seeds") + if err != nil { + return "", err + } + + return result.Rows[0]["@@group_replication_group_seeds"], nil +} + +func (m *mysqlsh) setGroupSeeds(ctx context.Context, seeds string) (string, error) { + sql := fmt.Sprintf("SET PERSIST group_replication_group_seeds = \"%s\"", seeds) + _, err := m.runSQL(ctx, sql) + if err != nil { + return "", err + } + + return "", nil +} + +func updateGroupPeers(ctx context.Context, peers sets.Set[string]) error { + fqdn, err := getFQDN(os.Getenv("SERVICE_NAME")) + if err != nil { + return errors.Wrap(err, "get FQDN") + } + + for _, peer := range peers.UnsortedList() { + log.Printf("Connecting to peer %s", peer) + sh := newShell(peer) + + seeds, err := sh.getGroupSeeds(ctx) + if err != nil { + log.Printf("ERROR: get @@group_replication_group_seeds from %s: %s", peer, err) + continue + } + + log.Printf("Got group_replication_group_seeds from peer %s = %s", peer, seeds) + + tmpSeeds := make([]string, 0) + if len(seeds) > 0 { + tmpSeeds = strings.Split(seeds, ",") + } + seedSet := sets.New(tmpSeeds...) + seedSet.Insert(fmt.Sprintf("%s:%d", fqdn, 3306)) + + seeds = strings.Join(sets.List(seedSet), ",") + + _, err = sh.setGroupSeeds(ctx, seeds) + if err != nil { + log.Printf("ERROR: set @@group_replication_group_seeds in %s: %s", peer, err) + continue + } + + log.Printf("Set group_replication_group_seeds in peer %s = %s", peer, seeds) + } + + return nil +} + func (m *mysqlsh) configureLocalInstance(ctx context.Context) error { _, _, err := m.run(ctx, fmt.Sprintf("dba.configureLocalInstance('%s', {'clearReadOnly': true})", m.getURI())) if err != nil { @@ -212,7 +281,7 @@ func handleFullClusterCrash(ctx context.Context) error { return errors.Wrap(err, "connect to local") } - result, err := localShell.runSQL(ctx, "SELECT @@GTID_EXECUTED") + result, err := localShell.getGTIDExecuted(ctx) if err != nil { return errors.Wrap(err, "get GTID_EXECUTED") } @@ -365,6 +434,10 @@ func bootstrapGroupReplication(ctx context.Context) error { log.Printf("Instance (%s) state is %s", localShell.host, member.MemberState) } + if err := updateGroupPeers(ctx, peers); err != nil { + return err + } + if rescanNeeded { err := shell.rescanCluster(ctx) if err != nil { diff --git a/e2e-tests/tests/gr-init-deploy/07-assert.yaml b/e2e-tests/tests/gr-init-deploy/07-assert.yaml new file mode 100644 index 000000000..78eed4429 --- /dev/null +++ b/e2e-tests/tests/gr-init-deploy/07-assert.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 300 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: 07-check-group-seeds +data: + gr-init-deploy-mysql-0: gr-init-deploy-mysql-0.gr-init-deploy-mysql.NAMESPACE:3306,gr-init-deploy-mysql-1.gr-init-deploy-mysql.NAMESPACE:3306,gr-init-deploy-mysql-2.gr-init-deploy-mysql.NAMESPACE:3306 + gr-init-deploy-mysql-1: gr-init-deploy-mysql-0.gr-init-deploy-mysql.NAMESPACE:3306,gr-init-deploy-mysql-1.gr-init-deploy-mysql.NAMESPACE:3306,gr-init-deploy-mysql-2.gr-init-deploy-mysql.NAMESPACE:3306 + gr-init-deploy-mysql-2: gr-init-deploy-mysql-0.gr-init-deploy-mysql.NAMESPACE:3306,gr-init-deploy-mysql-1.gr-init-deploy-mysql.NAMESPACE:3306,gr-init-deploy-mysql-2.gr-init-deploy-mysql.NAMESPACE:3306 diff --git a/e2e-tests/tests/gr-init-deploy/07-check-group-seeds.yaml b/e2e-tests/tests/gr-init-deploy/07-check-group-seeds.yaml new file mode 100644 index 000000000..29615af04 --- /dev/null +++ b/e2e-tests/tests/gr-init-deploy/07-check-group-seeds.yaml @@ -0,0 +1,19 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + pods=($(get_mysql_pods)) + + args="" + for pod in "${pods[@]}"; do + seeds=$(run_mysql "SELECT @@group_replication_group_seeds" "-h ${pod}.$(get_mysql_service gr-init-deploy).${NAMESPACE} -uroot -proot_password") + args="${args} --from-literal=${pod}=$(echo ${seeds} | sed "s/${NAMESPACE}/NAMESPACE/g")" + done + + kubectl create configmap -n "${NAMESPACE}" 07-check-group-seeds $args diff --git a/e2e-tests/tests/gr-init-deploy/07-drop-finalizer.yaml b/e2e-tests/tests/gr-init-deploy/08-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-init-deploy/07-drop-finalizer.yaml rename to e2e-tests/tests/gr-init-deploy/08-drop-finalizer.yaml diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 0a7290c61..1305ab333 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -465,6 +465,10 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLServices(ctx context.Contex return errors.Wrap(err, "reconcile headless svc") } + if err := k8s.EnsureService(ctx, r.Client, cr, mysql.ProxyService(cr), r.Scheme, true); err != nil { + return errors.Wrap(err, "reconcile proxy svc") + } + exposer := mysql.Exposer(*cr) if err := r.reconcileServicePerPod(ctx, cr, &exposer); err != nil { return errors.Wrap(err, "reconcile service per pod") diff --git a/pkg/haproxy/haproxy.go b/pkg/haproxy/haproxy.go index ad75fe949..9af536637 100644 --- a/pkg/haproxy/haproxy.go +++ b/pkg/haproxy/haproxy.go @@ -343,7 +343,7 @@ func mysqlMonitContainer(cr *apiv1alpha1.PerconaServerMySQL) corev1.Container { env := []corev1.EnvVar{ { Name: "MYSQL_SERVICE", - Value: mysql.ServiceName(cr), + Value: mysql.ProxyServiceName(cr), }, } env = append(env, spec.Env...) diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index 2384f4867..ee01456e9 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -88,6 +88,10 @@ func UnreadyServiceName(cr *apiv1alpha1.PerconaServerMySQL) string { return Name(cr) + "-unready" } +func ProxyServiceName(cr *apiv1alpha1.PerconaServerMySQL) string { + return Name(cr) + "-proxy" +} + func ConfigMapName(cr *apiv1alpha1.PerconaServerMySQL) string { return Name(cr) } @@ -381,6 +385,28 @@ func HeadlessService(cr *apiv1alpha1.PerconaServerMySQL) *corev1.Service { } } +func ProxyService(cr *apiv1alpha1.PerconaServerMySQL) *corev1.Service { + labels := MatchLabels(cr) + return &corev1.Service{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Service", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: ProxyServiceName(cr), + Namespace: cr.Namespace, + Labels: labels, + }, + Spec: corev1.ServiceSpec{ + Type: corev1.ServiceTypeClusterIP, + ClusterIP: "None", + Ports: servicePorts(cr), + Selector: labels, + PublishNotReadyAddresses: false, + }, + } +} + func PodService(cr *apiv1alpha1.PerconaServerMySQL, t corev1.ServiceType, podName string) *corev1.Service { expose := cr.Spec.MySQL.Expose From 15bebfbbaa90c334a1809a7efd44b905444a0b9f Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 1 Sep 2023 12:33:01 +0200 Subject: [PATCH 012/192] K8SPS-313 - Update images and versions for 0.6.0 release (#440) --- config/manager/kustomization.yaml | 7 +++++-- deploy/bundle.yaml | 2 +- deploy/cr.yaml | 22 +++++++++++----------- deploy/operator.yaml | 2 +- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 43d283c3e..f6b9895a1 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -11,6 +11,9 @@ configMapGenerator: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: +- name: percona/percona-server-mysql-operator + newName: percona/percona-server-mysql-operator + newTag: 0.6.0 - name: perconalab/percona-server-mysql-operator - newName: perconalab/percona-server-mysql-operator - newTag: main + newName: percona/percona-server-mysql-operator + newTag: 0.6.0 diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 480818ef5..6c16ea0db 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -9139,7 +9139,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.6.0 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 1f781f8b3..adf76401e 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -33,9 +33,9 @@ spec: mysql: clusterType: group-replication autoRecovery: true - image: perconalab/percona-server-mysql-operator:main-psmysql + image: percona/percona-server:8.0.33-25 imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.5.0 +# initImage: percona/percona-server-mysql-operator:0.6.0 size: 3 @@ -127,7 +127,7 @@ spec: size: 3 - image: perconalab/percona-server-mysql-operator:main-haproxy + image: percona/haproxy:2.8.1 imagePullPolicy: Always resources: @@ -221,9 +221,9 @@ spec: # - 10.0.0.0/8 router: enabled: false - image: perconalab/percona-server-mysql-operator:main-router + image: percona/percona-mysql-router:8.0.33 imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.5.0 +# initImage: percona/percona-server-mysql-operator:0.6.0 size: 3 @@ -267,10 +267,10 @@ spec: orchestrator: enabled: false - image: perconalab/percona-server-mysql-operator:main-orchestrator + image: percona/percona-orchestrator:3.2.6-9 imagePullPolicy: Always # serviceAccountName: percona-server-mysql-operator-orchestrator -# initImage: percona/percona-server-mysql-operator:0.5.0 +# initImage: percona/percona-server-mysql-operator:0.6.0 size: 3 @@ -313,7 +313,7 @@ spec: pmm: enabled: false - image: percona/pmm-client:2.36.0 + image: percona/pmm-client:2.39.0 imagePullPolicy: Always resources: @@ -329,9 +329,9 @@ spec: backup: enabled: true - image: perconalab/percona-server-mysql-operator:main-backup + image: percona/percona-xtrabackup:8.0.33-27 imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.5.0 +# initImage: percona/percona-server-mysql-operator:0.6.0 storages: s3-us-west: type: s3 @@ -375,7 +375,7 @@ spec: # prefix: "" toolkit: - image: perconalab/percona-server-mysql-operator:main-toolkit + image: percona/percona-server-mysql-operator:0.6.0-toolkit imagePullPolicy: Always # resources: # requests: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index a8de16608..f08b26a6a 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -47,7 +47,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.6.0 imagePullPolicy: Always livenessProbe: httpGet: From fd5390233ed31c2df2b3b9c53fab82f12155755a Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 1 Sep 2023 13:34:49 +0200 Subject: [PATCH 013/192] Update cert-manager version in E2E tests --- e2e-tests/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index fcee9bab0..2220a3f59 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -498,7 +498,7 @@ deploy_version_service() { deploy_cert_manager() { kubectl create namespace cert-manager || : kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true || : - kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml --validate=false || : 2>/dev/null + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.3/cert-manager.yaml --validate=false || : 2>/dev/null } get_primary_from_label() { From 0a75ba3fa9d06d20f04da1371a39f127fb232c20 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 1 Sep 2023 17:11:39 +0200 Subject: [PATCH 014/192] K8SPS-267 - Fix monitoring test to ignore pmm image --- e2e-tests/tests/monitoring/02-assert.yaml | 1 - e2e-tests/tests/monitoring/03-assert.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/e2e-tests/tests/monitoring/02-assert.yaml b/e2e-tests/tests/monitoring/02-assert.yaml index c8157412c..2ebeb2c96 100644 --- a/e2e-tests/tests/monitoring/02-assert.yaml +++ b/e2e-tests/tests/monitoring/02-assert.yaml @@ -228,7 +228,6 @@ spec: value: --query-source=perfschema - name: PMM_ADMIN_CUSTOM_PARAMS value: --listen-port=8404 - image: perconalab/pmm-client:dev-latest imagePullPolicy: Always ports: - containerPort: 7777 diff --git a/e2e-tests/tests/monitoring/03-assert.yaml b/e2e-tests/tests/monitoring/03-assert.yaml index ba64a6145..0d8982c96 100644 --- a/e2e-tests/tests/monitoring/03-assert.yaml +++ b/e2e-tests/tests/monitoring/03-assert.yaml @@ -227,7 +227,6 @@ spec: value: --query-source=perfschema - name: PMM_ADMIN_CUSTOM_PARAMS value: --listen-port=8404 - image: perconalab/pmm-client:dev-latest imagePullPolicy: Always ports: - containerPort: 7777 From e9092de3674c873beeba4716130209c99e5c95f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Mon, 4 Sep 2023 13:21:25 +0300 Subject: [PATCH 015/192] K8SPS-232: Fix restore in async cluster (#449) --- cmd/bootstrap/async_replication.go | 4 ++++ pkg/replicator/replicator.go | 6 ++++++ pkg/replicator/replicatorexec.go | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/cmd/bootstrap/async_replication.go b/cmd/bootstrap/async_replication.go index 4269912d3..25959293a 100644 --- a/cmd/bootstrap/async_replication.go +++ b/cmd/bootstrap/async_replication.go @@ -140,6 +140,10 @@ func bootstrapAsyncReplication(ctx context.Context) error { return nil } + if err := db.DisableSuperReadonly(ctx); err != nil { + return errors.Wrap(err, "disable super read only") + } + timer.Start("clone") log.Printf("Cloning from %s", donor) err = db.Clone(ctx, donor, string(apiv1alpha1.UserOperator), operatorPass, mysql.DefaultAdminPort) diff --git a/pkg/replicator/replicator.go b/pkg/replicator/replicator.go index b927e1d4d..435d3527c 100644 --- a/pkg/replicator/replicator.go +++ b/pkg/replicator/replicator.go @@ -43,6 +43,7 @@ type Replicator interface { ResetReplication(ctx context.Context) error ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error) EnableSuperReadonly(ctx context.Context) error + DisableSuperReadonly(ctx context.Context) error IsReadonly(ctx context.Context) (bool, error) ReportHost(ctx context.Context) (string, error) Close() error @@ -173,6 +174,11 @@ func (d *dbImpl) EnableSuperReadonly(ctx context.Context) error { return errors.Wrap(err, "set global super_read_only param to 1") } +func (d *dbImpl) DisableSuperReadonly(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "SET GLOBAL SUPER_READ_ONLY=0") + return errors.Wrap(err, "set global super_read_only param to 0") +} + func (d *dbImpl) IsReadonly(ctx context.Context) (bool, error) { var readonly int err := d.db.QueryRowContext(ctx, "select @@read_only and @@super_read_only").Scan(&readonly) diff --git a/pkg/replicator/replicatorexec.go b/pkg/replicator/replicatorexec.go index 9d9bd3523..46cb2ee03 100644 --- a/pkg/replicator/replicatorexec.go +++ b/pkg/replicator/replicatorexec.go @@ -162,6 +162,12 @@ func (d *dbImplExec) EnableSuperReadonly(ctx context.Context) error { return errors.Wrap(err, "set global super_read_only param to 1") } +func (d *dbImplExec) DisableSuperReadonly(ctx context.Context) error { + var errb, outb bytes.Buffer + err := d.exec(ctx, "SET GLOBAL SUPER_READ_ONLY=0", &outb, &errb) + return errors.Wrap(err, "set global super_read_only param to 0") +} + func (d *dbImplExec) IsReadonly(ctx context.Context) (bool, error) { rows := []*struct { Readonly int `csv:"readonly"` From b173d91e3117e75ce67879fc1ce93dfe96f22a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Mon, 4 Sep 2023 13:21:25 +0300 Subject: [PATCH 016/192] K8SPS-232: Fix restore in async cluster (#449) --- cmd/bootstrap/async_replication.go | 4 ++++ pkg/replicator/replicator.go | 6 ++++++ pkg/replicator/replicatorexec.go | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/cmd/bootstrap/async_replication.go b/cmd/bootstrap/async_replication.go index 4269912d3..25959293a 100644 --- a/cmd/bootstrap/async_replication.go +++ b/cmd/bootstrap/async_replication.go @@ -140,6 +140,10 @@ func bootstrapAsyncReplication(ctx context.Context) error { return nil } + if err := db.DisableSuperReadonly(ctx); err != nil { + return errors.Wrap(err, "disable super read only") + } + timer.Start("clone") log.Printf("Cloning from %s", donor) err = db.Clone(ctx, donor, string(apiv1alpha1.UserOperator), operatorPass, mysql.DefaultAdminPort) diff --git a/pkg/replicator/replicator.go b/pkg/replicator/replicator.go index b927e1d4d..435d3527c 100644 --- a/pkg/replicator/replicator.go +++ b/pkg/replicator/replicator.go @@ -43,6 +43,7 @@ type Replicator interface { ResetReplication(ctx context.Context) error ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error) EnableSuperReadonly(ctx context.Context) error + DisableSuperReadonly(ctx context.Context) error IsReadonly(ctx context.Context) (bool, error) ReportHost(ctx context.Context) (string, error) Close() error @@ -173,6 +174,11 @@ func (d *dbImpl) EnableSuperReadonly(ctx context.Context) error { return errors.Wrap(err, "set global super_read_only param to 1") } +func (d *dbImpl) DisableSuperReadonly(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "SET GLOBAL SUPER_READ_ONLY=0") + return errors.Wrap(err, "set global super_read_only param to 0") +} + func (d *dbImpl) IsReadonly(ctx context.Context) (bool, error) { var readonly int err := d.db.QueryRowContext(ctx, "select @@read_only and @@super_read_only").Scan(&readonly) diff --git a/pkg/replicator/replicatorexec.go b/pkg/replicator/replicatorexec.go index 9d9bd3523..46cb2ee03 100644 --- a/pkg/replicator/replicatorexec.go +++ b/pkg/replicator/replicatorexec.go @@ -162,6 +162,12 @@ func (d *dbImplExec) EnableSuperReadonly(ctx context.Context) error { return errors.Wrap(err, "set global super_read_only param to 1") } +func (d *dbImplExec) DisableSuperReadonly(ctx context.Context) error { + var errb, outb bytes.Buffer + err := d.exec(ctx, "SET GLOBAL SUPER_READ_ONLY=0", &outb, &errb) + return errors.Wrap(err, "set global super_read_only param to 0") +} + func (d *dbImplExec) IsReadonly(ctx context.Context) (bool, error) { rows := []*struct { Readonly int `csv:"readonly"` From 482db6c057621e62f6709de7dd360daba75e823c Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Mon, 4 Sep 2023 15:08:46 +0200 Subject: [PATCH 017/192] K8SPS-267 - Fix self-healing tests on Minikube --- e2e-tests/functions | 8 ++++++-- e2e-tests/tests/gr-self-healing/01-assert.yaml | 14 +------------- e2e-tests/tests/gr-self-healing/05-assert.yaml | 2 +- e2e-tests/tests/gr-self-healing/08-assert.yaml | 2 +- e2e-tests/tests/gr-self-healing/11-assert.yaml | 2 +- .../tests/operator-self-healing/01-assert.yaml | 14 +------------- 6 files changed, 11 insertions(+), 31 deletions(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 2220a3f59..9e94cec2c 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -158,7 +158,7 @@ get_cr() { | yq eval "$(printf '.spec.pmm.image="%s"' "${IMAGE_PMM}")" - \ | if [ -n "${MINIKUBE}" ]; then yq eval '(.. | select(has("antiAffinityTopologyKey")).antiAffinityTopologyKey) |= "none"' - \ - | yq eval '.spec.proxy.haproxy.resources.requests.cpu="400m"' - + | yq eval '.spec.proxy.haproxy.resources.requests.cpu="300m"' - else yq eval - fi @@ -566,7 +566,11 @@ deploy_chaos_mesh() { destroy_chaos_mesh helm repo add chaos-mesh https://charts.chaos-mesh.org - helm install chaos-mesh chaos-mesh/chaos-mesh --namespace=${NAMESPACE} --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock --set dashboard.create=false --version 2.5.1 + if [ -n "${MINIKUBE}" ]; then + helm install chaos-mesh chaos-mesh/chaos-mesh --namespace=${NAMESPACE} --set chaosDaemon.runtime=docker --set dashboard.create=false --version 2.5.1 + else + helm install chaos-mesh chaos-mesh/chaos-mesh --namespace=${NAMESPACE} --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock --set dashboard.create=false --version 2.5.1 + fi sleep 10 } diff --git a/e2e-tests/tests/gr-self-healing/01-assert.yaml b/e2e-tests/tests/gr-self-healing/01-assert.yaml index 9caa36184..253d7158f 100644 --- a/e2e-tests/tests/gr-self-healing/01-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/01-assert.yaml @@ -1,6 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 120 +timeout: 240 --- apiVersion: apps/v1 kind: Deployment @@ -13,15 +13,3 @@ status: readyReplicas: 3 replicas: 3 updatedReplicas: 3 ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: chaos-daemon -status: - currentNumberScheduled: 3 - desiredNumberScheduled: 3 - numberAvailable: 3 - numberMisscheduled: 0 - numberReady: 3 - updatedNumberScheduled: 3 diff --git a/e2e-tests/tests/gr-self-healing/05-assert.yaml b/e2e-tests/tests/gr-self-healing/05-assert.yaml index e107d4585..cb4289cf5 100644 --- a/e2e-tests/tests/gr-self-healing/05-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/05-assert.yaml @@ -1,6 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 120 +timeout: 180 --- kind: StatefulSet apiVersion: apps/v1 diff --git a/e2e-tests/tests/gr-self-healing/08-assert.yaml b/e2e-tests/tests/gr-self-healing/08-assert.yaml index eb55354ae..7206b894c 100644 --- a/e2e-tests/tests/gr-self-healing/08-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/08-assert.yaml @@ -1,6 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 120 +timeout: 180 --- kind: StatefulSet apiVersion: apps/v1 diff --git a/e2e-tests/tests/gr-self-healing/11-assert.yaml b/e2e-tests/tests/gr-self-healing/11-assert.yaml index 972daa107..7a197b77f 100644 --- a/e2e-tests/tests/gr-self-healing/11-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/11-assert.yaml @@ -1,6 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 120 +timeout: 180 --- kind: StatefulSet apiVersion: apps/v1 diff --git a/e2e-tests/tests/operator-self-healing/01-assert.yaml b/e2e-tests/tests/operator-self-healing/01-assert.yaml index 9caa36184..253d7158f 100644 --- a/e2e-tests/tests/operator-self-healing/01-assert.yaml +++ b/e2e-tests/tests/operator-self-healing/01-assert.yaml @@ -1,6 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 120 +timeout: 240 --- apiVersion: apps/v1 kind: Deployment @@ -13,15 +13,3 @@ status: readyReplicas: 3 replicas: 3 updatedReplicas: 3 ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: chaos-daemon -status: - currentNumberScheduled: 3 - desiredNumberScheduled: 3 - numberAvailable: 3 - numberMisscheduled: 0 - numberReady: 3 - updatedNumberScheduled: 3 From c0d31bb927b5d47e540169d62f4a097d0c89625a Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Mon, 4 Sep 2023 19:23:26 +0200 Subject: [PATCH 018/192] Fix password leak check to ignore namespace key --- e2e-tests/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 9e94cec2c..439f22cee 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -529,7 +529,7 @@ verify_certificate_sans() { } check_passwords_leak() { - local secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12")) | not) | .value') + local secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12") or test("namespace")) | not) | .value') local passwords="$(for i in $secrets; do base64 -d <<<$i echo From 93bafe7c48281c6b9ddb745c6a628a8ee6d873e0 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Wed, 6 Sep 2023 11:42:17 +0200 Subject: [PATCH 019/192] K8SPS-267 - Update main images and versions after 0.6.0 release (#452) This reverts commit 15bebfbbaa90c334a1809a7efd44b905444a0b9f. --- config/manager/kustomization.yaml | 7 ++----- deploy/bundle.yaml | 2 +- deploy/cr.yaml | 22 +++++++++++----------- deploy/operator.yaml | 2 +- pkg/version/version.go | 2 +- 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index f6b9895a1..43d283c3e 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -11,9 +11,6 @@ configMapGenerator: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: -- name: percona/percona-server-mysql-operator - newName: percona/percona-server-mysql-operator - newTag: 0.6.0 - name: perconalab/percona-server-mysql-operator - newName: percona/percona-server-mysql-operator - newTag: 0.6.0 + newName: perconalab/percona-server-mysql-operator + newTag: main diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 6c16ea0db..480818ef5 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -9139,7 +9139,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.6.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index adf76401e..10e19d6ab 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -8,7 +8,7 @@ metadata: spec: allowUnsafeConfigurations: false # pause: false - crVersion: 0.6.0 + crVersion: 0.7.0 secretsName: cluster1-secrets sslSecretName: cluster1-ssl updateStrategy: SmartUpdate @@ -33,9 +33,9 @@ spec: mysql: clusterType: group-replication autoRecovery: true - image: percona/percona-server:8.0.33-25 + image: perconalab/percona-server-mysql-operator:main-psmysql imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.6.0 +# initImage: percona/percona-server-mysql-operator:0.7.0 size: 3 @@ -127,7 +127,7 @@ spec: size: 3 - image: percona/haproxy:2.8.1 + image: perconalab/percona-server-mysql-operator:main-haproxy imagePullPolicy: Always resources: @@ -221,9 +221,9 @@ spec: # - 10.0.0.0/8 router: enabled: false - image: percona/percona-mysql-router:8.0.33 + image: perconalab/percona-server-mysql-operator:main-router imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.6.0 +# initImage: percona/percona-server-mysql-operator:0.7.0 size: 3 @@ -267,10 +267,10 @@ spec: orchestrator: enabled: false - image: percona/percona-orchestrator:3.2.6-9 + image: perconalab/percona-server-mysql-operator:main-orchestrator imagePullPolicy: Always # serviceAccountName: percona-server-mysql-operator-orchestrator -# initImage: percona/percona-server-mysql-operator:0.6.0 +# initImage: percona/percona-server-mysql-operator:0.7.0 size: 3 @@ -329,9 +329,9 @@ spec: backup: enabled: true - image: percona/percona-xtrabackup:8.0.33-27 + image: perconalab/percona-server-mysql-operator:main-backup imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.6.0 +# initImage: percona/percona-server-mysql-operator:0.7.0 storages: s3-us-west: type: s3 @@ -375,7 +375,7 @@ spec: # prefix: "" toolkit: - image: percona/percona-server-mysql-operator:0.6.0-toolkit + image: perconalab/percona-server-mysql-operator:main-toolkit imagePullPolicy: Always # resources: # requests: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index f08b26a6a..a8de16608 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -47,7 +47,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.6.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/pkg/version/version.go b/pkg/version/version.go index 6cc887286..2c0474fa8 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.6.0" +const Version = "0.7.0" From 426aaab7f65eda8a71b322e3e3626aef5345ebd4 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Sun, 1 Oct 2023 15:05:37 +0300 Subject: [PATCH 020/192] CLOUD-727 set day and time for all packages (#453) --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 711509e4a..c1fd22775 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,8 @@ updates: directory: / schedule: interval: monthly + day: "wednesday" + time: "01:00" reviewers: - hors - egegunes @@ -41,3 +43,5 @@ updates: - "dependencies" schedule: interval: monthly + day: "wednesday" + time: "01:00" From 952655048a7fe3ba1bd263a6bc5084df49d52ff0 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:59:50 +0300 Subject: [PATCH 021/192] CLOUD-789-2 - splitting local variable declaration from assingning value for best practices (#465) --- e2e-tests/functions | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 439f22cee..e4eeea773 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -529,22 +529,29 @@ verify_certificate_sans() { } check_passwords_leak() { - local secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12") or test("namespace")) | not) | .value') - local passwords="$(for i in $secrets; do + local secrets + local passwords + local pods + + secrets=$(kubectl get secrets -o json | jq -r '.items[].data | to_entries | .[] | select(.key | (endswith(".crt") or endswith(".key") or endswith(".pub") or endswith(".pem") or endswith(".p12") or test("namespace")) | not) | .value') + passwords="$(for i in $secrets; do base64 -d <<<$i echo done) $secrets" - local pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') + pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') collect_logs() { + local containers + local count + NS=$1 for p in $pods; do - local containers=$(kubectl -n "$NS" get pod $p -o jsonpath='{.spec.containers[*].name}') + containers=$(kubectl -n "$NS" get pod $p -o jsonpath='{.spec.containers[*].name}') for c in $containers; do kubectl -n "$NS" logs $p -c $c >${TEMP_DIR}/logs_output-$p-$c.txt echo logs saved in: ${TEMP_DIR}/logs_output-$p-$c.txt for pass in $passwords; do - local count=$(grep -c --fixed-strings -- "$pass" ${TEMP_DIR}/logs_output-$p-$c.txt || :) + count=$(grep -c --fixed-strings -- "$pass" ${TEMP_DIR}/logs_output-$p-$c.txt || :) if [[ $count != 0 ]]; then echo leaked passwords are found in log ${TEMP_DIR}/logs_output-$p-$c.txt false @@ -557,7 +564,7 @@ check_passwords_leak() { collect_logs $NAMESPACE if [ -n "$OPERATOR_NS" ]; then - local pods=$(kubectl -n "${OPERATOR_NS}" get pods -o name | awk -F "/" '{print $2}') + pods=$(kubectl -n "${OPERATOR_NS}" get pods -o name | awk -F "/" '{print $2}') collect_logs $OPERATOR_NS fi } From eb1aa02e6e8756b21887c0dbba8f76400f0ef0c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:12:39 +0300 Subject: [PATCH 022/192] CLOUD-727: Bump golang.org/x/net from 0.12.0 to 0.17.0 (#468) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.12.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 9635ced52..3c134ee1c 100644 --- a/go.mod +++ b/go.mod @@ -105,12 +105,12 @@ require ( go.opentelemetry.io/otel/trace v1.15.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index 50f93bd63..66777b4d5 100644 --- a/go.sum +++ b/go.sum @@ -476,8 +476,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -548,8 +548,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= 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= @@ -621,11 +621,11 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -635,8 +635,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 7f41996a4f5b4ac1253e7672dc19eee4fbff2f51 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Mon, 16 Oct 2023 13:02:37 +0200 Subject: [PATCH 023/192] Prune codeowners for github (#467) --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c4d46f46f..b4445512f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ * @hors @egegunes @inelpandzic @pooknull -/e2e-tests/ @tplavcic @nmarukovich @cap1984 -Jenkinsfile @tplavcic @nmarukovich @cap1984 +/e2e-tests/ @tplavcic @nmarukovich @ptankov +Jenkinsfile @tplavcic @nmarukovich @ptankov From 5f6fda465d967b4287e8d420ba324739d74e03b5 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:33:01 +0300 Subject: [PATCH 024/192] CLOUD-808 Fix PMM server deployment in tests (#469) * Fix PMM server deployment in tests * Update e2e-tests/functions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * date is never used * reverting removal of $date, it is actually used * spaces to tabs * pgrep command doesn't exist in the latest pmm docker image - workaround --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- e2e-tests/functions | 30 ++++++++++++------------------ e2e-tests/vars.sh | 5 ++--- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index e4eeea773..2373cb514 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -35,24 +35,18 @@ apply_s3_storage_secrets() { } deploy_pmm_server() { - local platform=kubernetes - if [ -n "${OPENSHIFT}" ]; then - platform=openshift - oc create sa pmm-server -n "${NAMESPACE}" || : - oc adm policy add-scc-to-user privileged -z pmm-server -n "${NAMESPACE}" || : - oc create rolebinding pmm-ps-operator-namespace-only --role percona-server-for-mysql-operator-role --serviceaccount=${NAMESPACE}:pmm-server -n "${NAMESPACE}" || : - oc patch role/percona-server-for-mysql-operator-role --type json -p='[{"op":"add","path": "/rules/-","value":{"apiGroups":["security.openshift.io"],"resources":["securitycontextconstraints"],"verbs":["use"],"resourceNames":["privileged"]}}]' -n "${NAMESPACE}" || : - helm install monitoring --set imageTag=$IMAGE_PMM_SERVER_TAG --set imageRepo=$IMAGE_PMM_SERVER_REPO --set platform=$platform --set sa=pmm-server --set supresshttp2=false https://percona-charts.storage.googleapis.com/pmm-server-${PMM_SERVER_VERSION}.tgz -n "${NAMESPACE}" - else - helm install monitoring \ - -n "${NAMESPACE}" \ - --set imageTag=$IMAGE_PMM_SERVER_TAG \ - --set imageRepo=$IMAGE_PMM_SERVER_REPO \ - --set platform="${platform}" \ - "https://percona-charts.storage.googleapis.com/pmm-server-${PMM_SERVER_VERSION}.tgz" + if [[ $OPENSHIFT ]]; then + oc create sa pmm-server -n $NAMESPACE || : + oc adm policy add-scc-to-user privileged -z pmm-server -n $NAMESPACE || : + oc create rolebinding pmm-ps-operator-namespace-only --role percona-server-for-mysql-operator-role --serviceaccount=$NAMESPACE:pmm-server -n $NAMESPACE || : + oc patch role/percona-server-for-mysql-operator-role --type json -p='[{"op":"add","path": "/rules/-","value":{"apiGroups":["security.openshift.io"],"resources":["securitycontextconstraints"],"verbs":["use"],"resourceNames":["privileged"]}}]' -n $NAMESPACE || : + + local additional_params="--set platform=openshift --set sa=pmm-server --set supresshttp2=false" fi - local SERVICE="postgres" - until kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "pgrep -x $SERVICE >/dev/null"; do + + helm install monitoring -n $NAMESPACE --set imageTag=${IMAGE_PMM_SERVER#*:} --set imageRepo=${IMAGE_PMM_SERVER%:*} $additional_params https://percona-charts.storage.googleapis.com/pmm-server-$PMM_SERVER_VERSION.tgz + + until kubectl -n $NAMESPACE exec monitoring-0 -- bash -c "ls -l /proc/*/exe 2>/dev/null| grep postgres >/dev/null"; do echo "Retry $retry" sleep 5 let retry+=1 @@ -155,7 +149,7 @@ get_cr() { | yq eval "$(printf '.spec.proxy.router.image="%s"' "${IMAGE_ROUTER}")" - \ | yq eval "$(printf '.spec.toolkit.image="%s"' "${IMAGE_TOOLKIT}")" - \ | yq eval "$(printf '.spec.proxy.haproxy.image="%s"' "${IMAGE_HAPROXY}")" - \ - | yq eval "$(printf '.spec.pmm.image="%s"' "${IMAGE_PMM}")" - \ + | yq eval "$(printf '.spec.pmm.image="%s"' "${IMAGE_PMM_CLIENT}")" - \ | if [ -n "${MINIKUBE}" ]; then yq eval '(.. | select(has("antiAffinityTopologyKey")).antiAffinityTopologyKey) |= "none"' - \ | yq eval '.spec.proxy.haproxy.resources.requests.cpu="300m"' - diff --git a/e2e-tests/vars.sh b/e2e-tests/vars.sh index b65f83304..d33aaaaa5 100644 --- a/e2e-tests/vars.sh +++ b/e2e-tests/vars.sh @@ -17,10 +17,9 @@ export IMAGE_ORCHESTRATOR=${IMAGE_ORCHESTRATOR:-"perconalab/percona-server-mysql export IMAGE_ROUTER=${IMAGE_ROUTER:-"perconalab/percona-server-mysql-operator:main-router"} export IMAGE_TOOLKIT=${IMAGE_TOOLKIT:-"perconalab/percona-server-mysql-operator:main-toolkit"} export IMAGE_HAPROXY=${IMAGE_HAPROXY:-"perconalab/percona-server-mysql-operator:main-haproxy"} -export IMAGE_PMM=${IMAGE_PMM:-"perconalab/pmm-client:dev-latest"} export PMM_SERVER_VERSION=${PMM_SERVER_VERSION:-"9.9.9"} -export IMAGE_PMM_SERVER_REPO=${IMAGE_PMM_SERVER_REPO:-"perconalab/pmm-server"} -export IMAGE_PMM_SERVER_TAG=${IMAGE_PMM_SERVER_TAG:-"dev-latest"} +export IMAGE_PMM_CLIENT=${IMAGE_PMM_CLIENT:-"perconalab/pmm-client:dev-latest"} +export IMAGE_PMM_SERVER=${IMAGE_PMM_SERVER:-"perconalab/pmm-server:dev-latest"} date=$(which gdate || which date) From aaf81a5357b37669141ad840dbdf603d3c7f3f76 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Thu, 26 Oct 2023 15:39:57 +0300 Subject: [PATCH 025/192] Move from Kubernetes Platfrom v 1.14 to v 1.25 for all operator test cases (#471) --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a78db1202..d4c5657c0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ void createCluster(String CLUSTER_SUFFIX, String SUBNETWORK = CLUSTER_SUFFIX) { gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE gcloud config set project $GCP_PROJECT gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $GKERegion --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $GKERegion --quiet || true - gcloud container clusters create --zone $GKERegion $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.24 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ + gcloud container clusters create --zone $GKERegion $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.25 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user jenkins@"$GCP_PROJECT".iam.gserviceaccount.com || ret_val=\$? if [ \${ret_val} -eq 0 ]; then break; fi ret_num=\$((ret_num + 1)) From ae452394b6500ec32b5d3baa31732c220a91fc45 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:50:24 +0200 Subject: [PATCH 026/192] CLOUD-815 Fix PGO Jenkins pipeline which is being run upon PR (#480) --- Jenkinsfile | 91 +++++++++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 52 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d4c5657c0..8a1740c53 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -GKERegion="us-central1-a" +region="us-central1-a" testUrlPrefix="https://percona-jenkins-artifactory-public.s3.amazonaws.com/cloud-ps-operator" tests=[] @@ -7,21 +7,19 @@ void createCluster(String CLUSTER_SUFFIX, String SUBNETWORK = CLUSTER_SUFFIX) { sh """ NODES_NUM=3 export KUBECONFIG=/tmp/$CLUSTER_NAME-${CLUSTER_SUFFIX} - export USE_GKE_GCLOUD_AUTH_PLUGIN=True - source $HOME/google-cloud-sdk/path.bash.inc ret_num=0 while [ \${ret_num} -lt 15 ]; do ret_val=0 gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE gcloud config set project $GCP_PROJECT - gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $GKERegion --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $GKERegion --quiet || true - gcloud container clusters create --zone $GKERegion $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.25 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ + gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $region --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $region --quiet || true + gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.25 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user jenkins@"$GCP_PROJECT".iam.gserviceaccount.com || ret_val=\$? if [ \${ret_val} -eq 0 ]; then break; fi ret_num=\$((ret_num + 1)) done if [ \${ret_num} -eq 15 ]; then - gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $GKERegion --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $GKERegion --quiet || true + gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $region --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $region --quiet || true exit 1 fi """ @@ -32,8 +30,6 @@ void shutdownCluster(String CLUSTER_SUFFIX) { withCredentials([string(credentialsId: 'GCP_PROJECT_ID', variable: 'GCP_PROJECT'), file(credentialsId: 'gcloud-key-file', variable: 'CLIENT_SECRET_FILE')]) { sh """ export KUBECONFIG=/tmp/$CLUSTER_NAME-${CLUSTER_SUFFIX} - export USE_GKE_GCLOUD_AUTH_PLUGIN=True - source $HOME/google-cloud-sdk/path.bash.inc gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE gcloud config set project $GCP_PROJECT for namespace in \$(kubectl get namespaces --no-headers | awk '{print \$1}' | grep -vE "^kube-|^openshift" | sed '/-operator/ s/^/1-/' | sort | sed 's/^1-//'); do @@ -45,7 +41,7 @@ void shutdownCluster(String CLUSTER_SUFFIX) { kubectl delete pods --all -n \$namespace --force --grace-period=0 || true done kubectl get svc --all-namespaces || true - gcloud container clusters delete --zone $GKERegion $CLUSTER_NAME-${CLUSTER_SUFFIX} + gcloud container clusters delete --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} """ } } @@ -53,9 +49,7 @@ void shutdownCluster(String CLUSTER_SUFFIX) { void deleteOldClusters(String FILTER) { withCredentials([string(credentialsId: 'GCP_PROJECT_ID', variable: 'GCP_PROJECT'), file(credentialsId: 'gcloud-key-file', variable: 'CLIENT_SECRET_FILE')]) { sh """ - if [ -f $HOME/google-cloud-sdk/path.bash.inc ]; then - export USE_GKE_GCLOUD_AUTH_PLUGIN=True - source $HOME/google-cloud-sdk/path.bash.inc + if gcloud --version > /dev/null 2>&1; then gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE gcloud config set project $GCP_PROJECT for GKE_CLUSTER in \$(gcloud container clusters list --format='csv[no-heading](name)' --filter="$FILTER"); do @@ -71,7 +65,7 @@ void deleteOldClusters(String FILTER) { break fi done - gcloud container clusters delete --async --zone $GKERegion --quiet \$GKE_CLUSTER || true + gcloud container clusters delete --async --zone $region --quiet \$GKE_CLUSTER || true done fi """ @@ -207,8 +201,7 @@ void runTest(Integer TEST_ID) { mkdir "e2e-tests/logs" fi export KUBECONFIG=/tmp/$CLUSTER_NAME-$clusterSuffix - export PATH="$HOME/.krew/bin:$PATH" - source $HOME/google-cloud-sdk/path.bash.inc + export PATH="\${KREW_ROOT:-\$HOME/.krew}/bin:\$PATH" set -o pipefail kubectl kuttl test --config ./e2e-tests/kuttl.yaml --test "^${testName}\$" |& tee e2e-tests/logs/${testName}.log """ @@ -237,46 +230,41 @@ void runTest(Integer TEST_ID) { } void prepareNode() { - sh ''' - sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm || true - sudo percona-release enable-only tools - sudo yum install -y percona-xtrabackup-80 | true - ''' - - sh ''' - if [ ! -d $HOME/google-cloud-sdk/bin ]; then - rm -rf $HOME/google-cloud-sdk - curl https://sdk.cloud.google.com | bash - fi - source $HOME/google-cloud-sdk/path.bash.inc - gcloud components install alpha - gcloud components install kubectl - curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash - curl -s -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz \ - | sudo tar -C /usr/local/bin --strip-components 1 --wildcards -zxvpf - '*/oc' - curl -s -L https://github.com/mitchellh/golicense/releases/latest/download/golicense_0.2.0_linux_x86_64.tar.gz \ - | sudo tar -C /usr/local/bin --wildcards -zxvpf - - - sudo sh -c "curl -s -L https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 > /usr/local/bin/yq" + sh """ + sudo curl -s -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/\$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl && sudo chmod +x /usr/local/bin/kubectl + kubectl version --client --output=yaml + + curl -fsSL https://get.helm.sh/helm-v3.12.3-linux-amd64.tar.gz | sudo tar -C /usr/local/bin --strip-components 1 -xzf - linux-amd64/helm + + sudo sh -c "curl -s -L https://github.com/mikefarah/yq/releases/download/v4.35.1/yq_linux_amd64 > /usr/local/bin/yq" sudo chmod +x /usr/local/bin/yq - sudo sh -c "curl -s -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 > /usr/local/bin/jq" + + sudo sh -c "curl -s -L https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 > /usr/local/bin/jq" sudo chmod +x /usr/local/bin/jq - cd "$(mktemp -d)" - OS="$(uname | tr '[:upper:]' '[:lower:]')" - ARCH="$(uname -m | sed -e 's/x86_64/amd64/')" - KREW="krew-${OS}_${ARCH}" - curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/v0.4.3/${KREW}.tar.gz" - tar zxvf "${KREW}.tar.gz" - ./"${KREW}" install krew - rm -f "${KREW}.tar.gz" - export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" + curl -fsSL https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz | tar -xzf - + ./krew-linux_amd64 install krew + export PATH="\${KREW_ROOT:-\$HOME/.krew}/bin:\$PATH" + + kubectl krew install assert # v0.15.0 kuttl version kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/a67f31ecb2e62f15149ca66d096357050f07b77d/plugins/kuttl.yaml - printf "%s is installed" "$(kubectl kuttl --version)" - kubectl krew install assert - ''' + echo \$(kubectl kuttl --version) is installed + + sudo tee /etc/yum.repos.d/google-cloud-sdk.repo << EOF +[google-cloud-cli] +name=Google Cloud CLI +baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64 +enabled=1 +gpgcheck=1 +repo_gpgcheck=0 +gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg +EOF + sudo yum install -y google-cloud-cli google-cloud-cli-gke-gcloud-auth-plugin + + curl -sL https://github.com/mitchellh/golicense/releases/latest/download/golicense_0.2.0_linux_x86_64.tar.gz | sudo tar -C /usr/local/bin -xzf - golicense + """ } def skipBranchBuilds = true @@ -570,9 +558,8 @@ pipeline { } deleteOldClusters("$CLUSTER_NAME") sh """ - sudo docker system prune -fa - sudo rm -rf ./* - sudo rm -rf $HOME/google-cloud-sdk + sudo docker system prune --volumes -af + sudo rm -rf * """ deleteDir() } From 4e80b43b570b5f232c2fa4df41c44805733b27f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:51:39 +0200 Subject: [PATCH 027/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.11.2 to 0.13.1 (#473) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.11.2 to 0.13.1. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.11.2...0.13.1) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index d2d443169..173158d06 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -14,7 +14,7 @@ jobs: export DOCKER_SQUASH=0 ./e2e-tests/build - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.11.2 + uses: aquasecurity/trivy-action@0.13.1 with: image-ref: 'docker.io/perconalab/percona-server-mysql-operator:${{ github.sha }}' format: 'table' From 2980c1b34bf9bbeef37c773961ef05ba0e4860be Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 24 Nov 2023 12:34:27 +0100 Subject: [PATCH 028/192] K8SPS-322 - fix TEMP_DIR in E2E tests, change drop-finalizer step to have 99- prefix in all tests --- e2e-tests/functions | 7 ++++++- .../tests/async-ignore-annotations/00-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/auto-config/00-deploy-operator.yaml | 1 + .../{12-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/config-router/00-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/config/00-deploy-operator.yaml | 1 + .../{09-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/demand-backup/01-deploy-operator.yaml | 1 + .../{27-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 .../tests/gr-demand-backup-haproxy/01-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml | 1 + .../{20-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-haproxy/00-deploy-operator.yaml | 1 + .../{05-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 .../tests/gr-ignore-annotations/00-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-init-deploy/00-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-one-pod/00-deploy-operator.yaml | 1 + .../{07-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-recreate/00-deploy-operator.yaml | 1 + .../{11-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-scaling/00-deploy-operator.yaml | 1 + .../{11-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml | 1 + .../{18-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 .../tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml | 1 + .../{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/gr-users/00-deploy-operator.yaml | 1 + .../{05-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/haproxy/00-deploy-operator.yaml | 1 + .../{10-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/init-deploy/00-deploy-operator.yaml | 1 + .../{07-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/limits/00-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/monitoring/00-deploy-operator.yaml | 1 + .../{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/one-pod/00-deploy-operator.yaml | 1 + .../{07-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 .../tests/operator-self-healing/00-deploy-operator.yaml | 1 + .../{12-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/recreate/00-deploy-operator.yaml | 1 + .../{11-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/scaling/00-deploy-operator.yaml | 1 + .../{09-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/service-per-pod/00-deploy-operator.yaml | 1 + .../{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/sidecars/00-deploy-operator.yaml | 3 ++- .../{02-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/smart-update/00-deploy-operator.yaml | 1 + .../{03-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 .../tests/tls-cert-manager/00-deploy-cert-manager.yaml | 1 + .../{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/users/00-deploy-operator.yaml | 1 + .../{05-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/tests/version-service/00-deploy-operator.yaml | 1 + .../{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} | 0 e2e-tests/vars.sh | 2 +- 62 files changed, 38 insertions(+), 3 deletions(-) rename e2e-tests/tests/async-ignore-annotations/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/auto-config/{12-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/config-router/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/config/{09-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/demand-backup/{27-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-demand-backup-haproxy/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-demand-backup/{20-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-haproxy/{05-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-ignore-annotations/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-init-deploy/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-one-pod/{07-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-recreate/{11-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-scaling/{11-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-self-healing/{18-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-tls-cert-manager/{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/gr-users/{05-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/haproxy/{10-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/init-deploy/{07-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/limits/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/monitoring/{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/one-pod/{07-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/operator-self-healing/{12-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/recreate/{11-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/scaling/{09-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/service-per-pod/{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/sidecars/{02-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/smart-update/{03-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/tls-cert-manager/{06-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/users/{05-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) rename e2e-tests/tests/version-service/{08-drop-finalizer.yaml => 99-drop-finalizer.yaml} (100%) diff --git a/e2e-tests/functions b/e2e-tests/functions index 2373cb514..4b05966cc 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -2,8 +2,13 @@ # set root repo relatively to a test dir ROOT_REPO=${ROOT_REPO:-$(realpath ../../..)} -source "${ROOT_REPO}/e2e-tests/vars.sh" test_name=$(basename "$(pwd)") +source "${ROOT_REPO}/e2e-tests/vars.sh" + +init_temp_dir() { + rm -rf "$TEMP_DIR" + mkdir -p "$TEMP_DIR" +} deploy_operator() { kubectl -n "${NAMESPACE}" apply --server-side --force-conflicts -f "${DEPLOY_DIR}/crd.yaml" diff --git a/e2e-tests/tests/async-ignore-annotations/00-deploy-operator.yaml b/e2e-tests/tests/async-ignore-annotations/00-deploy-operator.yaml index 8ef7d38ee..1aaca58be 100644 --- a/e2e-tests/tests/async-ignore-annotations/00-deploy-operator.yaml +++ b/e2e-tests/tests/async-ignore-annotations/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_client diff --git a/e2e-tests/tests/async-ignore-annotations/08-drop-finalizer.yaml b/e2e-tests/tests/async-ignore-annotations/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/async-ignore-annotations/08-drop-finalizer.yaml rename to e2e-tests/tests/async-ignore-annotations/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/auto-config/00-deploy-operator.yaml b/e2e-tests/tests/auto-config/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/auto-config/00-deploy-operator.yaml +++ b/e2e-tests/tests/auto-config/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/auto-config/12-drop-finalizer.yaml b/e2e-tests/tests/auto-config/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/auto-config/12-drop-finalizer.yaml rename to e2e-tests/tests/auto-config/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/config-router/00-deploy-operator.yaml b/e2e-tests/tests/config-router/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/config-router/00-deploy-operator.yaml +++ b/e2e-tests/tests/config-router/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/config-router/08-drop-finalizer.yaml b/e2e-tests/tests/config-router/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/config-router/08-drop-finalizer.yaml rename to e2e-tests/tests/config-router/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/config/00-deploy-operator.yaml b/e2e-tests/tests/config/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/config/00-deploy-operator.yaml +++ b/e2e-tests/tests/config/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/config/09-drop-finalizer.yaml b/e2e-tests/tests/config/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/config/09-drop-finalizer.yaml rename to e2e-tests/tests/config/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/demand-backup/01-deploy-operator.yaml b/e2e-tests/tests/demand-backup/01-deploy-operator.yaml index 9013071f6..cb9e3c5ab 100644 --- a/e2e-tests/tests/demand-backup/01-deploy-operator.yaml +++ b/e2e-tests/tests/demand-backup/01-deploy-operator.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" deploy_operator diff --git a/e2e-tests/tests/demand-backup/27-drop-finalizer.yaml b/e2e-tests/tests/demand-backup/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/demand-backup/27-drop-finalizer.yaml rename to e2e-tests/tests/demand-backup/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml index d02bc8b9d..6ace7783f 100644 --- a/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml +++ b/e2e-tests/tests/gr-demand-backup-haproxy/01-deploy-operator.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/08-drop-finalizer.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-demand-backup-haproxy/08-drop-finalizer.yaml rename to e2e-tests/tests/gr-demand-backup-haproxy/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml b/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml index 9013071f6..cb9e3c5ab 100644 --- a/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml +++ b/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" deploy_operator diff --git a/e2e-tests/tests/gr-demand-backup/20-drop-finalizer.yaml b/e2e-tests/tests/gr-demand-backup/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-demand-backup/20-drop-finalizer.yaml rename to e2e-tests/tests/gr-demand-backup/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-haproxy/00-deploy-operator.yaml b/e2e-tests/tests/gr-haproxy/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/gr-haproxy/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-haproxy/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-haproxy/05-drop-finalizer.yaml b/e2e-tests/tests/gr-haproxy/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-haproxy/05-drop-finalizer.yaml rename to e2e-tests/tests/gr-haproxy/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-ignore-annotations/00-deploy-operator.yaml b/e2e-tests/tests/gr-ignore-annotations/00-deploy-operator.yaml index 8ef7d38ee..1aaca58be 100644 --- a/e2e-tests/tests/gr-ignore-annotations/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_client diff --git a/e2e-tests/tests/gr-ignore-annotations/08-drop-finalizer.yaml b/e2e-tests/tests/gr-ignore-annotations/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-ignore-annotations/08-drop-finalizer.yaml rename to e2e-tests/tests/gr-ignore-annotations/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-init-deploy/00-deploy-operator.yaml b/e2e-tests/tests/gr-init-deploy/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/gr-init-deploy/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-init-deploy/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-init-deploy/08-drop-finalizer.yaml b/e2e-tests/tests/gr-init-deploy/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-init-deploy/08-drop-finalizer.yaml rename to e2e-tests/tests/gr-init-deploy/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-one-pod/00-deploy-operator.yaml b/e2e-tests/tests/gr-one-pod/00-deploy-operator.yaml index e4d333154..273c0cc4c 100644 --- a/e2e-tests/tests/gr-one-pod/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-one-pod/00-deploy-operator.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep apply_s3_storage_secrets deploy_operator diff --git a/e2e-tests/tests/gr-one-pod/07-drop-finalizer.yaml b/e2e-tests/tests/gr-one-pod/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-one-pod/07-drop-finalizer.yaml rename to e2e-tests/tests/gr-one-pod/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-recreate/00-deploy-operator.yaml b/e2e-tests/tests/gr-recreate/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/gr-recreate/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-recreate/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-recreate/11-drop-finalizer.yaml b/e2e-tests/tests/gr-recreate/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-recreate/11-drop-finalizer.yaml rename to e2e-tests/tests/gr-recreate/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-scaling/00-deploy-operator.yaml b/e2e-tests/tests/gr-scaling/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/gr-scaling/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-scaling/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-scaling/11-drop-finalizer.yaml b/e2e-tests/tests/gr-scaling/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/11-drop-finalizer.yaml rename to e2e-tests/tests/gr-scaling/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml b/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-self-healing/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-self-healing/18-drop-finalizer.yaml b/e2e-tests/tests/gr-self-healing/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-self-healing/18-drop-finalizer.yaml rename to e2e-tests/tests/gr-self-healing/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml b/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml index aa8590cca..fc26fff09 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_cert_manager diff --git a/e2e-tests/tests/gr-tls-cert-manager/06-drop-finalizer.yaml b/e2e-tests/tests/gr-tls-cert-manager/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-tls-cert-manager/06-drop-finalizer.yaml rename to e2e-tests/tests/gr-tls-cert-manager/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-users/00-deploy-operator.yaml b/e2e-tests/tests/gr-users/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/gr-users/00-deploy-operator.yaml +++ b/e2e-tests/tests/gr-users/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-users/05-drop-finalizer.yaml b/e2e-tests/tests/gr-users/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-users/05-drop-finalizer.yaml rename to e2e-tests/tests/gr-users/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/haproxy/00-deploy-operator.yaml b/e2e-tests/tests/haproxy/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/haproxy/00-deploy-operator.yaml +++ b/e2e-tests/tests/haproxy/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/haproxy/10-drop-finalizer.yaml b/e2e-tests/tests/haproxy/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/haproxy/10-drop-finalizer.yaml rename to e2e-tests/tests/haproxy/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/init-deploy/00-deploy-operator.yaml b/e2e-tests/tests/init-deploy/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/init-deploy/00-deploy-operator.yaml +++ b/e2e-tests/tests/init-deploy/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/init-deploy/07-drop-finalizer.yaml b/e2e-tests/tests/init-deploy/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/init-deploy/07-drop-finalizer.yaml rename to e2e-tests/tests/init-deploy/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/limits/00-deploy-operator.yaml b/e2e-tests/tests/limits/00-deploy-operator.yaml index 7f38a55bb..b4c10659e 100644 --- a/e2e-tests/tests/limits/00-deploy-operator.yaml +++ b/e2e-tests/tests/limits/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/limits/08-drop-finalizer.yaml b/e2e-tests/tests/limits/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/limits/08-drop-finalizer.yaml rename to e2e-tests/tests/limits/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/monitoring/00-deploy-operator.yaml b/e2e-tests/tests/monitoring/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/monitoring/00-deploy-operator.yaml +++ b/e2e-tests/tests/monitoring/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/monitoring/06-drop-finalizer.yaml b/e2e-tests/tests/monitoring/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/monitoring/06-drop-finalizer.yaml rename to e2e-tests/tests/monitoring/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/one-pod/00-deploy-operator.yaml b/e2e-tests/tests/one-pod/00-deploy-operator.yaml index e4d333154..273c0cc4c 100644 --- a/e2e-tests/tests/one-pod/00-deploy-operator.yaml +++ b/e2e-tests/tests/one-pod/00-deploy-operator.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep apply_s3_storage_secrets deploy_operator diff --git a/e2e-tests/tests/one-pod/07-drop-finalizer.yaml b/e2e-tests/tests/one-pod/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/one-pod/07-drop-finalizer.yaml rename to e2e-tests/tests/one-pod/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml b/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml +++ b/e2e-tests/tests/operator-self-healing/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/operator-self-healing/12-drop-finalizer.yaml b/e2e-tests/tests/operator-self-healing/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/operator-self-healing/12-drop-finalizer.yaml rename to e2e-tests/tests/operator-self-healing/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/recreate/00-deploy-operator.yaml b/e2e-tests/tests/recreate/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/recreate/00-deploy-operator.yaml +++ b/e2e-tests/tests/recreate/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/recreate/11-drop-finalizer.yaml b/e2e-tests/tests/recreate/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/recreate/11-drop-finalizer.yaml rename to e2e-tests/tests/recreate/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/scaling/00-deploy-operator.yaml b/e2e-tests/tests/scaling/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/scaling/00-deploy-operator.yaml +++ b/e2e-tests/tests/scaling/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/scaling/09-drop-finalizer.yaml b/e2e-tests/tests/scaling/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/scaling/09-drop-finalizer.yaml rename to e2e-tests/tests/scaling/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/service-per-pod/00-deploy-operator.yaml b/e2e-tests/tests/service-per-pod/00-deploy-operator.yaml index 6b8bc91c9..724f3af88 100644 --- a/e2e-tests/tests/service-per-pod/00-deploy-operator.yaml +++ b/e2e-tests/tests/service-per-pod/00-deploy-operator.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/service-per-pod/06-drop-finalizer.yaml b/e2e-tests/tests/service-per-pod/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/service-per-pod/06-drop-finalizer.yaml rename to e2e-tests/tests/service-per-pod/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/sidecars/00-deploy-operator.yaml b/e2e-tests/tests/sidecars/00-deploy-operator.yaml index e645a924f..4a03710b9 100644 --- a/e2e-tests/tests/sidecars/00-deploy-operator.yaml +++ b/e2e-tests/tests/sidecars/00-deploy-operator.yaml @@ -7,8 +7,9 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets - \ No newline at end of file + diff --git a/e2e-tests/tests/sidecars/02-drop-finalizer.yaml b/e2e-tests/tests/sidecars/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/sidecars/02-drop-finalizer.yaml rename to e2e-tests/tests/sidecars/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/smart-update/00-deploy-operator.yaml b/e2e-tests/tests/smart-update/00-deploy-operator.yaml index e2836b436..5d116a602 100644 --- a/e2e-tests/tests/smart-update/00-deploy-operator.yaml +++ b/e2e-tests/tests/smart-update/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/smart-update/03-drop-finalizer.yaml b/e2e-tests/tests/smart-update/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/smart-update/03-drop-finalizer.yaml rename to e2e-tests/tests/smart-update/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml b/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml index aa8590cca..fc26fff09 100644 --- a/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml +++ b/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml @@ -6,6 +6,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_cert_manager diff --git a/e2e-tests/tests/tls-cert-manager/06-drop-finalizer.yaml b/e2e-tests/tests/tls-cert-manager/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/tls-cert-manager/06-drop-finalizer.yaml rename to e2e-tests/tests/tls-cert-manager/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/users/00-deploy-operator.yaml b/e2e-tests/tests/users/00-deploy-operator.yaml index 67307fe5d..755246211 100644 --- a/e2e-tests/tests/users/00-deploy-operator.yaml +++ b/e2e-tests/tests/users/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/users/05-drop-finalizer.yaml b/e2e-tests/tests/users/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/users/05-drop-finalizer.yaml rename to e2e-tests/tests/users/99-drop-finalizer.yaml diff --git a/e2e-tests/tests/version-service/00-deploy-operator.yaml b/e2e-tests/tests/version-service/00-deploy-operator.yaml index e2836b436..5d116a602 100644 --- a/e2e-tests/tests/version-service/00-deploy-operator.yaml +++ b/e2e-tests/tests/version-service/00-deploy-operator.yaml @@ -7,6 +7,7 @@ commands: set -o xtrace source ../../functions + init_temp_dir # do this only in the first TestStep deploy_operator deploy_non_tls_cluster_secrets diff --git a/e2e-tests/tests/version-service/08-drop-finalizer.yaml b/e2e-tests/tests/version-service/99-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/version-service/08-drop-finalizer.yaml rename to e2e-tests/tests/version-service/99-drop-finalizer.yaml diff --git a/e2e-tests/vars.sh b/e2e-tests/vars.sh index d33aaaaa5..29c404298 100644 --- a/e2e-tests/vars.sh +++ b/e2e-tests/vars.sh @@ -5,7 +5,7 @@ export ROOT_REPO=${ROOT_REPO:-${PWD}} export DEPLOY_DIR="${DEPLOY_DIR:-${ROOT_REPO}/deploy}" export TESTS_DIR="${TESTS_DIR:-${ROOT_REPO}/e2e-tests}" export TESTS_CONFIG_DIR="${TESTS_CONFIG_DIR:-${TESTS_DIR}/conf}" -export TEMP_DIR=$(mktemp -d) +export TEMP_DIR="/tmp/kuttl/ps/${test_name}" export GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) export VERSION=${VERSION:-$(echo "${GIT_BRANCH}" | sed -e 's^/^-^g; s^[.]^-^g;' | tr '[:upper:]' '[:lower:]')} From 1612b1840282e4e6e9c66d5dd87372311f18b3a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:12:49 +0200 Subject: [PATCH 029/192] CLOUD-727: Bump google.golang.org/grpc from 1.57.0 to 1.59.0 (#478) --- go.mod | 12 ++++++------ go.sum | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 3c134ee1c..9289ce0fc 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( go.nhat.io/grpcmock v0.23.0 go.uber.org/zap v1.24.0 golang.org/x/sync v0.3.0 - google.golang.org/grpc v1.57.0 + google.golang.org/grpc v1.59.0 k8s.io/api v0.27.4 k8s.io/apimachinery v0.27.4 k8s.io/client-go v0.27.4 @@ -32,8 +32,8 @@ require ( require ( github.com/moby/spdystream v0.2.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230726155614-23370e0ffb3e // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect ) require ( @@ -65,7 +65,7 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 github.com/iancoleman/orderedmap v0.2.0 // indirect @@ -107,7 +107,7 @@ require ( go.uber.org/multierr v1.6.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect @@ -115,7 +115,7 @@ require ( golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 66777b4d5..27152f5a8 100644 --- a/go.sum +++ b/go.sum @@ -186,7 +186,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -255,8 +255,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -559,8 +559,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= 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= @@ -770,12 +770,12 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230726155614-23370e0ffb3e h1:S83+ibolgyZ0bqz7KEsUOPErxcv4VzlszxY+31OfB/E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -795,8 +795,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From fd29eeab02cffb9342eabb94938ce606a273c088 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:21:46 +0200 Subject: [PATCH 030/192] CLOUD-727: Bump k8s.io/client-go from 0.27.4 to 0.28.4 (#486) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.4 to 0.28.4. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.27.4...v0.28.4) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 53 +++++++++++++---------------------------------------- 2 files changed, 19 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index 9289ce0fc..55229eb19 100644 --- a/go.mod +++ b/go.mod @@ -23,14 +23,15 @@ require ( go.uber.org/zap v1.24.0 golang.org/x/sync v0.3.0 google.golang.org/grpc v1.59.0 - k8s.io/api v0.27.4 - k8s.io/apimachinery v0.27.4 - k8s.io/client-go v0.27.4 + k8s.io/api v0.28.4 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 k8s.io/utils v0.0.0-20230505201702-9f6742963106 sigs.k8s.io/controller-runtime v0.15.2 ) require ( + github.com/google/gnostic-models v0.6.8 // indirect github.com/moby/spdystream v0.2.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect @@ -54,14 +55,13 @@ require ( github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/analysis v0.21.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/loads v0.21.1 // indirect github.com/go-openapi/spec v0.20.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect @@ -124,7 +124,7 @@ require ( k8s.io/apiextensions-apiserver v0.27.2 // indirect k8s.io/component-base v0.27.2 // indirect k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect sigs.k8s.io/gateway-api v0.7.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect diff --git a/go.sum b/go.sum index 27152f5a8..44e546c8e 100644 --- a/go.sum +++ b/go.sum @@ -48,12 +48,10 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0/go.mod h1:7QJP7dr2wz github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= @@ -65,11 +63,9 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bool64/dev v0.2.17 h1:jE+T92oazAIV8fvMDJrKjsF1bzfr5XezZ8bM5GS1Cl0= github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cert-manager/cert-manager v1.12.3 h1:3gZkP7hHI2CjgX5qZ1Tm98YbHVXB2NGAZPVbOLb3AjU= github.com/cert-manager/cert-manager v1.12.3/go.mod h1:/RYHUvK9cxuU5dbRyhb7g6am9jCcZc8huF3AnADE+nA= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -79,13 +75,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= @@ -95,7 +89,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -103,10 +96,8 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -131,8 +122,8 @@ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= @@ -214,14 +205,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -263,7 +253,6 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ4cK0RHBoh32jxhHM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -298,7 +287,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -367,11 +355,10 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= @@ -383,14 +370,12 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sjmudd/stopwatch v0.1.1 h1:x45OvxFB5OtCkjvYtzRF5fWB857Jzjjk84Oyd5C5ebw= github.com/sjmudd/stopwatch v0.1.1/go.mod h1:BLw0oIQJ1YLXBO/q9ufK/SgnKBVIkC2qrm6uy78Zw6U= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -416,9 +401,6 @@ github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= @@ -452,7 +434,6 @@ go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfA go.opentelemetry.io/otel/sdk v1.15.0 h1:jZTCkRRd08nxD6w7rIaZeDNGZGGQstH3SfLQ3ZsKICk= go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo= go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -546,7 +527,6 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= @@ -755,7 +735,6 @@ google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -769,7 +748,6 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= @@ -789,12 +767,9 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -809,7 +784,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -826,7 +800,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -844,20 +817,20 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= -k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= -k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= -k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= -k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5 h1:azYPdzztXxPSa8wb+hksEKayiz0o+PPisO/d+QhWnoo= -k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 65d702a58ac1e28afb65ff758dc15f0bbd4e4cfd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:24:41 +0200 Subject: [PATCH 031/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.61 to 7.0.64 (#488) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.61 to 7.0.64. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.61...v7.0.64) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 55229eb19..f701d146b 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/go-openapi/validate v0.22.1 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d - github.com/minio/minio-go/v7 v7.0.61 + github.com/minio/minio-go/v7 v7.0.64 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 44e546c8e..a09bc0dad 100644 --- a/go.sum +++ b/go.sum @@ -307,8 +307,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.61 h1:87c+x8J3jxQ5VUGimV9oHdpjsAvy3fhneEBKuoKEVUI= -github.com/minio/minio-go/v7 v7.0.61/go.mod h1:BTu8FcrEw+HidY0zd/0eny43QnVNkXRPXrLXFuQBHXg= +github.com/minio/minio-go/v7 v7.0.64 h1:Zdza8HwOzkld0ZG/og50w56fKi6AAyfqfifmasD9n2Q= +github.com/minio/minio-go/v7 v7.0.64/go.mod h1:R4WVUR6ZTedlCcGwZRauLMIKjgyaWxhs4Mqi/OMPmEc= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= From 92ee2f626eaf066dc4f7a9934ef1704e6e665a93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:25:06 +0200 Subject: [PATCH 032/192] CLOUD-727: Bump actions/checkout from 3 to 4 (#454) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/reviewdog.yml | 12 ++++++------ .github/workflows/scan.yml | 2 +- .github/workflows/tests.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 0078c651e..faeb491d9 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/setup-go@v4 with: go-version: '^1.20' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -21,7 +21,7 @@ jobs: name: runner / suggester / gofmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: gofmt -w -s $(find . -not -path "*/vendor/*" -name "*.go") - uses: reviewdog/action-suggester@v1 with: @@ -31,7 +31,7 @@ jobs: name: runner / suggester / shfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: '^1.17' @@ -47,7 +47,7 @@ jobs: name: runner / shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} @@ -59,7 +59,7 @@ jobs: name: runner / misspell runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: reviewdog/action-misspell@v1 with: github_token: ${{ secrets.github_token }} @@ -71,7 +71,7 @@ jobs: name: runner / alex runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: reviewdog/action-alex@v1 with: github_token: ${{ secrets.github_token }} diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 173158d06..4f21db8e3 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | export IMAGE=perconalab/percona-server-mysql-operator:${{ github.sha }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ac0201da..0fe2ca37e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Clone the code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v4 with: From 72580460c3fded254262231372acf7ee57a41709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:57:00 +0200 Subject: [PATCH 033/192] CLOUD-727: Bump go.uber.org/zap from 1.24.0 to 1.26.0 (#463) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.24.0 to 1.26.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/zap/compare/v1.24.0...v1.26.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 5 ++--- go.sum | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index f701d146b..039eab60f 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.23.0 - go.uber.org/zap v1.24.0 + go.uber.org/zap v1.26.0 golang.org/x/sync v0.3.0 google.golang.org/grpc v1.59.0 k8s.io/api v0.28.4 @@ -103,8 +103,7 @@ require ( go.nhat.io/wait v0.1.0 // indirect go.opentelemetry.io/otel v1.15.0 // indirect go.opentelemetry.io/otel/trace v1.15.0 // indirect - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.uber.org/multierr v1.10.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect diff --git a/go.sum b/go.sum index a09bc0dad..597c090fe 100644 --- a/go.sum +++ b/go.sum @@ -56,7 +56,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -436,16 +435,16 @@ go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= From 216f486c11c491dda81402f329ef15f1d7a9ddb6 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Wed, 13 Dec 2023 11:46:38 +0100 Subject: [PATCH 034/192] CLOUD-825 - Use community helm chart repo for installing MinIO (#495) * CLOUD-825 - Use community helm chart repo for installing MinIO * Escape secret keys 2 times Secret keys are not escaped in a helm chart, so we should do it 2 times: https://github.com/minio/minio/blob/4a21dce2b5537e3d2b8840427b6139a8282cad9e/helm/minio/templates/_helper_create_user.txt#L96-L103 --------- Co-authored-by: Andrii Dema --- e2e-tests/functions | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 4b05966cc..8e77eeca8 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -90,22 +90,28 @@ delete_pmm_api_key() { } deploy_minio() { - local accessKey="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 -d)" - local secretKey="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 -d)" + local access_key + local secret_key + access_key="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 -d)" + secret_key="$(kubectl -n "${NAMESPACE}" get secret minio-secret -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 -d)" helm uninstall -n "${NAMESPACE}" minio-service || : helm repo remove minio || : - helm repo add minio https://helm.min.io/ + helm repo add minio https://charts.min.io/ retry 10 60 helm install minio-service \ -n "${NAMESPACE}" \ - --version 8.0.5 \ - --set accessKey="$(printf '%q' "$accessKey")" \ - --set secretKey="$(printf '%q' "$secretKey")" \ + --version 5.0.14 \ + --set replicas=1 \ + --set mode=standalone \ + --set resources.requests.memory=256Mi \ + --set rootUser=rootuser \ + --set rootPassword=rootpass123 \ + --set "users[0].accessKey"="$(printf '%q' "$(printf '%q' "$access_key")")" \ + --set "users[0].secretKey"="$(printf '%q' "$(printf '%q' "$secret_key")")" \ + --set "users[0].policy"=consoleAdmin \ --set service.type=ClusterIP \ --set configPathmc=/tmp/.minio/ \ --set persistence.size=2G \ - --set environment.MINIO_REGION=us-east-1 \ - --set environment.MINIO_HTTP_TRACE=/tmp/trace.log \ --set securityContext.enabled=false \ minio/minio MINIO_POD=$(kubectl -n "${NAMESPACE}" get pods --selector=release=minio-service -o 'jsonpath={.items[].metadata.name}') @@ -113,7 +119,7 @@ deploy_minio() { # create bucket kubectl -n "${NAMESPACE}" run -i --rm aws-cli --image=perconalab/awscli --restart=Never -- \ - bash -c "AWS_ACCESS_KEY_ID='$accessKey' AWS_SECRET_ACCESS_KEY='$secretKey' AWS_DEFAULT_REGION=us-east-1 \ + bash -c "AWS_ACCESS_KEY_ID='$access_key' AWS_SECRET_ACCESS_KEY='$secret_key' AWS_DEFAULT_REGION=us-east-1 \ /usr/bin/aws --endpoint-url http://minio-service:9000 s3 mb s3://operator-testing" } From de34d04e5fc072a2138d943ba241fee32f279813 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 20:42:45 +0200 Subject: [PATCH 035/192] CLOUD-727: Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#499) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 039eab60f..342a39b9f 100644 --- a/go.mod +++ b/go.mod @@ -104,12 +104,12 @@ require ( go.opentelemetry.io/otel v1.15.0 // indirect go.opentelemetry.io/otel/trace v1.15.0 // indirect go.uber.org/multierr v1.10.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index 597c090fe..56dcad527 100644 --- a/go.sum +++ b/go.sum @@ -456,8 +456,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -600,11 +600,11 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -614,8 +614,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 609212f4caa13c1f81703b4c12d97dbb9b2bb9f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 20:43:26 +0200 Subject: [PATCH 036/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.13.1 to 0.14.0 (#490) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.13.1 to 0.14.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.13.1...0.14.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 4f21db8e3..dd0356953 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -14,7 +14,7 @@ jobs: export DOCKER_SQUASH=0 ./e2e-tests/build - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.13.1 + uses: aquasecurity/trivy-action@0.14.0 with: image-ref: 'docker.io/perconalab/percona-server-mysql-operator:${{ github.sha }}' format: 'table' From 7a9265efee8cce3fbfbc048347b3e338e4645eda Mon Sep 17 00:00:00 2001 From: Dmitriy Kostiuk Date: Tue, 19 Dec 2023 21:47:47 +0300 Subject: [PATCH 037/192] K8SPS-281 Make small fixes to the contributing guide about local run of the Operator (#450) Co-authored-by: Viacheslav Sarzhan --- CONTRIBUTING.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7faaabb60..5adaf48eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ Contributions to the source tree should follow the workflow described below: ``` 3. Build the image and test your changes. - The build is actually controlled by the `e2e-tests/build` script, and we will invoke it through the traditional `make` command. You can build the Operator locally, but you need to deploy it to Kubernetes via some Docker registry to check how the modified version works (while installing the Custom Resource and generating necessary Pods for the Operator, image will be pulled from your remote repository). Therefore, building with the automatic image upload is the main scenario. + The build is actually controlled by the `e2e-tests/build` script, and we will invoke it through the traditional `make` command. Usually you build the Operator locally and deploy it to Kubernetes via some Docker registry to check how the modified version works. While installing the Custom Resource and generating necessary Pods for the Operator, image will be pulled from your remote repository). Therefore, building with the automatic image upload is the main scenario. Before doing this, make sure that you have your account created on [docker.io](https://www.docker.com/) and that you have logged-in from your terminal [docker login](https://docs.docker.com/engine/reference/commandline/login/). First we are going to create the custom image with `make` utility (the default one is [perconalab/percona-server-mysql-operator:](https://hub.docker.com/r/perconalab/percona-server-mysql-operator/) (`Makefile` will automatically detect the image tag from the current branch). @@ -169,11 +169,16 @@ Contributions to the source tree should follow the workflow described below: By default kuttl will delete created test namespace after test is finished, you can add `--skip-delete` flag in order to prevent deletion for potential troubleshooting. -**Running the operator locally** +**Running the Operator locally** -1. Save your changes -2. Tell the operator which namespace to watch by running `export WATCH_NAMESPACE=my-namespace` -3. Run the command `make install run`. +Starting from the version 0.6.0 you can run the Operator on your system without uploading images to the Docker registry. This can be useful to speed up debugging when you need to test small changes in code many times. + +When you have kubectl on your system set up and configured to control a Kubernetes cluster, you can run the Operator locally as follows: + +1. Export `WATCH_NAMESPACE=` environment variable to let the Operator know which Kubernetes namespace it should work with +2. Uncomment the `initImage` key in your `deploy/cr.yaml` +3. Execute `make install` command to have the runnable local version of the Operator +4. Execute `make run` to actually run it ### 2. Contributing to documentation From 72ac73cc5dabf7a903f8995a7962e26f688aa0cd Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Mon, 1 Jan 2024 11:29:51 +0200 Subject: [PATCH 038/192] CLOUD-727 update schedule section for gomod (#508) * we can set day only for weekly interval --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c1fd22775..9e4b0dde6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -42,6 +42,6 @@ updates: labels: - "dependencies" schedule: - interval: monthly + interval: weekly day: "wednesday" time: "01:00" From ded55185afafbcc9189f2498b21bea4d6c1fcae8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 11:30:38 +0200 Subject: [PATCH 039/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.14.0 to 0.16.0 (#506) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.14.0 to 0.16.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.14.0...0.16.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index dd0356953..36192a6e3 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -14,7 +14,7 @@ jobs: export DOCKER_SQUASH=0 ./e2e-tests/build - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.14.0 + uses: aquasecurity/trivy-action@0.16.0 with: image-ref: 'docker.io/perconalab/percona-server-mysql-operator:${{ github.sha }}' format: 'table' From 77c62b9741d5111c40002f60f97a90b9cf852cf9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 11:30:59 +0200 Subject: [PATCH 040/192] CLOUD-727: Bump actions/setup-go from 4 to 5 (#507) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/reviewdog.yml | 4 ++-- .github/workflows/tests.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index faeb491d9..fba5370ff 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -5,7 +5,7 @@ jobs: name: runner / suggester / golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '^1.20' - uses: actions/checkout@v4 @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '^1.17' - run: go install mvdan.cc/sh/v3/cmd/shfmt@latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fe2ca37e..58e0e0bfb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: - name: Clone the code uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" - name: Perform the test From 57ab766731fd9f93025adb5deea91b732b231a3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:25:09 +0200 Subject: [PATCH 041/192] CLOUD-727: Bump github.com/go-openapi/validate from 0.22.1 to 0.22.6 (#505) Bumps [github.com/go-openapi/validate](https://github.com/go-openapi/validate) from 0.22.1 to 0.22.6. - [Commits](https://github.com/go-openapi/validate/compare/v0.22.1...v0.22.6) --- updated-dependencies: - dependency-name: github.com/go-openapi/validate dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 24 ++++----- go.sum | 155 ++++++++++++++------------------------------------------- 2 files changed, 50 insertions(+), 129 deletions(-) diff --git a/go.mod b/go.mod index 342a39b9f..9cdf933c1 100644 --- a/go.mod +++ b/go.mod @@ -7,11 +7,11 @@ require ( github.com/cert-manager/cert-manager v1.12.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.2.4 - github.com/go-openapi/errors v0.20.4 + github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.25.0 - github.com/go-openapi/strfmt v0.21.7 - github.com/go-openapi/swag v0.22.4 - github.com/go-openapi/validate v0.22.1 + github.com/go-openapi/strfmt v0.21.10 + github.com/go-openapi/swag v0.22.6 + github.com/go-openapi/validate v0.22.6 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.64 @@ -53,11 +53,11 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.4 // indirect - github.com/go-openapi/analysis v0.21.2 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/loads v0.21.1 // indirect - github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/analysis v0.22.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/loads v0.21.5 // indirect + github.com/go-openapi/spec v0.20.13 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -65,7 +65,7 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 github.com/iancoleman/orderedmap v0.2.0 // indirect @@ -94,11 +94,11 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.2 // indirect + github.com/stretchr/testify v1.8.4 // indirect github.com/swaggest/assertjson v1.7.0 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect - go.mongodb.org/mongo-driver v1.11.3 // indirect + go.mongodb.org/mongo-driver v1.13.1 // indirect go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect go.opentelemetry.io/otel v1.15.0 // indirect diff --git a/go.sum b/go.sum index 56dcad527..edda3aa92 100644 --- a/go.sum +++ b/go.sum @@ -50,10 +50,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -74,7 +71,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -110,66 +106,31 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= -github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= +github.com/go-openapi/analysis v0.22.0 h1:wQ/d07nf78HNj4u+KiSY0sT234IAyePPbMgpUjUJQR0= +github.com/go-openapi/analysis v0.22.0/go.mod h1:acDnkkCI2QxIo8sSIPgmp1wUlRohV7vfGtAIVae73b0= +github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= +github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= +github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= -github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= -github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= -github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= +github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/strfmt v0.21.10 h1:JIsly3KXZB/Qf4UzvzJpg4OELH/0ASDQsyk//TTBDDk= +github.com/go-openapi/strfmt v0.21.10/go.mod h1:vNDMwbilnl7xKiO/Ve/8H8Bb2JIInBnH+lqiw6QWgis= +github.com/go-openapi/swag v0.22.6 h1:dnqg1XfHXL9aBxSbktBqFR5CxVyVI+7fYWhAf1JOeTw= +github.com/go-openapi/swag v0.22.6/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo= +github.com/go-openapi/validate v0.22.6/go.mod h1:eaddXSqKeTg5XpSmj1dYyFTK/95n/XHwcOY+BMxKMyM= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04vbmDOc3yuruGvVO+LOa7cVER3yWw= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -242,10 +203,9 @@ github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -262,17 +222,13 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -282,24 +238,16 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -310,8 +258,6 @@ github.com/minio/minio-go/v7 v7.0.64 h1:Zdza8HwOzkld0ZG/og50w56fKi6AAyfqfifmasD9 github.com/minio/minio-go/v7 v7.0.64/go.mod h1:R4WVUR6ZTedlCcGwZRauLMIKjgyaWxhs4Mqi/OMPmEc= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= @@ -336,9 +282,7 @@ github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3ev github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -354,16 +298,12 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -371,15 +311,12 @@ github.com/sjmudd/stopwatch v0.1.1 h1:x45OvxFB5OtCkjvYtzRF5fWB857Jzjjk84Oyd5C5eb github.com/sjmudd/stopwatch v0.1.1/go.mod h1:BLw0oIQJ1YLXBO/q9ufK/SgnKBVIkC2qrm6uy78Zw6U= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -388,18 +325,13 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggest/assertjson v1.7.0 h1:SKw5Rn0LQs6UvmGrIdaKQbMR1R3ncXm5KNon+QJ7jtw= github.com/swaggest/assertjson v1.7.0/go.mod h1:vxMJMehbSVJd+dDWFCKv3QRZKNTpy/ktZKTz9LOEDng= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= @@ -411,10 +343,9 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.11.3 h1:Ql6K6qYHEzB6xvu4+AU0BoRoqf9vFPcc4o7MUIdPW8Y= -go.mongodb.org/mongo-driver v1.11.3/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= +go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= go.nhat.io/aferomock v0.4.0 h1:gs3nJzIqAezglUuaPfautAmZwulwRWLcfSSzdK4YCC0= go.nhat.io/grpcmock v0.23.0 h1:tTbExS1VjLj3n0IkbwZsU3vY/FxL3h8pH53vM9jCeVI= go.nhat.io/grpcmock v0.23.0/go.mod h1:Vq3O77lttPPu/hLwDtqmUWtbZxpN4zkvnnXj8Ez2jXA= @@ -445,15 +376,13 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= @@ -492,6 +421,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -525,8 +455,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -544,7 +474,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ 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= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -552,19 +481,16 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -592,17 +518,19 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -611,9 +539,10 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -627,13 +556,9 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -675,6 +600,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -788,10 +714,8 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -804,9 +728,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 810dbcda9b4ea46d1d0d5c8360c85dfe4ba7295a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:15:30 +0200 Subject: [PATCH 042/192] CLOUD-727: Bump go.nhat.io/grpcmock from 0.23.0 to 0.25.0 (#503) Bumps [go.nhat.io/grpcmock](https://github.com/nhatthm/grpcmock) from 0.23.0 to 0.25.0. - [Release notes](https://github.com/nhatthm/grpcmock/releases) - [Commits](https://github.com/nhatthm/grpcmock/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: go.nhat.io/grpcmock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 28 ++-- go.sum | 409 ++++++--------------------------------------------------- 2 files changed, 52 insertions(+), 385 deletions(-) diff --git a/go.mod b/go.mod index 9cdf933c1..b3c66f1dd 100644 --- a/go.mod +++ b/go.mod @@ -19,10 +19,10 @@ require ( github.com/onsi/gomega v1.27.10 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 - go.nhat.io/grpcmock v0.23.0 + go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.26.0 - golang.org/x/sync v0.3.0 - google.golang.org/grpc v1.59.0 + golang.org/x/sync v0.5.0 + google.golang.org/grpc v1.60.1 k8s.io/api v0.28.4 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 @@ -33,8 +33,8 @@ require ( require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/moby/spdystream v0.2.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect ) require ( @@ -66,9 +66,9 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.4.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 - github.com/iancoleman/orderedmap v0.2.0 // indirect + github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -92,10 +92,10 @@ require ( github.com/rs/xid v1.5.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.4 // indirect - github.com/swaggest/assertjson v1.7.0 // indirect + github.com/swaggest/assertjson v1.9.0 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect go.mongodb.org/mongo-driver v1.13.1 // indirect @@ -105,16 +105,16 @@ require ( go.opentelemetry.io/otel/trace v1.15.0 // indirect go.uber.org/multierr v1.10.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index edda3aa92..278c8d64f 100644 --- a/go.sum +++ b/go.sum @@ -1,41 +1,4 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v67.3.0+incompatible h1:QEvenaO+Y9ShPeCWsSAtolzVUcb0T0tPeek5TDsovuM= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -47,7 +10,6 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 h1:nVocQV40OQne5613E github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0/go.mod h1:7QJP7dr2wznCMeqIrhMgWGf7XpAQnVrJqDm9nvV3Cu4= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -56,7 +18,7 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:W github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bool64/dev v0.2.17 h1:jE+T92oazAIV8fvMDJrKjsF1bzfr5XezZ8bM5GS1Cl0= +github.com/bool64/dev v0.2.29 h1:x+syGyh+0eWtOzQ1ItvLzOGIWyNWnyjXpHIcpF2HvL4= github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -69,8 +31,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -82,8 +42,6 @@ github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -93,11 +51,8 @@ github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu4 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -138,87 +93,38 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ4cK0RHBoh32jxhHM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= -github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -227,8 +133,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -238,8 +142,6 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -286,7 +188,6 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= @@ -298,7 +199,6 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -309,26 +209,25 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sjmudd/stopwatch v0.1.1 h1:x45OvxFB5OtCkjvYtzRF5fWB857Jzjjk84Oyd5C5ebw= github.com/sjmudd/stopwatch v0.1.1/go.mod h1:BLw0oIQJ1YLXBO/q9ufK/SgnKBVIkC2qrm6uy78Zw6U= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/swaggest/assertjson v1.7.0 h1:SKw5Rn0LQs6UvmGrIdaKQbMR1R3ncXm5KNon+QJ7jtw= -github.com/swaggest/assertjson v1.7.0/go.mod h1:vxMJMehbSVJd+dDWFCKv3QRZKNTpy/ktZKTz9LOEDng= +github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= +github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= @@ -338,190 +237,91 @@ github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FB github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= go.nhat.io/aferomock v0.4.0 h1:gs3nJzIqAezglUuaPfautAmZwulwRWLcfSSzdK4YCC0= -go.nhat.io/grpcmock v0.23.0 h1:tTbExS1VjLj3n0IkbwZsU3vY/FxL3h8pH53vM9jCeVI= -go.nhat.io/grpcmock v0.23.0/go.mod h1:Vq3O77lttPPu/hLwDtqmUWtbZxpN4zkvnnXj8Ez2jXA= +go.nhat.io/grpcmock v0.25.0 h1:zk03vvA60w7UrnurZbqL4wxnjmJz1Kuyb7ig2MF+n4c= +go.nhat.io/grpcmock v0.25.0/go.mod h1:5U694ASEFBkiZP7aPuz9kbbb/jphVlfpbOnocyht/rE= go.nhat.io/matcher/v2 v2.0.0 h1:W+rbHi0hKuZHtOQH4U5g+KwyKyfVioIxrxjoGRcUETE= go.nhat.io/matcher/v2 v2.0.0/go.mod h1:cL5oYp0M9A4L8jEGqjmUfy+k7AXVDddoVt6aYIL1r5g= go.nhat.io/wait v0.1.0 h1:aQ4YDzaOgFbypiJ9c/eAfOIB1G25VOv7Gd2QS8uz1gw= go.nhat.io/wait v0.1.0/go.mod h1:+ijMghc9/9zXi+HDcs49HNReprvXOZha2Q3jTOtqJrE= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk= go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek= go.opentelemetry.io/otel/sdk v1.15.0 h1:jZTCkRRd08nxD6w7rIaZeDNGZGGQstH3SfLQ3ZsKICk= go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo= go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= 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.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -533,72 +333,25 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= @@ -609,104 +362,26 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= +google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= +google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= +google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= @@ -716,7 +391,6 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -728,15 +402,11 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= @@ -753,9 +423,6 @@ k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5Ohx k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.15.2 h1:9V7b7SDQSJ08IIsJ6CY1CE85Okhp87dyTMNDG0FS7f4= sigs.k8s.io/controller-runtime v0.15.2/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY= From 729a7be363b0b6434ceeb7ee649cd88300f37756 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:19:41 +0200 Subject: [PATCH 043/192] CLOUD-727: Bump github.com/Azure/azure-sdk-for-go/sdk/storage/azblob (#501) Bumps [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) from 1.1.0 to 1.2.1. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v1.1...sdk/azidentity/v1.2.1) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index b3c66f1dd..9910d8424 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/percona/percona-server-mysql-operator go 1.20 require ( - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 github.com/cert-manager/cert-manager v1.12.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.2.4 @@ -38,8 +38,8 @@ require ( ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index 278c8d64f..98fb6e9c5 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/Azure/azure-sdk-for-go v67.3.0+incompatible h1:QEvenaO+Y9ShPeCWsSAtolzVUcb0T0tPeek5TDsovuM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0 h1:nVocQV40OQne5613EeLayJiRAJuKlBGy+m22qWG+WRg= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0/go.mod h1:7QJP7dr2wznCMeqIrhMgWGf7XpAQnVrJqDm9nvV3Cu4= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 h1:AMf7YbZOZIW5b66cXNHMWWT/zkjhz5+a+k/3x40EO7E= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1/go.mod h1:uwfk06ZBcvL/g4VHNjurPfVln9NMbsk2XIZxJ+hu81k= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= @@ -90,7 +90,7 @@ github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04v github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= From 93b610beeb303d495d982f0b16376ed98ada16da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 12:07:23 +0200 Subject: [PATCH 044/192] CLOUD-727: Bump github.com/go-logr/logr from 1.2.4 to 1.4.1 (#502) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.4 to 1.4.1. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.4...v1.4.1) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 9910d8424..9776a41cb 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 github.com/cert-manager/cert-manager v1.12.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.25.0 github.com/go-openapi/strfmt v0.21.10 diff --git a/go.sum b/go.sum index 98fb6e9c5..a9b30a440 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,9 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= From 4c6d9f86c70084f386e98b11fd98c93f43a05281 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:19:35 +0200 Subject: [PATCH 045/192] CLOUD-727: Bump github.com/onsi/gomega from 1.27.10 to 1.30.0 (#482) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.10 to 1.30.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.27.10...v1.30.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 9776a41cb..7e2e15b11 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.64 - github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.10 + github.com/onsi/ginkgo/v2 v2.13.0 + github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 @@ -62,7 +62,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.4.0 // indirect @@ -111,7 +111,7 @@ require ( golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/tools v0.12.0 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect diff --git a/go.sum b/go.sum index a9b30a440..416a76527 100644 --- a/go.sum +++ b/go.sum @@ -110,8 +110,8 @@ github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYu github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -178,10 +178,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -283,7 +283,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -355,8 +355,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 3fc00bf22ecc6e7c3576950ca8459443013b9f00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 00:13:56 +0200 Subject: [PATCH 046/192] CLOUD-727: Bump github.com/cert-manager/cert-manager from 1.12.3 to 1.13.3 (#504) * CLOUD-727: Bump github.com/cert-manager/cert-manager Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.12.3 to 1.13.3. - [Release notes](https://github.com/cert-manager/cert-manager/releases) - [Commits](https://github.com/cert-manager/cert-manager/compare/v1.12.3...v1.13.3) --- updated-dependencies: - dependency-name: github.com/cert-manager/cert-manager dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * fix build * update controller-runtime from 0.15.2 to 0.16.3 * fix WATCH_NAMESPACE to support multiple values --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- build/Dockerfile | 2 +- cmd/manager/main.go | 45 ++++++++++++++---- go.mod | 42 +++++++++-------- go.sum | 108 ++++++++++++++++++++++++++++---------------- pkg/k8s/utils.go | 10 ++++ 5 files changed, 140 insertions(+), 67 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index fccdb7ab1..95bb7edb2 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20 AS go_builder +FROM golang:1.21 AS go_builder WORKDIR /go/src/github.com/percona/percona-server-mysql-operator COPY go.mod go.sum ./ diff --git a/cmd/manager/main.go b/cmd/manager/main.go index bf9a605d3..2bca7945f 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -34,9 +34,12 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" + metricsServer "sigs.k8s.io/controller-runtime/pkg/metrics/server" + ctrlWebhook "sigs.k8s.io/controller-runtime/pkg/webhook" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" @@ -81,27 +84,53 @@ func main() { ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) - ns, err := k8s.GetWatchNamespace() + namespace, err := k8s.GetWatchNamespace() if err != nil { setupLog.Error(err, "unable to get watch namespace") os.Exit(1) } - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, - Port: 9443, + operatorNamespace, err := k8s.GetOperatorNamespace() + if err != nil { + setupLog.Error(err, "failed to get operators' namespace") + os.Exit(1) + } + options := ctrl.Options{ + Scheme: scheme, + Metrics: metricsServer.Options{ + BindAddress: metricsAddr, + }, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "08db2feb.percona.com", - Namespace: ns, - }) + + WebhookServer: ctrlWebhook.NewServer(ctrlWebhook.Options{ + Port: 9443, + }), + } + + // Add support for MultiNamespace set in WATCH_NAMESPACE + if len(namespace) > 0 { + namespaces := make(map[string]cache.Config) + for _, ns := range append(strings.Split(namespace, ","), operatorNamespace) { + namespaces[ns] = cache.Config{} + } + options.Cache.DefaultNamespaces = namespaces + } + + // Get a config to talk to the apiserver + config, err := ctrl.GetConfig() + if err != nil { + setupLog.Error(err, "") + os.Exit(1) + } + mgr, err := ctrl.NewManager(config, options) if err != nil { setupLog.Error(err, "unable to start manager") os.Exit(1) } - nsClient := client.NewNamespacedClient(mgr.GetClient(), ns) + nsClient := client.NewNamespacedClient(mgr.GetClient(), namespace) cliCmd, err := clientcmd.NewClient() if err != nil { diff --git a/go.mod b/go.mod index 7e2e15b11..9896adfca 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/percona/percona-server-mysql-operator -go 1.20 +go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 - github.com/cert-manager/cert-manager v1.12.3 + github.com/cert-manager/cert-manager v1.13.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 @@ -26,13 +26,15 @@ require ( k8s.io/api v0.28.4 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 - k8s.io/utils v0.0.0-20230505201702-9f6742963106 - sigs.k8s.io/controller-runtime v0.15.2 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b + sigs.k8s.io/controller-runtime v0.16.3 ) require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/moby/spdystream v0.2.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect ) @@ -45,9 +47,9 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bool64/shared v0.1.5 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -84,11 +86,11 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/rs/xid v1.5.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -101,9 +103,9 @@ require ( go.mongodb.org/mongo-driver v1.13.1 // indirect go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect - go.opentelemetry.io/otel v1.15.0 // indirect - go.opentelemetry.io/otel/trace v1.15.0 // indirect - go.uber.org/multierr v1.10.0 // indirect + go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect @@ -111,8 +113,8 @@ require ( golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.12.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect + golang.org/x/tools v0.13.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect google.golang.org/protobuf v1.31.0 // indirect @@ -120,12 +122,12 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.27.2 // indirect - k8s.io/component-base v0.27.2 // indirect + k8s.io/apiextensions-apiserver v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - sigs.k8s.io/gateway-api v0.7.0 // indirect + k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + sigs.k8s.io/gateway-api v0.8.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 416a76527..d34f3aa45 100644 --- a/go.sum +++ b/go.sum @@ -1,29 +1,34 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/Azure/azure-sdk-for-go v67.3.0+incompatible h1:QEvenaO+Y9ShPeCWsSAtolzVUcb0T0tPeek5TDsovuM= +github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 h1:AMf7YbZOZIW5b66cXNHMWWT/zkjhz5+a+k/3x40EO7E= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1/go.mod h1:uwfk06ZBcvL/g4VHNjurPfVln9NMbsk2XIZxJ+hu81k= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bool64/dev v0.2.29 h1:x+syGyh+0eWtOzQ1ItvLzOGIWyNWnyjXpHIcpF2HvL4= +github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cert-manager/cert-manager v1.12.3 h1:3gZkP7hHI2CjgX5qZ1Tm98YbHVXB2NGAZPVbOLb3AjU= -github.com/cert-manager/cert-manager v1.12.3/go.mod h1:/RYHUvK9cxuU5dbRyhb7g6am9jCcZc8huF3AnADE+nA= +github.com/cert-manager/cert-manager v1.13.3 h1:3R4G0RI7K0OkTZhWlVOC5SGZMYa2NwqmQJoyKydrz/M= +github.com/cert-manager/cert-manager v1.13.3/go.mod h1:BM2+Pt/NmSv1Zr25/MHv6BgIEF9IUxA1xAjp80qkxgc= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -32,13 +37,15 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -92,8 +99,10 @@ github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYA github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -110,6 +119,7 @@ github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYu github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -145,14 +155,19 @@ github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZY github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= @@ -175,9 +190,11 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= +github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= @@ -186,21 +203,24 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= @@ -218,6 +238,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -238,6 +259,7 @@ github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FB github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -245,24 +267,29 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= go.nhat.io/aferomock v0.4.0 h1:gs3nJzIqAezglUuaPfautAmZwulwRWLcfSSzdK4YCC0= +go.nhat.io/aferomock v0.4.0/go.mod h1:msi5MDOtJ/AroUa/lDc3jVGOILM4SKP//4yBRImOvkI= go.nhat.io/grpcmock v0.25.0 h1:zk03vvA60w7UrnurZbqL4wxnjmJz1Kuyb7ig2MF+n4c= go.nhat.io/grpcmock v0.25.0/go.mod h1:5U694ASEFBkiZP7aPuz9kbbb/jphVlfpbOnocyht/rE= go.nhat.io/matcher/v2 v2.0.0 h1:W+rbHi0hKuZHtOQH4U5g+KwyKyfVioIxrxjoGRcUETE= go.nhat.io/matcher/v2 v2.0.0/go.mod h1:cL5oYp0M9A4L8jEGqjmUfy+k7AXVDddoVt6aYIL1r5g= go.nhat.io/wait v0.1.0 h1:aQ4YDzaOgFbypiJ9c/eAfOIB1G25VOv7Gd2QS8uz1gw= go.nhat.io/wait v0.1.0/go.mod h1:+ijMghc9/9zXi+HDcs49HNReprvXOZha2Q3jTOtqJrE= -go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk= -go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek= -go.opentelemetry.io/otel/sdk v1.15.0 h1:jZTCkRRd08nxD6w7rIaZeDNGZGGQstH3SfLQ3ZsKICk= -go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo= -go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= @@ -275,6 +302,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -284,6 +313,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -355,14 +385,14 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= -gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= @@ -392,11 +422,13 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -410,27 +442,27 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= -k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= -k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= -k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= -k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.15.2 h1:9V7b7SDQSJ08IIsJ6CY1CE85Okhp87dyTMNDG0FS7f4= -sigs.k8s.io/controller-runtime v0.15.2/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= -sigs.k8s.io/gateway-api v0.7.0 h1:/mG8yyJNBifqvuVLW5gwlI4CQs0NR/5q4BKUlf1bVdY= -sigs.k8s.io/gateway-api v0.7.0/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso= +k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= +k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg= +sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/k8s/utils.go b/pkg/k8s/utils.go index 003546844..6a08188dd 100644 --- a/pkg/k8s/utils.go +++ b/pkg/k8s/utils.go @@ -38,6 +38,16 @@ func GetWatchNamespace() (string, error) { return ns, nil } +// GetOperatorNamespace returns the namespace of the operator pod +func GetOperatorNamespace() (string, error) { + nsBytes, err := os.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace") + if err != nil { + return "", err + } + + return strings.TrimSpace(string(nsBytes)), nil +} + func objectMetaEqual(old, new metav1.Object) bool { return util.SSMapEqual(old.GetLabels(), new.GetLabels()) && util.SSMapEqual(old.GetAnnotations(), new.GetAnnotations()) } From f9624e4b7e70acff2683b22581c1502013fada57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:16:18 +0200 Subject: [PATCH 047/192] CLOUD-727: Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#487) Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.16.2 to 2.18.1. - [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases) - [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml) - [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.16.2...v2.18.1) --- updated-dependencies: - dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 9896adfca..108fd06a1 100644 --- a/go.mod +++ b/go.mod @@ -69,7 +69,7 @@ require ( github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.4.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect diff --git a/go.sum b/go.sum index d34f3aa45..8b601ee07 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -132,8 +130,8 @@ github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ4cK0RHBoh32jxhHM= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= From 50248c09b50f9788dde0dbf7ff6c3f2c7d81239b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 23:21:28 +0200 Subject: [PATCH 048/192] CLOUD-727: Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.13.2 (#489) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.11.0 to 2.13.2. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.11.0...v2.13.2) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 108fd06a1..b78547d74 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.64 - github.com/onsi/ginkgo/v2 v2.13.0 + github.com/onsi/ginkgo/v2 v2.13.2 github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 @@ -113,7 +113,7 @@ require ( golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect diff --git a/go.sum b/go.sum index 8b601ee07..0f7141294 100644 --- a/go.sum +++ b/go.sum @@ -193,8 +193,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= +github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -310,8 +310,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -383,8 +383,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From deefffb77dbb3725bf1c2e788815edebd7af34b3 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Thu, 4 Jan 2024 21:20:55 +0200 Subject: [PATCH 049/192] K8SPS-73 make one-pod test as a stabel (#516) --- e2e-tests/tests/one-pod/02-write-data.yaml | 2 ++ e2e-tests/tests/one-pod/05-assert.yaml | 3 +++ e2e-tests/tests/one-pod/06-assert.yaml | 3 +++ e2e-tests/tests/one-pod/06-read-data.yaml | 1 + 4 files changed, 9 insertions(+) diff --git a/e2e-tests/tests/one-pod/02-write-data.yaml b/e2e-tests/tests/one-pod/02-write-data.yaml index bc82e7920..6c5de746c 100644 --- a/e2e-tests/tests/one-pod/02-write-data.yaml +++ b/e2e-tests/tests/one-pod/02-write-data.yaml @@ -7,6 +7,8 @@ commands: source ../../functions + sleep 5 + run_mysql \ "CREATE DATABASE IF NOT EXISTS myDB; CREATE TABLE IF NOT EXISTS myDB.myTable (id int PRIMARY KEY)" \ "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" diff --git a/e2e-tests/tests/one-pod/05-assert.yaml b/e2e-tests/tests/one-pod/05-assert.yaml index 8d7d90cff..4abeae36d 100644 --- a/e2e-tests/tests/one-pod/05-assert.yaml +++ b/e2e-tests/tests/one-pod/05-assert.yaml @@ -7,6 +7,9 @@ kind: PerconaServerMySQL metadata: name: one-pod status: + haproxy: + size: 1 + state: ready mysql: ready: 1 size: 1 diff --git a/e2e-tests/tests/one-pod/06-assert.yaml b/e2e-tests/tests/one-pod/06-assert.yaml index cb790f073..8b09bfd34 100644 --- a/e2e-tests/tests/one-pod/06-assert.yaml +++ b/e2e-tests/tests/one-pod/06-assert.yaml @@ -38,6 +38,9 @@ kind: PerconaServerMySQL metadata: name: one-pod status: + haproxy: + size: 1 + state: ready mysql: ready: 1 size: 1 diff --git a/e2e-tests/tests/one-pod/06-read-data.yaml b/e2e-tests/tests/one-pod/06-read-data.yaml index bbfacd9a1..b3d9bf774 100644 --- a/e2e-tests/tests/one-pod/06-read-data.yaml +++ b/e2e-tests/tests/one-pod/06-read-data.yaml @@ -8,5 +8,6 @@ commands: source ../../functions + sleep 5 data=$(run_mysql "SELECT * FROM myDB.myTable" "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password") kubectl create configmap -n "${NAMESPACE}" 06-read-data-minio --from-literal=data="${data}" From 792af651c4089433e52bfc9993b5444de9bb09a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 21:21:11 +0200 Subject: [PATCH 050/192] CLOUD-727: Bump github.com/go-openapi/swag from 0.22.6 to 0.22.7 (#515) Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.6 to 0.22.7. - [Commits](https://github.com/go-openapi/swag/compare/v0.22.6...v0.22.7) --- updated-dependencies: - dependency-name: github.com/go-openapi/swag dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b78547d74..6966aa96f 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.25.0 github.com/go-openapi/strfmt v0.21.10 - github.com/go-openapi/swag v0.22.6 + github.com/go-openapi/swag v0.22.7 github.com/go-openapi/validate v0.22.6 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d diff --git a/go.sum b/go.sum index 0f7141294..b87dbd2e4 100644 --- a/go.sum +++ b/go.sum @@ -85,8 +85,8 @@ github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkI github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= github.com/go-openapi/strfmt v0.21.10 h1:JIsly3KXZB/Qf4UzvzJpg4OELH/0ASDQsyk//TTBDDk= github.com/go-openapi/strfmt v0.21.10/go.mod h1:vNDMwbilnl7xKiO/Ve/8H8Bb2JIInBnH+lqiw6QWgis= -github.com/go-openapi/swag v0.22.6 h1:dnqg1XfHXL9aBxSbktBqFR5CxVyVI+7fYWhAf1JOeTw= -github.com/go-openapi/swag v0.22.6/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= +github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo= github.com/go-openapi/validate v0.22.6/go.mod h1:eaddXSqKeTg5XpSmj1dYyFTK/95n/XHwcOY+BMxKMyM= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= From bc532b2e1d3ca3eb7d1e97822066ca7e5c15bf40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:45:34 +0200 Subject: [PATCH 051/192] CLOUD-727: Bump github.com/go-openapi/runtime from 0.25.0 to 0.26.2 (#513) Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.25.0 to 0.26.2. - [Release notes](https://github.com/go-openapi/runtime/releases) - [Commits](https://github.com/go-openapi/runtime/compare/v0.25.0...v0.26.2) --- updated-dependencies: - dependency-name: github.com/go-openapi/runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6966aa96f..393092dbf 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 - github.com/go-openapi/runtime v0.25.0 + github.com/go-openapi/runtime v0.26.2 github.com/go-openapi/strfmt v0.21.10 github.com/go-openapi/swag v0.22.7 github.com/go-openapi/validate v0.22.6 diff --git a/go.sum b/go.sum index b87dbd2e4..cc55f794e 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdX github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= -github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= -github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= +github.com/go-openapi/runtime v0.26.2 h1:elWyB9MacRzvIVgAZCBJmqTi7hBzU0hlKD4IvfX0Zl0= +github.com/go-openapi/runtime v0.26.2/go.mod h1:O034jyRZ557uJKzngbMDJXkcKJVzXJiymdSfgejrcRw= github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= github.com/go-openapi/strfmt v0.21.10 h1:JIsly3KXZB/Qf4UzvzJpg4OELH/0ASDQsyk//TTBDDk= From 12e428185d8134d7b4aad205c9ed79a8934247b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:25:34 +0200 Subject: [PATCH 052/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.64 to 7.0.66 (#511) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.64 to 7.0.66. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.64...v7.0.66) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 393092dbf..974734b06 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/go-openapi/validate v0.22.6 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d - github.com/minio/minio-go/v7 v7.0.64 + github.com/minio/minio-go/v7 v7.0.66 github.com/onsi/ginkgo/v2 v2.13.2 github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 @@ -67,15 +67,15 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/md5-simd v1.1.2 // indirect diff --git a/go.sum b/go.sum index cc55f794e..758f6aa19 100644 --- a/go.sum +++ b/go.sum @@ -125,8 +125,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= @@ -145,11 +145,11 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -170,8 +170,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.64 h1:Zdza8HwOzkld0ZG/og50w56fKi6AAyfqfifmasD9n2Q= -github.com/minio/minio-go/v7 v7.0.64/go.mod h1:R4WVUR6ZTedlCcGwZRauLMIKjgyaWxhs4Mqi/OMPmEc= +github.com/minio/minio-go/v7 v7.0.66 h1:bnTOXOHjOqv/gcMuiVbN9o2ngRItvqE774dG9nq0Dzw= +github.com/minio/minio-go/v7 v7.0.66/go.mod h1:DHAgmyQEGdW3Cif0UooKOyrT3Vxs82zNdV6tkKhRtbs= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= From cf3bf57048a662d8b291f48f4ca8f7c029e7ae3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:56:45 +0200 Subject: [PATCH 053/192] CLOUD-727: Bump k8s.io/api from 0.28.4 to 0.29.0 (#514) * CLOUD-727: Bump k8s.io/api from 0.28.4 to 0.29.0 Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.28.4 to 0.29.0. - [Commits](https://github.com/kubernetes/api/compare/v0.28.4...v0.29.0) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * fix build * fix tests --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 14 +++++++------ go.sum | 30 ++++++++++++++++------------ pkg/controller/ps/controller_test.go | 2 +- pkg/controller/ps/version_test.go | 10 +++++----- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 974734b06..767fc886e 100644 --- a/go.mod +++ b/go.mod @@ -23,16 +23,18 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/sync v0.5.0 google.golang.org/grpc v1.60.1 - k8s.io/api v0.28.4 - k8s.io/apimachinery v0.28.4 - k8s.io/client-go v0.28.4 + k8s.io/api v0.29.0 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.3 ) require ( github.com/google/gnostic-models v0.6.8 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/moby/spdystream v0.2.0 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect go.opentelemetry.io/otel/metric v1.20.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect @@ -124,10 +126,10 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/gateway-api v0.8.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 758f6aa19..51b28e445 100644 --- a/go.sum +++ b/go.sum @@ -60,9 +60,9 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -128,6 +128,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= @@ -186,6 +188,8 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -438,20 +442,20 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= @@ -460,7 +464,7 @@ sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg= sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/controller/ps/controller_test.go b/pkg/controller/ps/controller_test.go index 02285ffe2..617cd5dfb 100644 --- a/pkg/controller/ps/controller_test.go +++ b/pkg/controller/ps/controller_test.go @@ -198,7 +198,7 @@ var _ = Describe("Sidecars", Ordered, func() { { Name: pvcName, Spec: corev1.PersistentVolumeClaimSpec{ - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceStorage: resource.Quantity{ Format: "1G", diff --git a/pkg/controller/ps/version_test.go b/pkg/controller/ps/version_test.go index 6b7b608e7..91259c999 100644 --- a/pkg/controller/ps/version_test.go +++ b/pkg/controller/ps/version_test.go @@ -76,7 +76,7 @@ func TestReconcileVersions(t *testing.T) { PodSpec: apiv1alpha1.PodSpec{ VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceStorage: q, }, @@ -110,7 +110,7 @@ func TestReconcileVersions(t *testing.T) { PodSpec: apiv1alpha1.PodSpec{ VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceStorage: q, }, @@ -144,7 +144,7 @@ func TestReconcileVersions(t *testing.T) { PodSpec: apiv1alpha1.PodSpec{ VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceStorage: q, }, @@ -179,7 +179,7 @@ func TestReconcileVersions(t *testing.T) { PodSpec: apiv1alpha1.PodSpec{ VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceStorage: q, }, @@ -311,7 +311,7 @@ func TestGetVersion(t *testing.T) { PodSpec: apiv1alpha1.PodSpec{ VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceStorage: q, }, From 7ee68c11af663c40efeb362b7cbb3bd48943560e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:56:05 +0200 Subject: [PATCH 054/192] CLOUD-727: Bump github.com/go-openapi/strfmt from 0.21.10 to 0.22.0 (#509) Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.21.10 to 0.22.0. - [Commits](https://github.com/go-openapi/strfmt/compare/v0.21.10...v0.22.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/strfmt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 767fc886e..f9cb7da94 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.26.2 - github.com/go-openapi/strfmt v0.21.10 + github.com/go-openapi/strfmt v0.22.0 github.com/go-openapi/swag v0.22.7 github.com/go-openapi/validate v0.22.6 github.com/go-sql-driver/mysql v1.7.1 diff --git a/go.sum b/go.sum index 51b28e445..43e233ee1 100644 --- a/go.sum +++ b/go.sum @@ -83,8 +83,8 @@ github.com/go-openapi/runtime v0.26.2 h1:elWyB9MacRzvIVgAZCBJmqTi7hBzU0hlKD4IvfX github.com/go-openapi/runtime v0.26.2/go.mod h1:O034jyRZ557uJKzngbMDJXkcKJVzXJiymdSfgejrcRw= github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/strfmt v0.21.10 h1:JIsly3KXZB/Qf4UzvzJpg4OELH/0ASDQsyk//TTBDDk= -github.com/go-openapi/strfmt v0.21.10/go.mod h1:vNDMwbilnl7xKiO/Ve/8H8Bb2JIInBnH+lqiw6QWgis= +github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= +github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo= From 94bae4a0bda0d39cc30cfd6086889fa53fb35715 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:14:47 +0200 Subject: [PATCH 055/192] CLOUD-727: Bump golang.org/x/sync from 0.5.0 to 0.6.0 (#519) Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.5.0 to 0.6.0. - [Commits](https://github.com/golang/sync/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: golang.org/x/sync dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f9cb7da94..4dbf5c8a1 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.26.0 - golang.org/x/sync v0.5.0 + golang.org/x/sync v0.6.0 google.golang.org/grpc v1.60.1 k8s.io/api v0.29.0 k8s.io/apimachinery v0.29.0 diff --git a/go.sum b/go.sum index 43e233ee1..a03ccc06e 100644 --- a/go.sum +++ b/go.sum @@ -341,8 +341,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 1f32577b0eb1403fdbcbc39264e8b90cf69d0e56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:16:43 +0200 Subject: [PATCH 056/192] CLOUD-727: Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#518) Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.18.1 to 2.19.0. - [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases) - [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml) - [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.18.1...v2.19.0) --- updated-dependencies: - dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 4dbf5c8a1..ffd6d9063 100644 --- a/go.mod +++ b/go.mod @@ -37,8 +37,8 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect go.opentelemetry.io/otel/metric v1.20.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect ) require ( @@ -71,7 +71,7 @@ require ( github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -118,8 +118,8 @@ require ( golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index a03ccc06e..bab1a45d7 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -402,12 +402,12 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= +google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos= +google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -417,8 +417,8 @@ google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 0e5401a214d6a980f86057c3ff3baa4698ae1cad Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Wed, 17 Jan 2024 10:52:55 +0100 Subject: [PATCH 057/192] K8SPS-266: Refactor Replicator interface (#517) * Refactored getting topology. * Stop using Replicator interface in bootstrap and heathcheck binaries. * Remove unnecessary methods from Replicator interface. * Minor cleanup. * Refactor UserManager and Replication interfaces. * Refactor getting topology in psbackup controller. * Fix cmd/mysql.go * Fix and refactor cmd/mysql. * fix go-licenses and golicense * Don't return error from GetGroupReplicationReplicas if query returns sql.ErrNoRows. * Refactor getting topology. * Remove sql command from the logs. --------- Co-authored-by: Viacheslav Sarzhan --- cmd/bootstrap/async_replication.go | 17 +- cmd/db/db.go | 240 ++++++++++++++ cmd/healthcheck/main.go | 15 +- cmd/manager/main.go | 1 + e2e-tests/license/compare/go-licenses | 1 - e2e-tests/license/compare/golicense | 1 - pkg/controller/ps/controller.go | 40 +-- pkg/controller/ps/user.go | 18 +- pkg/controller/psbackup/controller.go | 13 +- pkg/controller/psbackup/topology.go | 75 +++++ pkg/db/db.go | 46 +++ pkg/db/replication.go | 169 ++++++++++ pkg/db/users.go | 73 ++++ pkg/mysql/topology/topology.go | 77 ----- pkg/orchestrator/client.go | 242 -------------- pkg/orchestrator/clientexec.go | 21 ++ pkg/platform/platform.go | 2 +- pkg/replicator/replicator.go | 431 ------------------------ pkg/replicator/replicatorexec.go | 457 -------------------------- pkg/users/users.go | 132 -------- pkg/users/usersexec.go | 101 ------ 21 files changed, 668 insertions(+), 1504 deletions(-) create mode 100644 cmd/db/db.go create mode 100644 pkg/controller/psbackup/topology.go create mode 100644 pkg/db/db.go create mode 100644 pkg/db/replication.go create mode 100644 pkg/db/users.go delete mode 100644 pkg/mysql/topology/topology.go delete mode 100644 pkg/orchestrator/client.go delete mode 100644 pkg/replicator/replicator.go delete mode 100644 pkg/replicator/replicatorexec.go delete mode 100644 pkg/users/users.go delete mode 100644 pkg/users/usersexec.go diff --git a/cmd/bootstrap/async_replication.go b/cmd/bootstrap/async_replication.go index 25959293a..9679ca53a 100644 --- a/cmd/bootstrap/async_replication.go +++ b/cmd/bootstrap/async_replication.go @@ -11,8 +11,9 @@ import ( "k8s.io/apimachinery/pkg/util/sets" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + database "github.com/percona/percona-server-mysql-operator/cmd/db" + mysqldb "github.com/percona/percona-server-mysql-operator/pkg/db" "github.com/percona/percona-server-mysql-operator/pkg/mysql" - "github.com/percona/percona-server-mysql-operator/pkg/replicator" ) func bootstrapAsyncReplication(ctx context.Context) error { @@ -87,9 +88,9 @@ func bootstrapAsyncReplication(ctx context.Context) error { return errors.Wrapf(err, "get %s password", apiv1alpha1.UserOperator) } - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserOperator, operatorPass, podIp, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserOperator, operatorPass, podIp, mysql.DefaultAdminPort) if err != nil { - return errors.Wrap(err, "connect to db") + return errors.Wrap(err, "connect to database") } defer db.Close() @@ -148,7 +149,7 @@ func bootstrapAsyncReplication(ctx context.Context) error { log.Printf("Cloning from %s", donor) err = db.Clone(ctx, donor, string(apiv1alpha1.UserOperator), operatorPass, mysql.DefaultAdminPort) timer.Stop("clone") - if err != nil && !errors.Is(err, replicator.ErrRestartAfterClone) { + if err != nil && !errors.Is(err, database.ErrRestartAfterClone) { return errors.Wrapf(err, "clone from donor %s", donor) } @@ -174,7 +175,7 @@ func bootstrapAsyncReplication(ctx context.Context) error { return errors.Wrap(err, "check replication status") } - if rStatus == replicator.ReplicationStatusNotInitiated { + if rStatus == mysqldb.ReplicationStatusNotInitiated { log.Println("configuring replication") replicaPass, err := getSecret(apiv1alpha1.UserReplication) @@ -208,7 +209,7 @@ func getTopology(ctx context.Context, peers sets.Set[string]) (string, []string, } for _, peer := range sets.List(peers) { - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserOperator, operatorPass, peer, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserOperator, operatorPass, peer, mysql.DefaultAdminPort) if err != nil { return "", nil, errors.Wrapf(err, "connect to %s", peer) } @@ -228,7 +229,7 @@ func getTopology(ctx context.Context, peers sets.Set[string]) (string, []string, } replicas.Insert(replicaHost) - if status == replicator.ReplicationStatusActive { + if status == mysqldb.ReplicationStatusActive { primary = source } } @@ -255,7 +256,7 @@ func selectDonor(ctx context.Context, fqdn, primary string, replicas []string) ( } for _, replica := range replicas { - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserOperator, operatorPass, replica, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserOperator, operatorPass, replica, mysql.DefaultAdminPort) if err != nil { continue } diff --git a/cmd/db/db.go b/cmd/db/db.go new file mode 100644 index 000000000..a887b1318 --- /dev/null +++ b/cmd/db/db.go @@ -0,0 +1,240 @@ +package db + +import ( + "context" + "database/sql" + "fmt" + + "github.com/go-sql-driver/mysql" + "github.com/pkg/errors" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/db" +) + +const defaultChannelName = "" + +var ErrRestartAfterClone = errors.New("Error 3707: Restart server failed (mysqld is not managed by supervisor process).") + +type ReplicationStatus int8 + +type DB struct { + db *sql.DB +} + +func NewDatabase(ctx context.Context, user apiv1alpha1.SystemUser, pass, host string, port int32) (*DB, error) { + config := mysql.NewConfig() + + config.User = string(user) + config.Passwd = pass + config.Net = "tcp" + config.Addr = fmt.Sprintf("%s:%d", host, port) + config.DBName = "performance_schema" + config.Params = map[string]string{ + "interpolateParams": "true", + "timeout": "10s", + "readTimeout": "10s", + "writeTimeout": "10s", + "tls": "preferred", + } + + db, err := sql.Open("mysql", config.FormatDSN()) + if err != nil { + return nil, errors.Wrap(err, "connect to MySQL") + } + + if err := db.PingContext(ctx); err != nil { + return nil, errors.Wrap(err, "ping DB") + } + + return &DB{db}, nil +} + +func (d *DB) StartReplication(ctx context.Context, host, replicaPass string, port int32) error { + // TODO: Make retries configurable + _, err := d.db.ExecContext(ctx, ` + CHANGE REPLICATION SOURCE TO + SOURCE_USER=?, + SOURCE_PASSWORD=?, + SOURCE_HOST=?, + SOURCE_PORT=?, + SOURCE_SSL=1, + SOURCE_CONNECTION_AUTO_FAILOVER=1, + SOURCE_AUTO_POSITION=1, + SOURCE_RETRY_COUNT=3, + SOURCE_CONNECT_RETRY=60 + `, apiv1alpha1.UserReplication, replicaPass, host, port) + if err != nil { + return errors.Wrap(err, "exec CHANGE REPLICATION SOURCE TO") + } + + _, err = d.db.ExecContext(ctx, "START REPLICA") + return errors.Wrap(err, "start replication") +} + +func (d *DB) StopReplication(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "STOP REPLICA") + return errors.Wrap(err, "stop replication") +} + +func (d *DB) ResetReplication(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "RESET REPLICA ALL") + return errors.Wrap(err, "reset replication") +} + +func (d *DB) ReplicationStatus(ctx context.Context) (db.ReplicationStatus, string, error) { + row := d.db.QueryRowContext(ctx, ` + SELECT + connection_status.SERVICE_STATE, + applier_status.SERVICE_STATE, + HOST + FROM replication_connection_status connection_status + JOIN replication_connection_configuration connection_configuration + ON connection_status.channel_name = connection_configuration.channel_name + JOIN replication_applier_status applier_status + ON connection_status.channel_name = applier_status.channel_name + WHERE connection_status.channel_name = ? + `, defaultChannelName) + + var ioState, sqlState, host string + if err := row.Scan(&ioState, &sqlState, &host); err != nil { + if errors.Is(err, sql.ErrNoRows) { + return db.ReplicationStatusNotInitiated, "", nil + } + return db.ReplicationStatusError, "", errors.Wrap(err, "scan replication status") + } + + if ioState == "ON" && sqlState == "ON" { + return db.ReplicationStatusActive, host, nil + } + + return db.ReplicationStatusNotInitiated, "", nil +} + +func (d *DB) IsReplica(ctx context.Context) (bool, error) { + status, _, err := d.ReplicationStatus(ctx) + return status == db.ReplicationStatusActive, errors.Wrap(err, "get replication status") +} + +func (d *DB) DisableSuperReadonly(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "SET GLOBAL SUPER_READ_ONLY=0") + return errors.Wrap(err, "set global super_read_only param to 0") +} + +func (d *DB) IsReadonly(ctx context.Context) (bool, error) { + var readonly int + err := d.db.QueryRowContext(ctx, "select @@read_only and @@super_read_only").Scan(&readonly) + return readonly == 1, errors.Wrap(err, "select global read_only param") +} + +func (d *DB) ReportHost(ctx context.Context) (string, error) { + var reportHost string + err := d.db.QueryRowContext(ctx, "select @@report_host").Scan(&reportHost) + return reportHost, errors.Wrap(err, "select report_host param") +} + +func (d *DB) Close() error { + return d.db.Close() +} + +func (d *DB) CloneInProgress(ctx context.Context) (bool, error) { + rows, err := d.db.QueryContext(ctx, "SELECT STATE FROM clone_status") + if err != nil { + return false, errors.Wrap(err, "fetch clone status") + } + defer rows.Close() + + for rows.Next() { + var state string + if err := rows.Scan(&state); err != nil { + return false, errors.Wrap(err, "scan rows") + } + + if state != "Completed" && state != "Failed" { + return true, nil + } + } + + return false, nil +} + +func (d *DB) Clone(ctx context.Context, donor, user, pass string, port int32) error { + _, err := d.db.ExecContext(ctx, "SET GLOBAL clone_valid_donor_list=?", fmt.Sprintf("%s:%d", donor, port)) + if err != nil { + return errors.Wrap(err, "set clone_valid_donor_list") + } + + _, err = d.db.ExecContext(ctx, "CLONE INSTANCE FROM ?@?:? IDENTIFIED BY ?", user, donor, port, pass) + + mErr, ok := err.(*mysql.MySQLError) + if !ok { + return errors.Wrap(err, "clone instance") + } + + // Error 3707: Restart server failed (mysqld is not managed by supervisor process). + if mErr.Number == uint16(3707) { + return ErrRestartAfterClone + } + + return nil +} + +func (d *DB) DumbQuery(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "SELECT 1") + return errors.Wrap(err, "SELECT 1") +} + +func (d *DB) GetMemberState(ctx context.Context, host string) (db.MemberState, error) { + var state db.MemberState + + err := d.db.QueryRowContext(ctx, "SELECT MEMBER_STATE FROM replication_group_members WHERE MEMBER_HOST=?", host).Scan(&state) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return db.MemberStateOffline, nil + } + return db.MemberStateError, errors.Wrap(err, "query member state") + } + + return state, nil +} + +func (d *DB) CheckIfInPrimaryPartition(ctx context.Context) (bool, error) { + var in bool + + err := d.db.QueryRowContext(ctx, ` + SELECT + MEMBER_STATE = 'ONLINE' + AND ( + ( + SELECT + COUNT(*) + FROM + performance_schema.replication_group_members + WHERE + MEMBER_STATE NOT IN ('ONLINE', 'RECOVERING') + ) >= ( + ( + SELECT + COUNT(*) + FROM + performance_schema.replication_group_members + ) / 2 + ) = 0 + ) + FROM + performance_schema.replication_group_members + JOIN performance_schema.replication_group_member_stats USING(member_id) + WHERE + member_id = @@global.server_uuid; + `).Scan(&in) + if err != nil { + return false, err + } + + return in, nil +} + +func (d *DB) EnableSuperReadonly(ctx context.Context) error { + _, err := d.db.ExecContext(ctx, "SET GLOBAL SUPER_READ_ONLY=1") + return errors.Wrap(err, "set global super_read_only param to 1") +} diff --git a/cmd/healthcheck/main.go b/cmd/healthcheck/main.go index 5dd982f2d..cac0020d9 100644 --- a/cmd/healthcheck/main.go +++ b/cmd/healthcheck/main.go @@ -13,9 +13,10 @@ import ( "github.com/pkg/errors" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + database "github.com/percona/percona-server-mysql-operator/cmd/db" + mysqldb "github.com/percona/percona-server-mysql-operator/pkg/db" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" - "github.com/percona/percona-server-mysql-operator/pkg/replicator" ) func main() { @@ -81,7 +82,7 @@ func checkReadinessAsync(ctx context.Context) error { return errors.Wrapf(err, "get %s password", apiv1alpha1.UserMonitor) } - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) if err != nil { return errors.Wrap(err, "connect to db") } @@ -116,7 +117,7 @@ func checkReadinessGR(ctx context.Context) error { return errors.Wrapf(err, "get %s password", apiv1alpha1.UserMonitor) } - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) if err != nil { return errors.Wrap(err, "connect to db") } @@ -132,7 +133,7 @@ func checkReadinessGR(ctx context.Context) error { return errors.Wrap(err, "get member state") } - if state != replicator.MemberStateOnline { + if state != mysqldb.MemberStateOnline { return errors.Errorf("Member state: %s", state) } @@ -150,7 +151,7 @@ func checkLivenessAsync(ctx context.Context) error { return errors.Wrapf(err, "get %s password", apiv1alpha1.UserMonitor) } - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) if err != nil { return errors.Wrap(err, "connect to db") } @@ -170,7 +171,7 @@ func checkLivenessGR(ctx context.Context) error { return errors.Wrapf(err, "get %s password", apiv1alpha1.UserMonitor) } - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) if err != nil { return errors.Wrap(err, "connect to db") } @@ -201,7 +202,7 @@ func checkReplication(ctx context.Context) error { return errors.Wrapf(err, "get %s password", apiv1alpha1.UserMonitor) } - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) + db, err := database.NewDatabase(ctx, apiv1alpha1.UserMonitor, monitorPass, podIP, mysql.DefaultAdminPort) if err != nil { return errors.Wrap(err, "connect to db") } diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 2bca7945f..5ff5535fd 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -163,6 +163,7 @@ func main() { Client: nsClient, Scheme: mgr.GetScheme(), ServerVersion: serverVersion, + ClientCmd: cliCmd, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "PerconaServerMySQLBackup") os.Exit(1) diff --git a/e2e-tests/license/compare/go-licenses b/e2e-tests/license/compare/go-licenses index 9cff4042d..bfe5cc51f 100644 --- a/e2e-tests/license/compare/go-licenses +++ b/e2e-tests/license/compare/go-licenses @@ -3,4 +3,3 @@ BSD-2-Clause BSD-3-Clause ISC MIT -MPL-2.0 diff --git a/e2e-tests/license/compare/golicense b/e2e-tests/license/compare/golicense index 64653f306..db7c44349 100644 --- a/e2e-tests/license/compare/golicense +++ b/e2e-tests/license/compare/golicense @@ -3,4 +3,3 @@ BSD 2-Clause "Simplified" License BSD 3-Clause "New" or "Revised" License ISC License MIT License -Mozilla Public License 2.0 diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 1305ab333..cfcd3b688 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -45,13 +45,13 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" "github.com/percona/percona-server-mysql-operator/pkg/controller/psrestore" + "github.com/percona/percona-server-mysql-operator/pkg/db" "github.com/percona/percona-server-mysql-operator/pkg/haproxy" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" "github.com/percona/percona-server-mysql-operator/pkg/mysqlsh" "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" "github.com/percona/percona-server-mysql-operator/pkg/platform" - "github.com/percona/percona-server-mysql-operator/pkg/replicator" "github.com/percona/percona-server-mysql-operator/pkg/router" "github.com/percona/percona-server-mysql-operator/pkg/util" ) @@ -204,11 +204,7 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * firstPodFQDN := fmt.Sprintf("%s.%s.%s", firstPod.Name, mysql.ServiceName(cr), cr.Namespace) firstPodUri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) - db, err := replicator.NewReplicatorExec(&firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) - if err != nil { - return errors.Wrapf(err, "connect to %s", firstPod.Name) - } - defer db.Close() + um := db.NewReplicationManager(&firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) mysh, err := mysqlsh.NewWithExec(r.ClientCmd, &firstPod, firstPodUri) if err != nil { @@ -223,12 +219,12 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * podFQDN := fmt.Sprintf("%s.%s.%s", pod.Name, mysql.ServiceName(cr), cr.Namespace) - state, err := db.GetMemberState(ctx, podFQDN) + state, err := um.GetMemberState(ctx, podFQDN) if err != nil { return errors.Wrapf(err, "get member state of %s from performance_schema", pod.Name) } - if state == replicator.MemberStateOffline { + if state == db.MemberStateOffline { log.Info("Member is not part of GR or already removed", "member", pod.Name, "memberState", state) continue } @@ -538,15 +534,15 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context return nil } - cm := &corev1.ConfigMap{} - err := r.Client.Get(ctx, orchestrator.NamespacedName(cr), cm) + cmap := &corev1.ConfigMap{} + err := r.Client.Get(ctx, orchestrator.NamespacedName(cr), cmap) if client.IgnoreNotFound(err) != nil { return errors.Wrap(err, "get config map") } existingNodes := make([]string, 0) if !k8serrors.IsNotFound(err) { - cfg, ok := cm.Data[orchestrator.ConfigFileName] + cfg, ok := cmap.Data[orchestrator.ConfigFileName] if !ok { return errors.Errorf("key %s not found in ConfigMap", orchestrator.ConfigFileName) } @@ -1009,12 +1005,9 @@ func (r *PerconaServerMySQLReconciler) getPrimaryFromGR(ctx context.Context, cr return "", err } - db, err := replicator.NewReplicatorExec(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, fqdn) - if err != nil { - return "", errors.Wrapf(err, "open connection to %s", fqdn) - } + um := db.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, fqdn) - return db.GetGroupReplicationPrimary(ctx) + return um.GetGroupReplicationPrimary(ctx) } func (r *PerconaServerMySQLReconciler) getPrimaryHost(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) (string, error) { @@ -1060,10 +1053,7 @@ func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, if err != nil { return err } - repDb, err := replicator.NewReplicatorExec(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) - if err != nil { - return errors.Wrapf(err, "connect to replica %s", hostname) - } + repDb := db.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) if err := orchestrator.StopReplicationExec(gCtx, r.ClientCmd, orcPod, hostname, port); err != nil { return errors.Wrapf(err, "stop replica %s", hostname) @@ -1074,7 +1064,7 @@ func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, return errors.Wrapf(err, "get replication status of %s", hostname) } - for status == replicator.ReplicationStatusActive { + for status == db.ReplicationStatusActive { time.Sleep(250 * time.Millisecond) status, _, err = repDb.ReplicationStatus(ctx) if err != nil { @@ -1117,14 +1107,10 @@ func (r *PerconaServerMySQLReconciler) startAsyncReplication(ctx context.Context if err != nil { return err } - db, err := replicator.NewReplicatorExec(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) - if err != nil { - return errors.Wrapf(err, "get db connection to %s", hostname) - } - defer db.Close() + um := db.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) log.V(1).Info("Change replication source", "primary", primary.Key.Hostname, "replica", hostname) - if err := db.ChangeReplicationSource(ctx, primary.Key.Hostname, replicaPass, primary.Key.Port); err != nil { + if err := um.ChangeReplicationSource(ctx, primary.Key.Hostname, replicaPass, primary.Key.Port); err != nil { return errors.Wrapf(err, "change replication source on %s", hostname) } diff --git a/pkg/controller/ps/user.go b/pkg/controller/ps/user.go index ccfff446c..ab25349d7 100644 --- a/pkg/controller/ps/user.go +++ b/pkg/controller/ps/user.go @@ -17,13 +17,13 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/db" "github.com/percona/percona-server-mysql-operator/pkg/haproxy" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" "github.com/percona/percona-server-mysql-operator/pkg/router" "github.com/percona/percona-server-mysql-operator/pkg/secret" - "github.com/percona/percona-server-mysql-operator/pkg/users" ) const ( @@ -216,11 +216,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a return err } - um, err := users.NewManagerExec(primPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, primaryHost) - if err != nil { - return errors.Wrap(err, "init user manager") - } - defer um.Close() + um := db.NewUserManager(primPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, primaryHost) var asyncPrimary *orchestrator.Instance @@ -236,7 +232,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a } } - if err := um.UpdateUserPasswords(updatedUsers); err != nil { + if err := um.UpdateUserPasswords(ctx, updatedUsers); err != nil { return errors.Wrapf(err, "update passwords") } @@ -346,13 +342,9 @@ func (r *PerconaServerMySQLReconciler) discardOldPasswordsAfterNewPropagated( return err } - um, err := users.NewManagerExec(primPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, primaryHost) - if err != nil { - return errors.Wrap(err, "init user manager") - } - defer um.Close() + um := db.NewUserManager(primPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, primaryHost) - if err := um.DiscardOldPasswords(updatedUsers); err != nil { + if err := um.DiscardOldPasswords(ctx, updatedUsers); err != nil { return errors.Wrap(err, "discard old passwords") } diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index 9b81b1bf1..dbb24c966 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -41,8 +41,8 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" "github.com/percona/percona-server-mysql-operator/pkg/k8s" - "github.com/percona/percona-server-mysql-operator/pkg/mysql/topology" "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/secret" "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" @@ -53,6 +53,7 @@ type PerconaServerMySQLBackupReconciler struct { client.Client Scheme *runtime.Scheme ServerVersion *platform.ServerVersion + ClientCmd clientcmd.Client } //+kubebuilder:rbac:groups=ps.percona.com,resources=perconaservermysqlbackups;perconaservermysqlbackups/status;perconaservermysqlbackups/finalizers,verbs=get;list;watch;create;update;patch;delete @@ -317,17 +318,17 @@ func (r *PerconaServerMySQLBackupReconciler) getBackupSource(ctx context.Context return "", errors.Wrap(err, "get operator password") } - top, err := topology.Get(ctx, cluster, operatorPass) + top, err := getDBTopology(ctx, r.Client, r.ClientCmd, cluster, operatorPass) if err != nil { return "", errors.Wrap(err, "get topology") } var source string - if len(top.Replicas) < 1 { - source = top.Primary - log.Info("no replicas found, using primary as the backup source", "primary", top.Primary) + if len(top.replicas) < 1 { + source = top.primary + log.Info("no replicas found, using primary as the backup source", "primary", top.primary) } else { - source = top.Replicas[0] + source = top.replicas[0] } return source, nil diff --git a/pkg/controller/psbackup/topology.go b/pkg/controller/psbackup/topology.go new file mode 100644 index 000000000..02087120d --- /dev/null +++ b/pkg/controller/psbackup/topology.go @@ -0,0 +1,75 @@ +package psbackup + +import ( + "context" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" + "github.com/percona/percona-server-mysql-operator/pkg/db" + "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" +) + +// topology represents the topology of the database cluster. +type topology struct { + primary string + replicas []string +} + +// getDBTopology returns the topology of the database cluster. +func getDBTopology(ctx context.Context, cli client.Client, cliCmd clientcmd.Client, cluster *apiv1alpha1.PerconaServerMySQL, operatorPass string) (topology, error) { + switch cluster.Spec.MySQL.ClusterType { + case apiv1alpha1.ClusterTypeGR: + firstPod := &corev1.Pod{} + nn := types.NamespacedName{Namespace: cluster.Namespace, Name: mysql.PodName(cluster, 0)} + if err := cli.Get(ctx, nn, firstPod); err != nil { + return topology{}, err + } + + fqdn := mysql.FQDN(cluster, 0) + + rm := db.NewReplicationManager(firstPod, cliCmd, apiv1alpha1.UserOperator, operatorPass, fqdn) + + replicas, err := rm.GetGroupReplicationReplicas(ctx) + if err != nil { + return topology{}, errors.Wrap(err, "get group-replication replicas") + } + + primary, err := rm.GetGroupReplicationPrimary(ctx) + if err != nil { + return topology{}, errors.Wrap(err, "get group-replication primary") + } + return topology{ + primary: primary, + replicas: replicas, + }, nil + case apiv1alpha1.ClusterTypeAsync: + pod := &corev1.Pod{} + nn := types.NamespacedName{Namespace: cluster.Namespace, Name: orchestrator.PodName(cluster, 0)} + if err := cli.Get(ctx, nn, pod); err != nil { + return topology{}, err + } + + primary, err := orchestrator.ClusterPrimaryExec(ctx, cliCmd, pod, cluster.ClusterHint()) + + if err != nil { + return topology{}, errors.Wrap(err, "get primary") + } + + replicas := make([]string, 0, len(primary.Replicas)) + for _, r := range primary.Replicas { + replicas = append(replicas, r.Hostname) + } + return topology{ + primary: primary.Key.Hostname, + replicas: replicas, + }, nil + default: + return topology{}, errors.New("unknown cluster type") + } +} diff --git a/pkg/db/db.go b/pkg/db/db.go new file mode 100644 index 000000000..0d9636996 --- /dev/null +++ b/pkg/db/db.go @@ -0,0 +1,46 @@ +package db + +import ( + "bytes" + "context" + "fmt" + "regexp" + "strings" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" +) + +var sensitiveRegexp = regexp.MustCompile(":.*@") + +type db struct { + client clientcmd.Client + pod *corev1.Pod + user apiv1alpha1.SystemUser + pass string + host string +} + +func newDB(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1alpha1.SystemUser, pass, host string) *db { + return &db{client: cliCmd, pod: pod, user: user, pass: pass, host: host} +} + +func (d *db) exec(ctx context.Context, stm string, stdout, stderr *bytes.Buffer) error { + cmd := []string{"mysql", "--database", "performance_schema", fmt.Sprintf("-p%s", d.pass), "-u", string(d.user), "-h", d.host, "-e", stm} + + err := d.client.Exec(ctx, d.pod, "mysql", cmd, nil, stdout, stderr, false) + if err != nil { + sout := sensitiveRegexp.ReplaceAllString(stdout.String(), ":*****@") + serr := sensitiveRegexp.ReplaceAllString(stderr.String(), ":*****@") + return errors.Wrapf(err, "stdout: %s, stderr: %s", sout, serr) + } + + if strings.Contains(stderr.String(), "ERROR") { + return fmt.Errorf("sql error: %s", stderr) + } + + return nil +} diff --git a/pkg/db/replication.go b/pkg/db/replication.go new file mode 100644 index 000000000..f5a04b1f3 --- /dev/null +++ b/pkg/db/replication.go @@ -0,0 +1,169 @@ +package db + +import ( + "bytes" + "context" + "database/sql" + "encoding/csv" + "fmt" + "github.com/gocarina/gocsv" + "strings" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" +) + +const defaultChannelName = "" + +type ReplicationStatus int8 + +const ( + ReplicationStatusActive ReplicationStatus = iota + ReplicationStatusError + ReplicationStatusNotInitiated +) + +type MemberState string + +const ( + MemberStateOnline MemberState = "ONLINE" + MemberStateOffline MemberState = "OFFLINE" + MemberStateError MemberState = "ERROR" +) + +type ReplicationDBManager struct { + db *db +} + +func NewReplicationManager(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1alpha1.SystemUser, pass, host string) *ReplicationDBManager { + return &ReplicationDBManager{db: newDB(pod, cliCmd, user, pass, host)} +} + +func (m *ReplicationDBManager) query(ctx context.Context, query string, out interface{}) error { + var errb, outb bytes.Buffer + err := m.db.exec(ctx, query, &outb, &errb) + if err != nil { + return err + } + + if !strings.Contains(errb.String(), "ERROR") && outb.Len() == 0 { + return sql.ErrNoRows + } + + r := csv.NewReader(bytes.NewReader(outb.Bytes())) + r.Comma = '\t' + + if err = gocsv.UnmarshalCSV(r, out); err != nil { + return err + } + + return nil +} + +func (m *ReplicationDBManager) ChangeReplicationSource(ctx context.Context, host, replicaPass string, port int32) error { + var errb, outb bytes.Buffer + q := fmt.Sprintf(` + CHANGE REPLICATION SOURCE TO + SOURCE_USER='%s', + SOURCE_PASSWORD='%s', + SOURCE_HOST='%s', + SOURCE_PORT=%d, + SOURCE_SSL=1, + SOURCE_CONNECTION_AUTO_FAILOVER=1, + SOURCE_AUTO_POSITION=1, + SOURCE_RETRY_COUNT=3, + SOURCE_CONNECT_RETRY=60 + `, apiv1alpha1.UserReplication, replicaPass, host, port) + err := m.db.exec(ctx, q, &outb, &errb) + + if err != nil { + return errors.Wrap(err, "exec CHANGE REPLICATION SOURCE TO") + } + + return nil +} + +func (m *ReplicationDBManager) ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error) { + rows := []*struct { + IoState string `csv:"conn_state"` + SqlState string `csv:"applier_state"` + Host string `csv:"host"` + }{} + + q := fmt.Sprintf(` + SELECT + connection_status.SERVICE_STATE as conn_state, + applier_status.SERVICE_STATE as applier_state, + HOST as host + FROM replication_connection_status connection_status + JOIN replication_connection_configuration connection_configuration + ON connection_status.channel_name = connection_configuration.channel_name + JOIN replication_applier_status applier_status + ON connection_status.channel_name = applier_status.channel_name + WHERE connection_status.channel_name = '%s' + `, defaultChannelName) + err := m.query(ctx, q, &rows) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ReplicationStatusNotInitiated, "", nil + } + return ReplicationStatusError, "", errors.Wrap(err, "scan replication status") + } + + if rows[0].IoState == "ON" && rows[0].SqlState == "ON" { + return ReplicationStatusActive, rows[0].Host, nil + } + + return ReplicationStatusNotInitiated, "", err +} + +func (m *ReplicationDBManager) GetGroupReplicationPrimary(ctx context.Context) (string, error) { + rows := []*struct { + Host string `csv:"host"` + }{} + + err := m.query(ctx, "SELECT MEMBER_HOST as host FROM replication_group_members WHERE MEMBER_ROLE='PRIMARY' AND MEMBER_STATE='ONLINE'", &rows) + if err != nil { + return "", errors.Wrap(err, "query primary member") + } + + return rows[0].Host, nil +} + +// TODO: finish implementation +func (m *ReplicationDBManager) GetGroupReplicationReplicas(ctx context.Context) ([]string, error) { + rows := []*struct { + Host string `csv:"host"` + }{} + + err := m.query(ctx, "SELECT MEMBER_HOST as host FROM replication_group_members WHERE MEMBER_ROLE='SECONDARY' AND MEMBER_STATE='ONLINE'", &rows) + if err != nil && !errors.Is(err, sql.ErrNoRows) { + return nil, errors.Wrap(err, "query replicas") + } + + replicas := make([]string, 0) + for _, row := range rows { + replicas = append(replicas, row.Host) + } + + return replicas, nil +} + +func (m *ReplicationDBManager) GetMemberState(ctx context.Context, host string) (MemberState, error) { + rows := []*struct { + State MemberState `csv:"state"` + }{} + q := fmt.Sprintf(`SELECT MEMBER_STATE as state FROM replication_group_members WHERE MEMBER_HOST='%s'`, host) + err := m.query(ctx, q, &rows) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return MemberStateOffline, nil + } + return MemberStateError, errors.Wrap(err, "query member state") + } + + return rows[0].State, nil +} diff --git a/pkg/db/users.go b/pkg/db/users.go new file mode 100644 index 000000000..64e167769 --- /dev/null +++ b/pkg/db/users.go @@ -0,0 +1,73 @@ +package db + +import ( + "bytes" + "context" + "fmt" + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + "strings" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" + "github.com/percona/percona-server-mysql-operator/pkg/mysql" +) + +type UserManager struct { + db *db +} + +func NewUserManager(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1alpha1.SystemUser, pass, host string) *UserManager { + return &UserManager{db: newDB(pod, cliCmd, user, pass, host)} +} + +// UpdateUserPasswords updates user passwords but retains the current password using Dual Password feature of MySQL 8 +func (m *UserManager) UpdateUserPasswords(ctx context.Context, users []mysql.User) error { + for _, user := range users { + for _, host := range user.Hosts { + q := fmt.Sprintf("ALTER USER '%s'@'%s' IDENTIFIED BY '%s' RETAIN CURRENT PASSWORD", user.Username, host, escapePass(user.Password)) + var errb, outb bytes.Buffer + err := m.db.exec(ctx, q, &outb, &errb) + if err != nil { + return errors.Wrap(err, "alter user") + } + } + } + + var errb, outb bytes.Buffer + err := m.db.exec(ctx, "FLUSH PRIVILEGES", &outb, &errb) + if err != nil { + return errors.Wrap(err, "flush privileges") + } + + return nil +} + +// DiscardOldPasswords discards old passwords of givens users +func (m *UserManager) DiscardOldPasswords(ctx context.Context, users []mysql.User) error { + for _, user := range users { + for _, host := range user.Hosts { + q := fmt.Sprintf("ALTER USER '%s'@'%s' DISCARD OLD PASSWORD", user.Username, host) + var errb, outb bytes.Buffer + err := m.db.exec(ctx, q, &outb, &errb) + if err != nil { + return errors.Wrap(err, "discard old password") + } + } + } + + var errb, outb bytes.Buffer + err := m.db.exec(ctx, "FLUSH PRIVILEGES", &outb, &errb) + if err != nil { + return errors.Wrap(err, "flush privileges") + } + + return nil +} + +func escapePass(pass string) string { + s := strings.ReplaceAll(pass, `'`, `\'`) + s = strings.ReplaceAll(s, `"`, `\"`) + s = strings.ReplaceAll(s, `\`, `\\`) + return s +} diff --git a/pkg/mysql/topology/topology.go b/pkg/mysql/topology/topology.go deleted file mode 100644 index 32a5b143a..000000000 --- a/pkg/mysql/topology/topology.go +++ /dev/null @@ -1,77 +0,0 @@ -package topology - -import ( - "context" - - "github.com/pkg/errors" - - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" - "github.com/percona/percona-server-mysql-operator/pkg/mysql" - "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" - "github.com/percona/percona-server-mysql-operator/pkg/replicator" -) - -type Topology struct { - Primary string - Replicas []string -} - -func Get(ctx context.Context, cluster *apiv1alpha1.PerconaServerMySQL, operatorPass string) (Topology, error) { - var err error - var top Topology - switch cluster.Spec.MySQL.ClusterType { - case apiv1alpha1.ClusterTypeGR: - top, err = getGRTopology(ctx, cluster, operatorPass) - if err != nil { - return Topology{}, errors.Wrap(err, "get group-replication topology") - } - case apiv1alpha1.ClusterTypeAsync: - top, err = getAsyncTopology(ctx, cluster) - if err != nil { - return Topology{}, errors.Wrap(err, "get async topology") - } - default: - return Topology{}, errors.New("unknown cluster type") - } - return top, nil -} - -func getGRTopology(ctx context.Context, cluster *apiv1alpha1.PerconaServerMySQL, operatorPass string) (Topology, error) { - fqdn := mysql.FQDN(cluster, 0) - db, err := replicator.NewReplicator(ctx, apiv1alpha1.UserOperator, operatorPass, fqdn, mysql.DefaultAdminPort) - if err != nil { - return Topology{}, errors.Wrapf(err, "open connection to %s", fqdn) - } - defer db.Close() - - replicas, err := db.GetGroupReplicationReplicas(ctx) - if err != nil { - return Topology{}, errors.Wrap(err, "get group-replication replicas") - } - - primary, err := db.GetGroupReplicationPrimary(ctx) - if err != nil { - return Topology{}, errors.Wrap(err, "get group-replication primary") - } - return Topology{ - Primary: primary, - Replicas: replicas, - }, nil -} - -func getAsyncTopology(ctx context.Context, cluster *apiv1alpha1.PerconaServerMySQL) (Topology, error) { - orcHost := orchestrator.APIHost(cluster) - primary, err := orchestrator.ClusterPrimary(ctx, orcHost, cluster.ClusterHint()) - if err != nil { - return Topology{}, errors.Wrap(err, "get primary") - } - - replicas := make([]string, 0, len(primary.Replicas)) - for _, r := range primary.Replicas { - replicas = append(replicas, r.Hostname) - } - return Topology{ - Primary: primary.Key.Hostname, - Replicas: replicas, - }, nil -} diff --git a/pkg/orchestrator/client.go b/pkg/orchestrator/client.go deleted file mode 100644 index 5f9ef2bbe..000000000 --- a/pkg/orchestrator/client.go +++ /dev/null @@ -1,242 +0,0 @@ -package orchestrator - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - - "github.com/pkg/errors" -) - -type orcResponse struct { - Code string `json:"Code"` - Message string `json:"Message"` - Details interface{} `json:"Details,omitempty"` -} - -type InstanceKey struct { - Hostname string `json:"Hostname"` - Port int32 `json:"Port"` -} - -type Instance struct { - Key InstanceKey `json:"Key"` - Alias string `json:"InstanceAlias"` - MasterKey InstanceKey `json:"MasterKey"` - Replicas []InstanceKey `json:"Replicas"` - ReadOnly bool `json:"ReadOnly"` -} - -func ClusterPrimary(ctx context.Context, apiHost, clusterHint string) (*Instance, error) { - url := fmt.Sprintf("%s/api/master/%s", apiHost, clusterHint) - - resp, err := doRequest(ctx, url) - if err != nil { - return nil, errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, errors.Wrap(err, "read response body") - } - - primary := &Instance{} - if err := json.Unmarshal(body, primary); err == nil { - return primary, nil - } - - orcResp := &orcResponse{} - if err := json.Unmarshal(body, orcResp); err != nil { - return nil, errors.Wrap(err, "json decode") - } - - if orcResp.Code == "ERROR" { - return nil, errors.New(orcResp.Message) - } - - return primary, nil -} - -func StopReplication(ctx context.Context, apiHost, host string, port int32) error { - url := fmt.Sprintf("%s/api/stop-replica/%s/%d", apiHost, host, port) - - resp, err := doRequest(ctx, url) - if err != nil { - return errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - orcResp := &orcResponse{} - if err := json.NewDecoder(resp.Body).Decode(orcResp); err != nil { - return errors.Wrap(err, "json decode") - } - - if orcResp.Code == "ERROR" { - return errors.New(orcResp.Message) - } - - return nil -} - -func StartReplication(ctx context.Context, apiHost, host string, port int32) error { - url := fmt.Sprintf("%s/api/start-replica/%s/%d", apiHost, host, port) - - resp, err := doRequest(ctx, url) - if err != nil { - return errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - orcResp := &orcResponse{} - if err := json.NewDecoder(resp.Body).Decode(orcResp); err != nil { - return errors.Wrap(err, "json decode") - } - - if orcResp.Code == "ERROR" { - return errors.New(orcResp.Message) - } - - return nil -} - -func AddPeer(ctx context.Context, apiHost string, peer string) error { - url := fmt.Sprintf("%s/api/raft-add-peer/%s", apiHost, peer) - - resp, err := doRequest(ctx, url) - if err != nil { - return errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - body, err := io.ReadAll(resp.Body) - if err != nil { - return errors.Wrap(err, "read response body") - } - - // Orchestrator returns peer IP as string on success - o := "" - if err := json.Unmarshal(body, &o); err == nil { - return nil - } - - orcResp := &orcResponse{} - if err := json.Unmarshal(body, &orcResp); err != nil { - return errors.Wrap(err, "json decode") - } - - if orcResp.Code == "ERROR" { - return errors.New(orcResp.Message) - } - - return nil -} - -func RemovePeer(ctx context.Context, apiHost string, peer string) error { - url := fmt.Sprintf("%s/api/raft-remove-peer/%s", apiHost, peer) - - resp, err := doRequest(ctx, url) - if err != nil { - return errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - body, err := io.ReadAll(resp.Body) - if err != nil { - return errors.Wrap(err, "read response body") - } - - // Orchestrator returns peer IP as string on success - o := "" - if err := json.Unmarshal(body, &o); err == nil { - return nil - } - - orcResp := &orcResponse{} - if err := json.Unmarshal(body, &orcResp); err != nil { - return errors.Wrap(err, "json decode") - } - - if orcResp.Code == "ERROR" { - return errors.New(orcResp.Message) - } - - return nil -} - -func EnsureNodeIsPrimary(ctx context.Context, apiHost, clusterHint, host string, port int) error { - primary, err := ClusterPrimary(ctx, apiHost, clusterHint) - if err != nil { - return errors.Wrap(err, "get cluster primary") - } - - if primary.Alias == host { - return nil - } - - // /api/graceful-master-takeover-auto/cluster1.default/cluster1-mysql-0/3306 - url := fmt.Sprintf("%s/api/graceful-master-takeover-auto/%s/%s/%d", apiHost, clusterHint, host, port) - - resp, err := doRequest(ctx, url) - if err != nil { - return errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - orcResp := &orcResponse{} - if err := json.NewDecoder(resp.Body).Decode(orcResp); err != nil { - return errors.Wrap(err, "json decode") - } - - if orcResp.Code == "ERROR" { - return errors.New(orcResp.Message) - } - - return nil -} - -var ErrEmptyResponse = errors.New("empty response") - -func Discover(ctx context.Context, apiHost, host string, port int) error { - url := fmt.Sprintf("%s/api/discover/%s/%d", apiHost, host, port) - - resp, err := doRequest(ctx, url) - if err != nil { - return errors.Wrapf(err, "do request to %s", url) - } - defer resp.Body.Close() - - orcResp := new(orcResponse) - data, err := io.ReadAll(resp.Body) - if err != nil { - return errors.Wrap(err, "read response body") - } - - if len(data) == 0 { - return ErrEmptyResponse - } - - if err := json.Unmarshal(data, orcResp); err != nil { - return errors.Wrapf(err, "json decode \"%s\"", string(data)) - } - - if orcResp.Code == "ERROR" { - return errors.New(orcResp.Message) - } - return nil -} - -func doRequest(ctx context.Context, url string) (*http.Response, error) { - req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) - if err != nil { - return nil, errors.Wrap(err, "make request") - } - resp, err := http.DefaultClient.Do(req) - if err != nil { - return nil, errors.Wrap(err, "do request") - } - - return resp, nil -} diff --git a/pkg/orchestrator/clientexec.go b/pkg/orchestrator/clientexec.go index 41242621d..046eac244 100644 --- a/pkg/orchestrator/clientexec.go +++ b/pkg/orchestrator/clientexec.go @@ -12,6 +12,27 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" ) +type orcResponse struct { + Code string `json:"Code"` + Message string `json:"Message"` + Details interface{} `json:"Details,omitempty"` +} + +type InstanceKey struct { + Hostname string `json:"Hostname"` + Port int32 `json:"Port"` +} + +type Instance struct { + Key InstanceKey `json:"Key"` + Alias string `json:"InstanceAlias"` + MasterKey InstanceKey `json:"MasterKey"` + Replicas []InstanceKey `json:"Replicas"` + ReadOnly bool `json:"ReadOnly"` +} + +var ErrEmptyResponse = errors.New("empty response") + func exec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, endpoint string, outb, errb *bytes.Buffer) error { c := []string{"curl", fmt.Sprintf("localhost:%d/%s", defaultWebPort, endpoint)} err := cliCmd.Exec(ctx, pod, "orc", c, nil, outb, errb, false) diff --git a/pkg/platform/platform.go b/pkg/platform/platform.go index c23373963..5b1877121 100644 --- a/pkg/platform/platform.go +++ b/pkg/platform/platform.go @@ -29,7 +29,7 @@ var ( mx sync.Mutex ) -// Server returns server version and platform (k8s|oc) +// GetServerVersion returns server version and platform (k8s|oc) // it performs API requests for the first invocation and then returns "cached" value func GetServerVersion(cliCmd clientcmd.Client) (*ServerVersion, error) { mx.Lock() diff --git a/pkg/replicator/replicator.go b/pkg/replicator/replicator.go deleted file mode 100644 index 435d3527c..000000000 --- a/pkg/replicator/replicator.go +++ /dev/null @@ -1,431 +0,0 @@ -package replicator - -import ( - "context" - "database/sql" - "fmt" - - "github.com/go-sql-driver/mysql" - "github.com/pkg/errors" - - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" - "github.com/percona/percona-server-mysql-operator/pkg/innodbcluster" -) - -const DefaultChannelName = "" - -type ReplicationStatus int8 - -var ErrRestartAfterClone error = errors.New("Error 3707: Restart server failed (mysqld is not managed by supervisor process).") - -const ( - ReplicationStatusActive ReplicationStatus = iota - ReplicationStatusError - ReplicationStatusNotInitiated -) - -type MemberState string - -const ( - MemberStateOnline MemberState = "ONLINE" - MemberStateRecovering MemberState = "RECOVERING" - MemberStateOffline MemberState = "OFFLINE" - MemberStateError MemberState = "ERROR" - MemberStateUnreachable MemberState = "UNREACHABLE" -) - -var ErrGroupReplicationNotReady = errors.New("Error 3092: The server is not configured properly to be an active member of the group.") - -type Replicator interface { - ChangeReplicationSource(ctx context.Context, host, replicaPass string, port int32) error - StartReplication(ctx context.Context, host, replicaPass string, port int32) error - StopReplication(ctx context.Context) error - ResetReplication(ctx context.Context) error - ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error) - EnableSuperReadonly(ctx context.Context) error - DisableSuperReadonly(ctx context.Context) error - IsReadonly(ctx context.Context) (bool, error) - ReportHost(ctx context.Context) (string, error) - Close() error - CloneInProgress(ctx context.Context) (bool, error) - NeedsClone(ctx context.Context, donor string, port int32) (bool, error) - Clone(ctx context.Context, donor, user, pass string, port int32) error - IsReplica(ctx context.Context) (bool, error) - DumbQuery(ctx context.Context) error - GetGlobal(ctx context.Context, variable string) (interface{}, error) - SetGlobal(ctx context.Context, variable, value interface{}) error - StartGroupReplication(ctx context.Context, password string) error - StopGroupReplication(ctx context.Context) error - GetGroupReplicationPrimary(ctx context.Context) (string, error) - GetGroupReplicationReplicas(ctx context.Context) ([]string, error) - GetMemberState(ctx context.Context, host string) (MemberState, error) - GetGroupReplicationMembers(ctx context.Context) ([]string, error) - CheckIfDatabaseExists(ctx context.Context, name string) (bool, error) - CheckIfInPrimaryPartition(ctx context.Context) (bool, error) - CheckIfPrimaryUnreachable(ctx context.Context) (bool, error) -} - -type dbImpl struct{ db *sql.DB } - -func NewReplicator(ctx context.Context, user apiv1alpha1.SystemUser, pass, host string, port int32) (Replicator, error) { - config := mysql.NewConfig() - - config.User = string(user) - config.Passwd = pass - config.Net = "tcp" - config.Addr = fmt.Sprintf("%s:%d", host, port) - config.DBName = "performance_schema" - config.Params = map[string]string{ - "interpolateParams": "true", - "timeout": "10s", - "readTimeout": "10s", - "writeTimeout": "10s", - "tls": "preferred", - } - - db, err := sql.Open("mysql", config.FormatDSN()) - if err != nil { - return nil, errors.Wrap(err, "connect to MySQL") - } - - if err := db.PingContext(ctx); err != nil { - return nil, errors.Wrap(err, "ping database") - } - - return &dbImpl{db}, nil -} - -func (d *dbImpl) ChangeReplicationSource(ctx context.Context, host, replicaPass string, port int32) error { - // TODO: Make retries configurable - _, err := d.db.ExecContext(ctx, ` - CHANGE REPLICATION SOURCE TO - SOURCE_USER=?, - SOURCE_PASSWORD=?, - SOURCE_HOST=?, - SOURCE_PORT=?, - SOURCE_SSL=1, - SOURCE_CONNECTION_AUTO_FAILOVER=1, - SOURCE_AUTO_POSITION=1, - SOURCE_RETRY_COUNT=3, - SOURCE_CONNECT_RETRY=60 - `, apiv1alpha1.UserReplication, replicaPass, host, port) - if err != nil { - return errors.Wrap(err, "exec CHANGE REPLICATION SOURCE TO") - } - - return nil -} - -func (d *dbImpl) StartReplication(ctx context.Context, host, replicaPass string, port int32) error { - if err := d.ChangeReplicationSource(ctx, host, replicaPass, port); err != nil { - return errors.Wrap(err, "change replication source") - } - - _, err := d.db.ExecContext(ctx, "START REPLICA") - return errors.Wrap(err, "start replication") -} - -func (d *dbImpl) StopReplication(ctx context.Context) error { - _, err := d.db.ExecContext(ctx, "STOP REPLICA") - return errors.Wrap(err, "stop replication") -} - -func (d *dbImpl) ResetReplication(ctx context.Context) error { - _, err := d.db.ExecContext(ctx, "RESET REPLICA ALL") - return errors.Wrap(err, "reset replication") -} - -func (d *dbImpl) ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error) { - row := d.db.QueryRowContext(ctx, ` - SELECT - connection_status.SERVICE_STATE, - applier_status.SERVICE_STATE, - HOST - FROM replication_connection_status connection_status - JOIN replication_connection_configuration connection_configuration - ON connection_status.channel_name = connection_configuration.channel_name - JOIN replication_applier_status applier_status - ON connection_status.channel_name = applier_status.channel_name - WHERE connection_status.channel_name = ? - `, DefaultChannelName) - - var ioState, sqlState, host string - if err := row.Scan(&ioState, &sqlState, &host); err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ReplicationStatusNotInitiated, "", nil - } - return ReplicationStatusError, "", errors.Wrap(err, "scan replication status") - } - - if ioState == "ON" && sqlState == "ON" { - return ReplicationStatusActive, host, nil - } - - return ReplicationStatusNotInitiated, "", nil -} - -func (d *dbImpl) IsReplica(ctx context.Context) (bool, error) { - status, _, err := d.ReplicationStatus(ctx) - return status == ReplicationStatusActive, errors.Wrap(err, "get replication status") -} - -func (d *dbImpl) EnableSuperReadonly(ctx context.Context) error { - _, err := d.db.ExecContext(ctx, "SET GLOBAL SUPER_READ_ONLY=1") - return errors.Wrap(err, "set global super_read_only param to 1") -} - -func (d *dbImpl) DisableSuperReadonly(ctx context.Context) error { - _, err := d.db.ExecContext(ctx, "SET GLOBAL SUPER_READ_ONLY=0") - return errors.Wrap(err, "set global super_read_only param to 0") -} - -func (d *dbImpl) IsReadonly(ctx context.Context) (bool, error) { - var readonly int - err := d.db.QueryRowContext(ctx, "select @@read_only and @@super_read_only").Scan(&readonly) - return readonly == 1, errors.Wrap(err, "select global read_only param") -} - -func (d *dbImpl) ReportHost(ctx context.Context) (string, error) { - var reportHost string - err := d.db.QueryRowContext(ctx, "select @@report_host").Scan(&reportHost) - return reportHost, errors.Wrap(err, "select report_host param") -} - -func (d *dbImpl) Close() error { - return d.db.Close() -} - -func (d *dbImpl) CloneInProgress(ctx context.Context) (bool, error) { - rows, err := d.db.QueryContext(ctx, "SELECT STATE FROM clone_status") - if err != nil { - return false, errors.Wrap(err, "fetch clone status") - } - defer rows.Close() - - for rows.Next() { - var state string - if err := rows.Scan(&state); err != nil { - return false, errors.Wrap(err, "scan rows") - } - - if state != "Completed" && state != "Failed" { - return true, nil - } - } - - return false, nil -} - -func (d *dbImpl) NeedsClone(ctx context.Context, donor string, port int32) (bool, error) { - rows, err := d.db.QueryContext(ctx, "SELECT SOURCE, STATE FROM clone_status") - if err != nil { - return false, errors.Wrap(err, "fetch clone status") - } - defer rows.Close() - - for rows.Next() { - var source, state string - if err := rows.Scan(&source, &state); err != nil { - return false, errors.Wrap(err, "scan rows") - } - if source == fmt.Sprintf("%s:%d", donor, port) && state == "Completed" { - return false, nil - } - } - - return true, nil -} - -func (d *dbImpl) Clone(ctx context.Context, donor, user, pass string, port int32) error { - _, err := d.db.ExecContext(ctx, "SET GLOBAL clone_valid_donor_list=?", fmt.Sprintf("%s:%d", donor, port)) - if err != nil { - return errors.Wrap(err, "set clone_valid_donor_list") - } - - _, err = d.db.ExecContext(ctx, "CLONE INSTANCE FROM ?@?:? IDENTIFIED BY ?", user, donor, port, pass) - - mErr, ok := err.(*mysql.MySQLError) - if !ok { - return errors.Wrap(err, "clone instance") - } - - // Error 3707: Restart server failed (mysqld is not managed by supervisor process). - if mErr.Number == uint16(3707) { - return ErrRestartAfterClone - } - - return nil -} - -func (d *dbImpl) DumbQuery(ctx context.Context) error { - _, err := d.db.ExecContext(ctx, "SELECT 1") - return errors.Wrap(err, "SELECT 1") -} - -func (d *dbImpl) GetGlobal(ctx context.Context, variable string) (interface{}, error) { - // TODO: check how to do this without being vulnerable to injection - var value interface{} - err := d.db.QueryRowContext(ctx, fmt.Sprintf("SELECT @@%s", variable)).Scan(&value) - return value, errors.Wrapf(err, "SELECT @@%s", variable) -} - -func (d *dbImpl) SetGlobal(ctx context.Context, variable, value interface{}) error { - _, err := d.db.ExecContext(ctx, fmt.Sprintf("SET GLOBAL %s=?", variable), value) - return errors.Wrapf(err, "SET GLOBAL %s=%s", variable, value) -} - -func (d *dbImpl) StartGroupReplication(ctx context.Context, password string) error { - _, err := d.db.ExecContext(ctx, "START GROUP_REPLICATION USER=?, PASSWORD=?", apiv1alpha1.UserReplication, password) - - mErr, ok := err.(*mysql.MySQLError) - if !ok { - return errors.Wrap(err, "start group replication") - } - - // Error 3092: The server is not configured properly to be an active member of the group. - if mErr.Number == uint16(3092) { - return ErrGroupReplicationNotReady - } - - return errors.Wrap(err, "start group replication") -} - -func (d *dbImpl) StopGroupReplication(ctx context.Context) error { - _, err := d.db.ExecContext(ctx, "STOP GROUP_REPLICATION") - return errors.Wrap(err, "stop group replication") -} - -func (d *dbImpl) GetGroupReplicationPrimary(ctx context.Context) (string, error) { - var host string - - err := d.db.QueryRowContext(ctx, "SELECT MEMBER_HOST FROM replication_group_members WHERE MEMBER_ROLE='PRIMARY' AND MEMBER_STATE='ONLINE'").Scan(&host) - if err != nil { - return "", errors.Wrap(err, "query primary member") - } - - return host, nil -} - -func (d *dbImpl) GetGroupReplicationReplicas(ctx context.Context) ([]string, error) { - replicas := make([]string, 0) - - rows, err := d.db.QueryContext(ctx, "SELECT MEMBER_HOST FROM replication_group_members WHERE MEMBER_ROLE='SECONDARY' AND MEMBER_STATE='ONLINE'") - if err != nil { - return nil, errors.Wrap(err, "query replicas") - } - defer rows.Close() - - for rows.Next() { - var host string - if err := rows.Scan(&host); err != nil { - return nil, errors.Wrap(err, "scan rows") - } - - replicas = append(replicas, host) - } - - return replicas, nil -} - -func (d *dbImpl) GetMemberState(ctx context.Context, host string) (MemberState, error) { - var state MemberState - - err := d.db.QueryRowContext(ctx, "SELECT MEMBER_STATE FROM replication_group_members WHERE MEMBER_HOST=?", host).Scan(&state) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return MemberStateOffline, nil - } - return MemberStateError, errors.Wrap(err, "query member state") - } - - return state, nil -} - -func (d *dbImpl) GetGroupReplicationMembers(ctx context.Context) ([]string, error) { - members := make([]string, 0) - - rows, err := d.db.QueryContext(ctx, "SELECT MEMBER_HOST FROM replication_group_members") - if err != nil { - return nil, errors.Wrap(err, "query members") - } - defer rows.Close() - - for rows.Next() { - var host string - if err := rows.Scan(&host); err != nil { - return nil, errors.Wrap(err, "scan rows") - } - - members = append(members, host) - } - - return members, nil -} - -func (d *dbImpl) CheckIfDatabaseExists(ctx context.Context, name string) (bool, error) { - var db string - - err := d.db.QueryRowContext(ctx, "SHOW DATABASES LIKE ?", name).Scan(&db) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return false, nil - } - return false, err - } - - return true, nil -} - -func (d *dbImpl) CheckIfInPrimaryPartition(ctx context.Context) (bool, error) { - var in bool - - err := d.db.QueryRowContext(ctx, ` - SELECT - MEMBER_STATE = 'ONLINE' - AND ( - ( - SELECT - COUNT(*) - FROM - performance_schema.replication_group_members - WHERE - MEMBER_STATE NOT IN ('ONLINE', 'RECOVERING') - ) >= ( - ( - SELECT - COUNT(*) - FROM - performance_schema.replication_group_members - ) / 2 - ) = 0 - ) - FROM - performance_schema.replication_group_members - JOIN performance_schema.replication_group_member_stats USING(member_id) - WHERE - member_id = @@global.server_uuid; - `).Scan(&in) - if err != nil { - return false, err - } - - return in, nil -} - -func (d *dbImpl) CheckIfPrimaryUnreachable(ctx context.Context) (bool, error) { - var state string - - err := d.db.QueryRowContext(ctx, ` - SELECT - MEMBER_STATE - FROM - performance_schema.replication_group_members - WHERE - MEMBER_ROLE = 'PRIMARY' - `).Scan(&state) - if err != nil { - return false, err - } - - return state == string(innodbcluster.MemberStateUnreachable), nil -} diff --git a/pkg/replicator/replicatorexec.go b/pkg/replicator/replicatorexec.go deleted file mode 100644 index 46cb2ee03..000000000 --- a/pkg/replicator/replicatorexec.go +++ /dev/null @@ -1,457 +0,0 @@ -package replicator - -import ( - "bytes" - "context" - "database/sql" - "encoding/csv" - "fmt" - "regexp" - "strings" - - "github.com/go-sql-driver/mysql" - "github.com/gocarina/gocsv" - "github.com/pkg/errors" - corev1 "k8s.io/api/core/v1" - - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" - "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" - "github.com/percona/percona-server-mysql-operator/pkg/innodbcluster" -) - -var sensitiveRegexp = regexp.MustCompile(":.*@") - -type dbImplExec struct { - client clientcmd.Client - pod *corev1.Pod - user apiv1alpha1.SystemUser - pass string - host string -} - -func NewReplicatorExec(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1alpha1.SystemUser, pass, host string) (Replicator, error) { - return &dbImplExec{client: cliCmd, pod: pod, user: user, pass: pass, host: host}, nil -} - -func (d *dbImplExec) exec(ctx context.Context, stm string, stdout, stderr *bytes.Buffer) error { - cmd := []string{"mysql", "--database", "performance_schema", fmt.Sprintf("-p%s", d.pass), "-u", string(d.user), "-h", d.host, "-e", stm} - - err := d.client.Exec(ctx, d.pod, "mysql", cmd, nil, stdout, stderr, false) - if err != nil { - sout := sensitiveRegexp.ReplaceAllString(stdout.String(), ":*****@") - serr := sensitiveRegexp.ReplaceAllString(stderr.String(), ":*****@") - return errors.Wrapf(err, "run %s, stdout: %s, stderr: %s", cmd, sout, serr) - } - - if strings.Contains(stderr.String(), "ERROR") { - return fmt.Errorf("sql error: %s", stderr) - } - - return nil -} - -func (d *dbImplExec) query(ctx context.Context, query string, out interface{}) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, query, &outb, &errb) - if err != nil { - return err - } - - if !strings.Contains(errb.String(), "ERROR") && outb.Len() == 0 { - return sql.ErrNoRows - } - - csv := csv.NewReader(bytes.NewReader(outb.Bytes())) - csv.Comma = '\t' - - if err = gocsv.UnmarshalCSV(csv, out); err != nil { - return err - } - - return nil -} - -func (d *dbImplExec) ChangeReplicationSource(ctx context.Context, host, replicaPass string, port int32) error { - var errb, outb bytes.Buffer - q := fmt.Sprintf(` - CHANGE REPLICATION SOURCE TO - SOURCE_USER='%s', - SOURCE_PASSWORD='%s', - SOURCE_HOST='%s', - SOURCE_PORT=%d, - SOURCE_SSL=1, - SOURCE_CONNECTION_AUTO_FAILOVER=1, - SOURCE_AUTO_POSITION=1, - SOURCE_RETRY_COUNT=3, - SOURCE_CONNECT_RETRY=60 - `, apiv1alpha1.UserReplication, replicaPass, host, port) - err := d.exec(ctx, q, &outb, &errb) - - if err != nil { - return errors.Wrap(err, "exec CHANGE REPLICATION SOURCE TO") - } - - return nil -} - -func (d *dbImplExec) StartReplication(ctx context.Context, host, replicaPass string, port int32) error { - if err := d.ChangeReplicationSource(ctx, host, replicaPass, port); err != nil { - return errors.Wrap(err, "change replication source") - } - - var errb, outb bytes.Buffer - err := d.exec(ctx, "START REPLICA", &outb, &errb) - return errors.Wrap(err, "start replication") -} - -func (d *dbImplExec) StopReplication(ctx context.Context) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, "STOP REPLICA", &outb, &errb) - return errors.Wrap(err, "stop replication") -} - -func (d *dbImplExec) ResetReplication(ctx context.Context) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, "RESET REPLICA ALL", &outb, &errb) - return errors.Wrap(err, "reset replication") - -} - -func (d *dbImplExec) ReplicationStatus(ctx context.Context) (ReplicationStatus, string, error) { - rows := []*struct { - IoState string `csv:"conn_state"` - SqlState string `csv:"applier_state"` - Host string `csv:"host"` - }{} - - q := fmt.Sprintf(` - SELECT - connection_status.SERVICE_STATE as conn_state, - applier_status.SERVICE_STATE as applier_state, - HOST as host - FROM replication_connection_status connection_status - JOIN replication_connection_configuration connection_configuration - ON connection_status.channel_name = connection_configuration.channel_name - JOIN replication_applier_status applier_status - ON connection_status.channel_name = applier_status.channel_name - WHERE connection_status.channel_name = '%s' - `, DefaultChannelName) - err := d.query(ctx, q, &rows) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ReplicationStatusNotInitiated, "", nil - } - return ReplicationStatusError, "", errors.Wrap(err, "scan replication status") - } - - if rows[0].IoState == "ON" && rows[0].SqlState == "ON" { - return ReplicationStatusActive, rows[0].Host, nil - } - - return ReplicationStatusNotInitiated, "", err -} - -func (d *dbImplExec) IsReplica(ctx context.Context) (bool, error) { - status, _, err := d.ReplicationStatus(ctx) - return status == ReplicationStatusActive, errors.Wrap(err, "get replication status") -} - -func (d *dbImplExec) EnableSuperReadonly(ctx context.Context) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, "SET GLOBAL SUPER_READ_ONLY=1", &outb, &errb) - return errors.Wrap(err, "set global super_read_only param to 1") -} - -func (d *dbImplExec) DisableSuperReadonly(ctx context.Context) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, "SET GLOBAL SUPER_READ_ONLY=0", &outb, &errb) - return errors.Wrap(err, "set global super_read_only param to 0") -} - -func (d *dbImplExec) IsReadonly(ctx context.Context) (bool, error) { - rows := []*struct { - Readonly int `csv:"readonly"` - }{} - - err := d.query(ctx, "select @@read_only and @@super_read_only as readonly", &rows) - if err != nil { - return false, err - } - - return rows[0].Readonly == 1, nil -} - -func (d *dbImplExec) ReportHost(ctx context.Context) (string, error) { - rows := []*struct { - Host string `csv:"host"` - }{} - - err := d.query(ctx, "select @@report_host as host", &rows) - if err != nil { - return "", err - } - - return rows[0].Host, nil -} - -func (d *dbImplExec) Close() error { - return nil -} - -func (d *dbImplExec) CloneInProgress(ctx context.Context) (bool, error) { - rows := []*struct { - State string `csv:"state"` - }{} - err := d.query(ctx, "SELECT STATE FROM clone_status as state", &rows) - if err != nil { - return false, errors.Wrap(err, "fetch clone status") - } - - for _, row := range rows { - if row.State != "Completed" && row.State != "Failed" { - return true, nil - } - } - - return false, nil -} - -func (d *dbImplExec) NeedsClone(ctx context.Context, donor string, port int32) (bool, error) { - rows := []*struct { - Source string `csv:"source"` - State string `csv:"state"` - }{} - err := d.query(ctx, "SELECT SOURCE as source, STATE as state FROM clone_status", &rows) - if err != nil { - return false, errors.Wrap(err, "fetch clone status") - } - - for _, row := range rows { - if row.Source == fmt.Sprintf("%s:%d", donor, port) && row.State == "Completed" { - return false, nil - } - } - - return true, nil -} - -func (d *dbImplExec) Clone(ctx context.Context, donor, user, pass string, port int32) error { - var errb, outb bytes.Buffer - q := fmt.Sprintf("SET GLOBAL clone_valid_donor_list='%s'", fmt.Sprintf("%s:%d", donor, port)) - err := d.exec(ctx, q, &outb, &errb) - if err != nil { - return errors.Wrap(err, "set clone_valid_donor_list") - } - - q = fmt.Sprintf("CLONE INSTANCE FROM %s@%s:%d IDENTIFIED BY %s", user, donor, port, pass) - err = d.exec(ctx, q, &outb, &errb) - - if strings.Contains(errb.String(), "ERROR") { - return errors.Wrap(err, "clone instance") - } - - // Error 3707: Restart server failed (mysqld is not managed by supervisor process). - if strings.Contains(errb.String(), "3707") { - return ErrRestartAfterClone - } - - return nil -} - -func (d *dbImplExec) DumbQuery(ctx context.Context) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, "SELECT 1", &outb, &errb) - - return errors.Wrap(err, "SELECT 1") -} - -func (d *dbImplExec) GetGlobal(ctx context.Context, variable string) (interface{}, error) { - rows := []*struct { - Val interface{} `csv:"val"` - }{} - - // TODO: check how to do this without being vulnerable to injection - err := d.query(ctx, fmt.Sprintf("SELECT @@%s as val", variable), &rows) - if err != nil { - return nil, errors.Wrapf(err, "SELECT @@%s", variable) - } - - return rows[0].Val, nil -} - -func (d *dbImplExec) SetGlobal(ctx context.Context, variable, value interface{}) error { - var errb, outb bytes.Buffer - q := fmt.Sprintf("SET GLOBAL %s=%s", variable, value) - err := d.exec(ctx, q, &outb, &errb) - if err != nil { - return errors.Wrapf(err, "SET GLOBAL %s=%s", variable, value) - - } - return nil -} - -func (d *dbImplExec) StartGroupReplication(ctx context.Context, password string) error { - var errb, outb bytes.Buffer - q := fmt.Sprintf("START GROUP_REPLICATION USER='%s', PASSWORD='%s'", apiv1alpha1.UserReplication, password) - err := d.exec(ctx, q, &outb, &errb) - - mErr, ok := err.(*mysql.MySQLError) - if !ok { - return errors.Wrap(err, "start group replication") - } - - // Error 3092: The server is not configured properly to be an active member of the group. - if mErr.Number == uint16(3092) { - return ErrGroupReplicationNotReady - } - - return errors.Wrap(err, "start group replication") -} - -func (d *dbImplExec) StopGroupReplication(ctx context.Context) error { - var errb, outb bytes.Buffer - err := d.exec(ctx, "STOP GROUP_REPLICATION", &outb, &errb) - return errors.Wrap(err, "stop group replication") -} - -func (d *dbImplExec) GetGroupReplicationPrimary(ctx context.Context) (string, error) { - rows := []*struct { - Host string `csv:"host"` - }{} - - err := d.query(ctx, "SELECT MEMBER_HOST as host FROM replication_group_members WHERE MEMBER_ROLE='PRIMARY' AND MEMBER_STATE='ONLINE'", &rows) - if err != nil { - return "", errors.Wrap(err, "query primary member") - } - - return rows[0].Host, nil -} - -// TODO: finish implementation -func (d *dbImplExec) GetGroupReplicationReplicas(ctx context.Context) ([]string, error) { - rows := []*struct { - Host string `csv:"host"` - }{} - - err := d.query(ctx, "SELECT MEMBER_HOST as host FROM replication_group_members WHERE MEMBER_ROLE='SECONDARY' AND MEMBER_STATE='ONLINE'", &rows) - if err != nil { - return nil, errors.Wrap(err, "query replicas") - } - - replicas := make([]string, 0) - for _, row := range rows { - replicas = append(replicas, row.Host) - } - - return replicas, nil -} - -func (d *dbImplExec) GetMemberState(ctx context.Context, host string) (MemberState, error) { - rows := []*struct { - State MemberState `csv:"state"` - }{} - q := fmt.Sprintf(`SELECT MEMBER_STATE as state FROM replication_group_members WHERE MEMBER_HOST='%s'`, host) - err := d.query(ctx, q, &rows) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return MemberStateOffline, nil - } - return MemberStateError, errors.Wrap(err, "query member state") - } - - return rows[0].State, nil -} - -func (d *dbImplExec) GetGroupReplicationMembers(ctx context.Context) ([]string, error) { - rows := []*struct { - Member string `csv:"member"` - }{} - - err := d.query(ctx, "SELECT MEMBER_HOST as member FROM replication_group_members", &rows) - if err != nil { - return nil, errors.Wrap(err, "query members") - } - - members := make([]string, 0) - for _, row := range rows { - members = append(members, row.Member) - } - - return members, nil -} - -func (d *dbImplExec) CheckIfDatabaseExists(ctx context.Context, name string) (bool, error) { - rows := []*struct { - DB string `csv:"db"` - }{} - - q := fmt.Sprintf("SELECT SCHEMA_NAME AS db FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE '%s'", name) - err := d.query(ctx, q, &rows) - - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return false, nil - } - return false, err - } - - return true, nil -} - -// TODO: finish implementation -func (d *dbImplExec) CheckIfInPrimaryPartition(ctx context.Context) (bool, error) { - rows := []*struct { - In bool `csv:"in"` - }{} - - err := d.query(ctx, ` - SELECT - MEMBER_STATE = 'ONLINE' - AND ( - ( - SELECT - COUNT(*) - FROM - performance_schema.replication_group_members - WHERE - MEMBER_STATE NOT IN ('ONLINE', 'RECOVERING') - ) >= ( - ( - SELECT - COUNT(*) - FROM - performance_schema.replication_group_members - ) / 2 - ) = 0 - ) as in - FROM - performance_schema.replication_group_members - JOIN performance_schema.replication_group_member_stats USING(member_id) - WHERE - member_id = @@glob, &outb, &errba - `, &rows) - - if err != nil { - return false, err - } - - return rows[0].In, nil -} - -func (d *dbImplExec) CheckIfPrimaryUnreachable(ctx context.Context) (bool, error) { - var state string - - err := d.query(ctx, ` - SELECT - MEMBER_STATE - FROM - performance_schema.replication_group_members - WHERE - MEMBER_ROLE = 'PRIMARY' - `, &state) - if err != nil { - return false, err - } - - return state == string(innodbcluster.MemberStateUnreachable), nil -} diff --git a/pkg/users/users.go b/pkg/users/users.go deleted file mode 100644 index 33ed1a0bd..000000000 --- a/pkg/users/users.go +++ /dev/null @@ -1,132 +0,0 @@ -package users - -import ( - "database/sql" - "fmt" - - mysqldriver "github.com/go-sql-driver/mysql" - "github.com/pkg/errors" - - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" - "github.com/percona/percona-server-mysql-operator/pkg/mysql" -) - -type Manager interface { - UpdateUserPasswords(users []mysql.User) error - DiscardOldPasswords(users []mysql.User) error - Close() error -} - -type dbImpl struct{ db *sql.DB } - -func NewManager(user apiv1alpha1.SystemUser, pass, host string, port int32) (Manager, error) { - config := mysqldriver.NewConfig() - - config.User = string(user) - config.Passwd = pass - config.Net = "tcp" - config.Addr = fmt.Sprintf("%s:%d", host, port) - config.DBName = "performance_schema" - config.Params = map[string]string{ - "interpolateParams": "true", - "timeout": "20s", - "readTimeout": "20s", - "writeTimeout": "20s", - "tls": "preferred", - } - - db, err := sql.Open("mysql", config.FormatDSN()) - if err != nil { - return nil, errors.Wrap(err, "connect to MySQL") - } - - if err := db.Ping(); err != nil { - return nil, errors.Wrap(err, "ping database") - } - - return &dbImpl{db}, nil -} - -// UpdateUserPasswords updates user passwords but retains the current password using Dual Password feature of MySQL 8 -func (d *dbImpl) UpdateUserPasswords(users []mysql.User) error { - tx, err := d.db.Begin() - if err != nil { - return errors.Wrap(err, "begin transaction") - } - - for _, user := range users { - for _, host := range user.Hosts { - _, err = tx.Exec("ALTER USER ?@? IDENTIFIED BY ? RETAIN CURRENT PASSWORD", user.Username, host, user.Password) - if err != nil { - err = errors.Wrap(err, "alter user") - - if errT := tx.Rollback(); errT != nil { - return errors.Wrap(errors.Wrap(errT, "rollback"), err.Error()) - } - - return err - } - } - } - - _, err = tx.Exec("FLUSH PRIVILEGES") - if err != nil { - err = errors.Wrap(err, "flush privileges") - - if errT := tx.Rollback(); errT != nil { - return errors.Wrap(errors.Wrap(errT, "rollback"), err.Error()) - } - - return err - } - - if err := tx.Commit(); err != nil { - return errors.Wrap(err, "commit transaction") - } - - return nil -} - -// DiscardOldPasswords discards old passwords of givens users -func (d *dbImpl) DiscardOldPasswords(users []mysql.User) error { - tx, err := d.db.Begin() - if err != nil { - return errors.Wrap(err, "begin transaction") - } - - for _, user := range users { - for _, host := range user.Hosts { - _, err = tx.Exec("ALTER USER ?@? DISCARD OLD PASSWORD", user.Username, host) - if err != nil { - err = errors.Wrap(err, "alter user") - - if errT := tx.Rollback(); errT != nil { - return errors.Wrap(errors.Wrap(errT, "rollback"), err.Error()) - } - - return err - } - } - } - - _, err = tx.Exec("FLUSH PRIVILEGES") - if err != nil { - err = errors.Wrap(err, "flush privileges") - - if errT := tx.Rollback(); errT != nil { - return errors.Wrap(errors.Wrap(errT, "rollback"), err.Error()) - } - - return err - } - - if err := tx.Commit(); err != nil { - return errors.Wrap(err, "commit transaction") - } - - return nil -} - -func (d *dbImpl) Close() error { - return d.db.Close() -} diff --git a/pkg/users/usersexec.go b/pkg/users/usersexec.go deleted file mode 100644 index b143c5150..000000000 --- a/pkg/users/usersexec.go +++ /dev/null @@ -1,101 +0,0 @@ -package users - -import ( - "bytes" - "context" - "fmt" - "regexp" - "strings" - - "github.com/pkg/errors" - corev1 "k8s.io/api/core/v1" - - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" - "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" - "github.com/percona/percona-server-mysql-operator/pkg/mysql" -) - -var sensitiveRegexp = regexp.MustCompile(":.*@") - -type dbExecImpl struct { - client clientcmd.Client - pod *corev1.Pod - user apiv1alpha1.SystemUser - pass string - host string -} - -func NewManagerExec(pod *corev1.Pod, cliCmd clientcmd.Client, user apiv1alpha1.SystemUser, pass, host string) (Manager, error) { - return &dbExecImpl{client: cliCmd, pod: pod, user: user, pass: pass, host: host}, nil -} - -func (d *dbExecImpl) exec(stm string) error { - - cmd := []string{"mysql", "--database", "performance_schema", fmt.Sprintf("-p%s", escapePass(d.pass)), "-u", string(d.user), "-h", d.host, "-e", stm} - - var outb, errb bytes.Buffer - err := d.client.Exec(context.TODO(), d.pod, "mysql", cmd, nil, &outb, &errb, false) - if err != nil { - sout := sensitiveRegexp.ReplaceAllString(outb.String(), ":*****@") - serr := sensitiveRegexp.ReplaceAllString(errb.String(), ":*****@") - return errors.Wrapf(err, "run %s, stdout: %s, stderr: %s", cmd, sout, serr) - } - - if strings.Contains(errb.String(), "ERROR") { - serr := sensitiveRegexp.ReplaceAllString(errb.String(), ":*****@") - return fmt.Errorf("sql error: %s", serr) - } - - return nil -} - -// UpdateUserPasswords updates user passwords but retains the current password using Dual Password feature of MySQL 8 -func (d *dbExecImpl) UpdateUserPasswords(users []mysql.User) error { - for _, user := range users { - for _, host := range user.Hosts { - q := fmt.Sprintf("ALTER USER '%s'@'%s' IDENTIFIED BY '%s' RETAIN CURRENT PASSWORD", user.Username, host, escapePass(user.Password)) - err := d.exec(q) - if err != nil { - return errors.Wrap(err, "alter user") - } - } - } - - err := d.exec("FLUSH PRIVILEGES") - if err != nil { - return errors.Wrap(err, "flush privileges") - } - - return nil -} - -// DiscardOldPasswords discards old passwords of givens users -func (d *dbExecImpl) DiscardOldPasswords(users []mysql.User) error { - for _, user := range users { - for _, host := range user.Hosts { - q := fmt.Sprintf("ALTER USER '%s'@'%s' DISCARD OLD PASSWORD", user.Username, host) - err := d.exec(q) - if err != nil { - return errors.Wrap(err, "discard old password") - } - } - } - - err := d.exec("FLUSH PRIVILEGES") - if err != nil { - return errors.Wrap(err, "flush privileges") - } - - return nil -} - -func (d *dbExecImpl) Close() error { - return nil -} - -func escapePass(pass string) string { - s := strings.ReplaceAll(pass, `'`, `\'`) - s = strings.ReplaceAll(s, `"`, `\"`) - s = strings.ReplaceAll(s, `\`, `\\`) - return s -} From b305fb404498a1cb54dbda7b9a3433fe41e66389 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:12:02 +0200 Subject: [PATCH 058/192] CLOUD-727: Bump sigs.k8s.io/controller-runtime from 0.16.3 to 0.17.0 (#522) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.16.3 to 0.17.0. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.3...v0.17.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 30 ++++++++++----------- go.sum | 82 +++++++++++++++++++++++----------------------------------- 2 files changed, 47 insertions(+), 65 deletions(-) diff --git a/go.mod b/go.mod index ffd6d9063..0630c3239 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.66 - github.com/onsi/ginkgo/v2 v2.13.2 + github.com/onsi/ginkgo/v2 v2.14.0 github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 @@ -27,12 +27,13 @@ require ( k8s.io/apimachinery v0.29.0 k8s.io/client-go v0.29.0 k8s.io/utils v0.0.0-20230726121419-3b25d923346b - sigs.k8s.io/controller-runtime v0.16.3 + sigs.k8s.io/controller-runtime v0.17.0 ) require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect go.opentelemetry.io/otel/metric v1.20.0 // indirect @@ -53,10 +54,10 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.4 // indirect + github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/analysis v0.22.0 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect @@ -79,7 +80,6 @@ require ( github.com/klauspost/compress v1.17.4 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -89,10 +89,10 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -111,11 +111,11 @@ require ( golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/tools v0.16.1 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect @@ -124,12 +124,12 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.3 // indirect - k8s.io/component-base v0.28.3 // indirect + k8s.io/apiextensions-apiserver v0.29.0 // indirect + k8s.io/component-base v0.29.0 // indirect k8s.io/klog/v2 v2.110.1 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/gateway-api v0.8.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index bab1a45d7..0bc435695 100644 --- a/go.sum +++ b/go.sum @@ -52,23 +52,22 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/analysis v0.22.0 h1:wQ/d07nf78HNj4u+KiSY0sT234IAyePPbMgpUjUJQR0= github.com/go-openapi/analysis v0.22.0/go.mod h1:acDnkkCI2QxIo8sSIPgmp1wUlRohV7vfGtAIVae73b0= github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= @@ -139,7 +138,6 @@ github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -168,8 +166,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.66 h1:bnTOXOHjOqv/gcMuiVbN9o2ngRItvqE774dG9nq0Dzw= @@ -197,8 +195,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= -github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= -github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -212,15 +210,15 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= @@ -238,7 +236,6 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -246,8 +243,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= @@ -264,7 +259,6 @@ github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcm github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= @@ -286,14 +280,12 @@ go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -312,10 +304,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -325,7 +314,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= @@ -335,11 +323,9 @@ golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -350,18 +336,15 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= @@ -385,10 +368,9 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -444,27 +426,27 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= +k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= -k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= +k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= +k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s= +sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg= sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= From b29236245fa2e73df4ead59fea6544d3b6c0872a Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Fri, 19 Jan 2024 09:40:08 +0100 Subject: [PATCH 059/192] Log setting safe size if unsafe config is not allowed. (#524) --- api/v1alpha1/perconaservermysql_types.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 861ae026e..da1b5b3e8 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -628,6 +628,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi if cr.Spec.MySQL.ClusterType == ClusterTypeGR && !cr.Spec.AllowUnsafeConfig { if cr.Spec.MySQL.Size < MinSafeGRSize { + log.Info("Setting safe defaults, updating MySQL cluster size", "oldSize", cr.Spec.MySQL.Size, "newSafeSize", MinSafeGRSize) cr.Spec.MySQL.Size = MinSafeGRSize } @@ -646,6 +647,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi if cr.RouterEnabled() && !cr.Spec.AllowUnsafeConfig { if cr.Spec.Proxy.Router.Size < MinSafeProxySize { + log.Info("Setting safe defaults, updating Router size", "oldSize", cr.Spec.Proxy.Router.Size, "newSafeSize", MinSafeProxySize) cr.Spec.Proxy.Router.Size = MinSafeProxySize } } @@ -656,6 +658,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi if cr.HAProxyEnabled() && !cr.Spec.AllowUnsafeConfig { if cr.Spec.Proxy.HAProxy.Size < MinSafeProxySize { + log.Info("Setting safe defaults, updating HAProxy size", "oldSize", cr.Spec.Proxy.HAProxy.Size, "newSafeSize", MinSafeProxySize) cr.Spec.Proxy.HAProxy.Size = MinSafeProxySize } } From 2a5da2fe8e78b78e6ca4841feda2a258d137f5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Mon, 22 Jan 2024 10:42:01 +0300 Subject: [PATCH 060/192] CLOUD-835: Add action to check if manifests are up-to-date (#525) --- .github/pull_request_template.md | 1 - .github/workflows/reviewdog.yml | 9 + ...percona.com_perconaservermysqlbackups.yaml | 54 +- ...ercona.com_perconaservermysqlrestores.yaml | 54 +- .../ps.percona.com_perconaservermysqls.yaml | 353 ++++++++++---- deploy/bundle.yaml | 461 ++++++++++++++---- deploy/crd.yaml | 461 ++++++++++++++---- 7 files changed, 1068 insertions(+), 325 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8a5cee744..a6b8e8623 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -22,7 +22,6 @@ **Config/Logging/Testability** - [ ] Are all needed new/changed options added to default YAML files? -- [ ] Are the manifests (crd/bundle) regenerated if needed? - [ ] Did we add proper logging messages for operator actions? - [ ] Did we ensure compatibility with the previous version or cluster upgrade process? - [ ] Does the change support oldest and newest supported PS version? diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index fba5370ff..9544c0adf 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -77,3 +77,12 @@ jobs: github_token: ${{ secrets.github_token }} reporter: github-pr-review level: info + + manifests: + name: runner / manifests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + make generate manifests VERSION=main + git diff --exit-code diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml index 50f029384..5788cd229 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml @@ -196,6 +196,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -264,6 +274,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -330,6 +350,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -398,6 +428,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -735,18 +775,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -790,6 +818,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml index 8948b8537..b313cf284 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml @@ -180,6 +180,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -248,6 +258,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -314,6 +334,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -382,6 +412,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -719,18 +759,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -774,6 +802,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: diff --git a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml index bd60e8703..34a5077eb 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml @@ -298,6 +298,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -366,6 +376,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -432,6 +452,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -500,6 +530,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -837,18 +877,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -892,6 +920,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -1048,6 +1078,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1116,6 +1156,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1182,6 +1232,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1250,6 +1310,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1796,18 +1866,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1851,6 +1909,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -2091,18 +2151,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2146,6 +2194,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -2334,6 +2384,43 @@ spec: sources: items: properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object configMap: properties: items: @@ -2713,6 +2800,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -2763,6 +2858,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -3003,6 +3106,8 @@ spec: x-kubernetes-int-or-string: true type: object type: object + restartPolicy: + type: string securityContext: properties: allowPrivilegeEscalation: @@ -3344,18 +3449,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -3399,6 +3492,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -3539,6 +3634,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -3607,6 +3712,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -3673,6 +3788,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -3741,6 +3866,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -4397,18 +4532,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -4452,6 +4575,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -4705,6 +4830,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -4773,6 +4908,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -4839,6 +4984,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -4907,6 +5062,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5563,18 +5728,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -5618,6 +5771,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -5758,6 +5913,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5826,6 +5991,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5892,6 +6067,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5960,6 +6145,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6616,18 +6811,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -6671,6 +6854,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 480818ef5..e94f4e46c 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -195,6 +195,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -263,6 +273,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -329,6 +349,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -397,6 +427,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -734,18 +774,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -789,6 +817,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -986,6 +1016,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1054,6 +1094,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1120,6 +1170,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1188,6 +1248,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1525,18 +1595,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1580,6 +1638,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -1910,6 +1970,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1978,6 +2048,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2044,6 +2124,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2112,6 +2202,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2449,18 +2549,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2504,6 +2592,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -2660,6 +2750,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2728,6 +2828,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2794,6 +2904,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2862,6 +2982,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -3408,18 +3538,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -3463,6 +3581,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -3703,18 +3823,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -3758,6 +3866,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -3946,6 +4056,43 @@ spec: sources: items: properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object configMap: properties: items: @@ -4325,6 +4472,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -4375,6 +4530,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -4615,6 +4778,8 @@ spec: x-kubernetes-int-or-string: true type: object type: object + restartPolicy: + type: string securityContext: properties: allowPrivilegeEscalation: @@ -4956,18 +5121,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -5011,6 +5164,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -5151,6 +5306,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5219,6 +5384,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5285,6 +5460,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5353,6 +5538,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6009,18 +6204,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -6064,6 +6247,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -6317,6 +6502,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6385,6 +6580,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6451,6 +6656,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6519,6 +6734,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7175,18 +7400,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -7230,6 +7443,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -7370,6 +7585,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7438,6 +7663,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7504,6 +7739,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7572,6 +7817,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -8228,18 +8483,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -8283,6 +8526,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: diff --git a/deploy/crd.yaml b/deploy/crd.yaml index 1520c2543..5482ce331 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -195,6 +195,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -263,6 +273,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -329,6 +349,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -397,6 +427,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -734,18 +774,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -789,6 +817,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -986,6 +1016,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1054,6 +1094,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1120,6 +1170,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1188,6 +1248,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1525,18 +1595,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1580,6 +1638,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -1910,6 +1970,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -1978,6 +2048,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2044,6 +2124,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2112,6 +2202,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2449,18 +2549,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2504,6 +2592,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -2660,6 +2750,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2728,6 +2828,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2794,6 +2904,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -2862,6 +2982,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -3408,18 +3538,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -3463,6 +3581,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -3703,18 +3823,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -3758,6 +3866,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -3946,6 +4056,43 @@ spec: sources: items: properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object configMap: properties: items: @@ -4325,6 +4472,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -4375,6 +4530,14 @@ spec: required: - port type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: properties: host: @@ -4615,6 +4778,8 @@ spec: x-kubernetes-int-or-string: true type: object type: object + restartPolicy: + type: string securityContext: properties: allowPrivilegeEscalation: @@ -4956,18 +5121,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -5011,6 +5164,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -5151,6 +5306,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5219,6 +5384,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5285,6 +5460,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -5353,6 +5538,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6009,18 +6204,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -6064,6 +6247,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -6317,6 +6502,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6385,6 +6580,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6451,6 +6656,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -6519,6 +6734,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7175,18 +7400,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -7230,6 +7443,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: @@ -7370,6 +7585,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7438,6 +7663,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7504,6 +7739,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -7572,6 +7817,16 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: properties: matchExpressions: @@ -8228,18 +8483,6 @@ spec: type: object resources: properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -8283,6 +8526,8 @@ spec: x-kubernetes-map-type: atomic storageClassName: type: string + volumeAttributesClassName: + type: string volumeMode: type: string volumeName: From 989e6e616f3fb125dc0dfed0845fdc906405c408 Mon Sep 17 00:00:00 2001 From: Sergey Pronin Date: Wed, 24 Jan 2024 23:37:30 +0300 Subject: [PATCH 061/192] CLOUD-828 create issue templates (#536) --- .github/ISSUE_TEMPLATE/1-feature-request.yml | 33 ++++++++++++ .github/ISSUE_TEMPLATE/2-bug-report.yml | 53 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 +++ 3 files changed, 94 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/1-feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/2-bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/1-feature-request.yml b/.github/ISSUE_TEMPLATE/1-feature-request.yml new file mode 100644 index 000000000..19b51db8e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-feature-request.yml @@ -0,0 +1,33 @@ +name: Feature request 🧭 +description: Suggest an idea for this project +labels: "feature-request" +body: +- type: textarea + attributes: + label: Proposal + description: "What would you like to have as a feature" + placeholder: "A clear and concise description of what you want to happen." + validations: + required: true +- type: textarea + attributes: + label: Use-Case + description: "How would this help you?" + placeholder: "Tell us more what you'd like to achieve." + validations: + required: false +- type: dropdown + id: interested-in-implementing-the-feature + attributes: + label: Is this a feature you are interested in implementing yourself? + options: + - 'No' + - 'Maybe' + - 'Yes' + validations: + required: true +- type: textarea + id: anything-else + attributes: + label: Anything else? + description: "Let us know if you have anything else to share" diff --git a/.github/ISSUE_TEMPLATE/2-bug-report.yml b/.github/ISSUE_TEMPLATE/2-bug-report.yml new file mode 100644 index 000000000..ed512199a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-bug-report.yml @@ -0,0 +1,53 @@ +name: Report a bug 🐛 +description: Create a report to help us improve +labels: "bug" +body: +- type: markdown + attributes: + value: | + ## Self-help + Thank you for considering to open a bug report! + + Before you do, however, make sure to check our existing resources to see if it has already been discussed/reported: + - [Reported bugs](https://github.com/percona/percona-server-mysql-operator/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) + - [JIRA bugs](https://perconadev.atlassian.net/issues/?jql=project%20%3D%20%22Percona%20Operator%20for%20MySQL%22%20and%20issuetype%20%3D%20Bug%20and%20resolution%20%3D%20unresolved%20order%20BY%20created%20DESC) + - [Percona Operator for MySQL forum](https://forums.percona.com/c/mysql-mariadb/percona-kubernetes-operator-for-mysql/28) +- type: textarea + attributes: + label: Report + description: "What bug have you encountered?" + placeholder: "A clear and concise description of what the bug is." + validations: + required: true +- type: textarea + attributes: + label: More about the problem + description: What do you see happening + placeholder: Logs, expected behavior, other + validations: + required: true +- type: textarea + attributes: + label: Steps to reproduce + description: "Tell us how to reproduce the problem" + value: | + 1. + 2. + 3. + validations: + required: true +- type: textarea + attributes: + label: Versions + description: "Tell us which versions do you use" + value: | + 1. Kubernetes + 2. Operator + 3. Database + validations: + required: true +- type: textarea + id: anything-else + attributes: + label: Anything else? + description: "Let us know if you have anything else to share" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..f58497609 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Ask a question about Percona Operator for MySQL or get support + url: https://forums.percona.com/c/mysql-mariadb/percona-kubernetes-operator-for-mysql/28 + about: Ask a question or request support for using Percona Operator for MySQL + - name: Report vulnerability or security concern + url: https://www.percona.com/security + about: For any security issues or concerns From 20a2a29e4cccb04667844ac9799b052393345794 Mon Sep 17 00:00:00 2001 From: Anastasia Alexandrova Date: Thu, 25 Jan 2024 10:16:07 +0100 Subject: [PATCH 062/192] CLOUD-820 Update README to mention documentation (#526) * CLOUD-820 Added links to docs to README modified: README.md * Update README.md Co-authored-by: Dmitriy Kostiuk * Update README.md Co-authored-by: Dmitriy Kostiuk * Added kubectl install commands to Quickstart section of Readme * Removed Everest mentioning as not yet supported one --------- Co-authored-by: Dmitriy Kostiuk Co-authored-by: Viacheslav Sarzhan --- README.md | 53 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 48a149c29..a554b7e42 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/percona/percona-server-mysql-operator) [![Go Report Card](https://goreportcard.com/badge/github.com/percona/percona-server-mysql-operator)](https://goreportcard.com/report/github.com/percona/percona-server-mysql-operator) -[Percona Server for MySQL](https://www.percona.com/software/mysql-database/percona-server) is a free, fully compatible, enhanced, and open source drop-in replacement for any MySQL database. It provides superior performance, scalability, and instrumentation. +[Percona Operator for MySQL based on Percona Server for MySQL](https://docs.percona.com/percona-operator-for-mysql/ps/index.html) automates the creation and management of highly available, enterprise-ready MySQL database clusters on Kubernetes. -Based on our best practices for deployment and configuration, [Percona Operator for MySQL](https://www.percona.com/doc/kubernetes-operator-for-mysql/ps/index.html) contains everything you need to quickly and consistently deploy and scale MySQL instances in a Kubernetes-based environment on-premises or in the cloud. It provides the following capabilities: +[Percona Operator for MySQL based on Percona Server for MySQL](https://www.percona.com/doc/kubernetes-operator-for-mysql/ps/index.html) follows our best practices for deployment and configuration of highly-available, fault-tolerant MySQL instances in a Kubernetes-based environment on-premises or in the cloud. It provides the following capabilities: * Deploy group replication MySQL clusters with MySQL Router * Deploy asynchronous replication MySQL clusters with Orchestrator and HAProxy @@ -20,34 +20,52 @@ Based on our best practices for deployment and configuration, [Percona Operator * Customize MySQL configuration * Manage system user passwords + ## Status **This project is in the tech preview state right now. Don't use it on production.** As of today, we recommend using [Percona Operator for MySQL based on Percona XtraDB Cluster](https://docs.percona.com/percona-operator-for-mysql/pxc/index.html), which is production-ready and contains everything you need to quickly and consistently deploy and scale MySQL clusters in a Kubernetes-based environment, on-premises or in the cloud. -## Roadmap - -We have an experimental public roadmap which can be found [here](https://github.com/percona/roadmap/projects/1). Please feel free to contribute and propose new features by following the roadmap [guidelines](https://github.com/percona/roadmap). - ## Architecture Percona Operators are based on the [Operator SDK](https://github.com/operator-framework/operator-sdk) and leverage Kubernetes primitives to follow best CNCF practices. -## Installation +## Documentation + +To learn more about the Operator, check the [Percona Operator for MySQL documentation](https://docs.percona.com/percona-operator-for-mysql/ps/index.html). -It usually takes two steps to deploy Percona Server for MySQL on Kubernetes: +# Quickstart installation -* Deploy the operator from `deploy/bundle.yaml` -* Deploy the database cluster itself from `deploy/cr.yaml` +Ready to try out the Operator? Check the [Quickstart tutorials](https://docs.percona.com/percona-operator-for-mysql/ps/helm.html) for easy-to follow steps. -See full documentation with examples and various advanced cases on [percona.com](https://www.percona.com/doc/kubernetes-operator-for-mysql/ps/index.html). +Below is one of the ways to deploy the Operator using `kubectl`. -## Contributing +## kubectl -Percona welcomes and encourages community contributions to help improve open source software. +1. Deploy the Operator from `deploy/bundle.yaml`: -See the [Contribution Guide](CONTRIBUTING.md) for more information. +```sh +kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mysql-operator/main/deploy/bundle.yaml +``` + +2. Deploy the database cluster itself from `deploy/cr.yaml`: + +```sh +kubectl apply -f https://raw.githubusercontent.com/percona/percona-server-mysql-operator/main/deploy/cr.yaml + +``` + + +# Contributing + +Percona welcomes and encourages community contributions to help improve Percona Operator for MySQL. + +See the [Contribution Guide](CONTRIBUTING.md) and [Building and Testing Guide](e2e-tests/README.md) for more information on how you can contribute. + +## Communication + +We would love to hear from you! Reach out to us on [Forum](https://forums.percona.com/c/mysql-mariadb/percona-kubernetes-operator-for-mysql/28) with your questions, feedback and ideas ## Join Percona Kubernetes Squad! @@ -70,7 +88,12 @@ See the [Contribution Guide](CONTRIBUTING.md) for more information. You can get early access to new product features, invite-only ”ask me anything” sessions with Percona Kubernetes experts, and monthly swag raffles. Interested? Fill in the form at [percona.com/k8s](https://www.percona.com/k8s). +## Roadmap + +We have an experimental public roadmap which can be found [here](https://github.com/percona/roadmap/projects/1). Please feel free to contribute and propose new features by following the roadmap [guidelines](https://github.com/percona/roadmap). + ## Submitting Bug Reports -If you find a bug in Percona Docker Images or in one of the related projects, please submit a report to that project's [JIRA](https://jira.percona.com/browse/K8SPS) issue tracker. Learn more about submitting bugs, new features ideas and improvements in the [Contribution Guide](CONTRIBUTING.md). +If you find a bug in Percona Docker Images or in one of the related projects, please submit a report to that project's [JIRA](https://jira.percona.com/browse/K8SPS) issue tracker or [create a GitHub issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue#creating-an-issue-from-a-repository) in this repository. +Learn more about submitting bugs, new features ideas and improvements in the [Contribution Guide](CONTRIBUTING.md). From 7c41dddacf50640c0ca2525a015a1cee97937a59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 11:16:49 +0200 Subject: [PATCH 063/192] CLOUD-727: Bump k8s.io/client-go from 0.29.0 to 0.29.1 (#528) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.0 to 0.29.1. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.29.0...v0.29.1) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 0630c3239..7c57e274f 100644 --- a/go.mod +++ b/go.mod @@ -23,9 +23,9 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/sync v0.6.0 google.golang.org/grpc v1.60.1 - k8s.io/api v0.29.0 - k8s.io/apimachinery v0.29.0 - k8s.io/client-go v0.29.0 + k8s.io/api v0.29.1 + k8s.io/apimachinery v0.29.1 + k8s.io/client-go v0.29.1 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.17.0 ) diff --git a/go.sum b/go.sum index 0bc435695..9dfd86424 100644 --- a/go.sum +++ b/go.sum @@ -424,14 +424,14 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= -k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= +k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ= k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= -k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= -k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= -k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= -k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc= +k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= +k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= From d407d47bd7d0f57247529fe070c5b4bc460d2a0f Mon Sep 17 00:00:00 2001 From: SlavaUtesinov Date: Thu, 25 Jan 2024 12:17:43 +0300 Subject: [PATCH 064/192] orchestrator mysql-monit resources (#520) Co-authored-by: Viacheslav Sarzhan --- pkg/orchestrator/orchestrator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/orchestrator/orchestrator.go b/pkg/orchestrator/orchestrator.go index 29aca3b5e..e9762c5b5 100644 --- a/pkg/orchestrator/orchestrator.go +++ b/pkg/orchestrator/orchestrator.go @@ -315,6 +315,7 @@ func sidecarContainers(cr *apiv1alpha1.PerconaServerMySQL) []corev1.Container { TerminationMessagePath: "/dev/termination-log", TerminationMessagePolicy: corev1.TerminationMessageReadFile, SecurityContext: cr.Spec.Orchestrator.ContainerSecurityContext, + Resources: cr.Spec.Orchestrator.Resources, }, } } From ce4a9fb0e6545ae62f652283230707c6eec0120d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:37:40 +0200 Subject: [PATCH 065/192] CLOUD-727: Bump github.com/onsi/ginkgo/v2 from 2.14.0 to 2.15.0 (#529) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.14.0 to 2.15.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.14.0...v2.15.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7c57e274f..e91fc4da9 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.66 - github.com/onsi/ginkgo/v2 v2.14.0 + github.com/onsi/ginkgo/v2 v2.15.0 github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 diff --git a/go.sum b/go.sum index 9dfd86424..e400eb29f 100644 --- a/go.sum +++ b/go.sum @@ -195,8 +195,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= -github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= -github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= From a69828bcefd7172109238c92954be747d32c2aa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:50:49 +0200 Subject: [PATCH 066/192] CLOUD-727: Bump github.com/go-openapi/runtime from 0.26.2 to 0.27.0 (#530) Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.26.2 to 0.27.0. - [Release notes](https://github.com/go-openapi/runtime/releases) - [Commits](https://github.com/go-openapi/runtime/compare/v0.26.2...v0.27.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e91fc4da9..2fe799d85 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 - github.com/go-openapi/runtime v0.26.2 + github.com/go-openapi/runtime v0.27.0 github.com/go-openapi/strfmt v0.22.0 github.com/go-openapi/swag v0.22.7 github.com/go-openapi/validate v0.22.6 diff --git a/go.sum b/go.sum index e400eb29f..0f4902ac7 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,8 @@ github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdX github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= -github.com/go-openapi/runtime v0.26.2 h1:elWyB9MacRzvIVgAZCBJmqTi7hBzU0hlKD4IvfX0Zl0= -github.com/go-openapi/runtime v0.26.2/go.mod h1:O034jyRZ557uJKzngbMDJXkcKJVzXJiymdSfgejrcRw= +github.com/go-openapi/runtime v0.27.0 h1:ukHSkyGp8gtDkwE1Mue2FofNh8kLfYv3xkCXWeLr0hM= +github.com/go-openapi/runtime v0.27.0/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= From 22c1a35071f152dd0e8f76167c04876a11515e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Mon, 29 Jan 2024 15:58:03 +0300 Subject: [PATCH 067/192] K8SPS-317: Remove JSON usage (#466) * K8SPS-317: Remove JSON usage * fix `status_test.go` --------- Co-authored-by: Andrii Dema Co-authored-by: Viacheslav Sarzhan --- pkg/controller/ps/controller.go | 34 ++-- pkg/controller/ps/status.go | 38 ++-- pkg/controller/ps/status_test.go | 288 +++++++++++++++++++++---------- pkg/db/replication.go | 38 +++- pkg/mysqlsh/mysqlshexec.go | 85 --------- 5 files changed, 261 insertions(+), 222 deletions(-) diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index cfcd3b688..9452cce87 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -45,7 +45,7 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" "github.com/percona/percona-server-mysql-operator/pkg/controller/psrestore" - "github.com/percona/percona-server-mysql-operator/pkg/db" + database "github.com/percona/percona-server-mysql-operator/pkg/db" "github.com/percona/percona-server-mysql-operator/pkg/haproxy" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" @@ -204,7 +204,7 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * firstPodFQDN := fmt.Sprintf("%s.%s.%s", firstPod.Name, mysql.ServiceName(cr), cr.Namespace) firstPodUri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) - um := db.NewReplicationManager(&firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) + um := database.NewReplicationManager(&firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) mysh, err := mysqlsh.NewWithExec(r.ClientCmd, &firstPod, firstPodUri) if err != nil { @@ -224,7 +224,7 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * return errors.Wrapf(err, "get member state of %s from performance_schema", pod.Name) } - if state == db.MemberStateOffline { + if state == database.MemberStateOffline { log.Info("Member is not part of GR or already removed", "member", pod.Name, "memberState", state) continue } @@ -789,16 +789,10 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con return errors.Wrap(err, "get operator password") } - uri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, mysql.ServiceName(cr)) - - mysh, err := mysqlsh.NewWithExec(r.ClientCmd, firstPod, uri) - if err != nil { - return err - } - + db := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.ServiceName(cr)) cond := meta.FindStatusCondition(cr.Status.Conditions, apiv1alpha1.ConditionInnoDBClusterBootstrapped) if cond == nil || cond.Status == metav1.ConditionFalse { - if !mysh.DoesClusterExistWithExec(ctx, cr.InnoDBClusterName()) { + if exists, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata"); err != nil || !exists { log.V(1).Info("InnoDB cluster is not created yet") return nil } @@ -814,7 +808,7 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con return nil } - if !mysh.DoesClusterExistWithExec(ctx, cr.InnoDBClusterName()) { + if exists, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata"); err != nil || !exists { return errors.New("InnoDB cluster is already bootstrapped, but failed to check its status") } @@ -929,13 +923,9 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, } firstPodUri := mysql.PodName(cr, 0) + "." + mysql.ServiceName(cr) + "." + cr.Namespace - uri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, firstPodUri) - mysh, err := mysqlsh.NewWithExec(r.ClientCmd, firstPod, uri) - if err != nil { - return err - } - if !mysh.DoesClusterExistWithExec(ctx, cr.InnoDBClusterName()) { + db := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodUri) + if exist, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata"); err != nil || !exist { log.V(1).Info("Waiting for InnoDB Cluster", "cluster", cr.Name) return nil } @@ -1005,7 +995,7 @@ func (r *PerconaServerMySQLReconciler) getPrimaryFromGR(ctx context.Context, cr return "", err } - um := db.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, fqdn) + um := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, fqdn) return um.GetGroupReplicationPrimary(ctx) } @@ -1053,7 +1043,7 @@ func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, if err != nil { return err } - repDb := db.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) + repDb := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) if err := orchestrator.StopReplicationExec(gCtx, r.ClientCmd, orcPod, hostname, port); err != nil { return errors.Wrapf(err, "stop replica %s", hostname) @@ -1064,7 +1054,7 @@ func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, return errors.Wrapf(err, "get replication status of %s", hostname) } - for status == db.ReplicationStatusActive { + for status == database.ReplicationStatusActive { time.Sleep(250 * time.Millisecond) status, _, err = repDb.ReplicationStatus(ctx) if err != nil { @@ -1107,7 +1097,7 @@ func (r *PerconaServerMySQLReconciler) startAsyncReplication(ctx context.Context if err != nil { return err } - um := db.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) + um := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) log.V(1).Info("Change replication source", "primary", primary.Key.Hostname, "replica", hostname) if err := um.ChangeReplicationSource(ctx, primary.Key.Hostname, replicaPass, primary.Key.Port); err != nil { diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index eddf7e194..82db138a1 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -3,7 +3,6 @@ package ps import ( "bytes" "context" - "fmt" "strings" "github.com/pkg/errors" @@ -18,11 +17,11 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + database "github.com/percona/percona-server-mysql-operator/pkg/db" "github.com/percona/percona-server-mysql-operator/pkg/haproxy" "github.com/percona/percona-server-mysql-operator/pkg/innodbcluster" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" - "github.com/percona/percona-server-mysql-operator/pkg/mysqlsh" "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" "github.com/percona/percona-server-mysql-operator/pkg/router" ) @@ -185,38 +184,39 @@ func (r *PerconaServerMySQLReconciler) isGRReady(ctx context.Context, cr *apiv1a } firstPodUri := mysql.PodName(cr, 0) + "." + mysql.ServiceName(cr) + "." + cr.Namespace - uri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, firstPodUri) - mysh, err := mysqlsh.NewWithExec(r.ClientCmd, firstPod, uri) + db := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodUri) + + dbExists, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata") if err != nil { return false, err } - if !mysh.DoesClusterExistWithExec(ctx, cr.InnoDBClusterName()) { + if !dbExists { return false, nil } - status, err := mysh.ClusterStatusWithExec(ctx, cr.InnoDBClusterName()) + members, err := db.GetGroupReplicationMembers(ctx) if err != nil { - return false, errors.Wrap(err, "get cluster status") + return false, err } - for addr, member := range status.DefaultReplicaSet.Topology { - for _, err := range member.InstanceErrors { - log.WithName(addr).Info(err) + onlineMembers := 0 + for _, member := range members { + if member.MemberState != innodbcluster.MemberStateOnline { + log.WithName(member.Address).Info("Member is not ONLINE", "state", member.MemberState) + return false, nil } + onlineMembers++ } - log.V(1).Info("GR status", "status", status.DefaultReplicaSet.Status, "statusText", status.DefaultReplicaSet.StatusText) - - switch status.DefaultReplicaSet.Status { - case innodbcluster.ClusterStatusOK: - return true, nil - case innodbcluster.ClusterStatusOKPartial, innodbcluster.ClusterStatusOKNoTolerance, innodbcluster.ClusterStatusOKNoTolerancePartial: - log.Info("GR status", "status", status.DefaultReplicaSet.Status, "statusText", status.DefaultReplicaSet.StatusText) - return true, nil - default: + if onlineMembers < int(cr.Spec.MySQL.Size) { + log.V(1).Info("Not enough ONLINE members", "onlineMembers", onlineMembers, "size", cr.Spec.MySQL.Size) return false, nil } + + log.V(1).Info("GR is ready") + + return true, nil } func (r *PerconaServerMySQLReconciler) allLoadBalancersReady(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) (bool, error) { diff --git a/pkg/controller/ps/status_test.go b/pkg/controller/ps/status_test.go index 7649e5f77..6ab78ab00 100644 --- a/pkg/controller/ps/status_test.go +++ b/pkg/controller/ps/status_test.go @@ -1,14 +1,17 @@ package ps import ( + "bytes" "context" - "encoding/json" + "database/sql" + "encoding/csv" "fmt" "io" "reflect" "testing" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + "github.com/gocarina/gocsv" "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -330,6 +333,7 @@ func TestReconcileStatusAsync(t *testing.T) { }) } } + func TestReconcileStatusHAProxyGR(t *testing.T) { ctx := context.Background() @@ -363,12 +367,12 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { } tests := []struct { - name string - cr *apiv1alpha1.PerconaServerMySQL - clusterStatus innodbcluster.ClusterStatus - objects []client.Object - expected apiv1alpha1.PerconaServerMySQLStatus - mysqlReady bool + name string + cr *apiv1alpha1.PerconaServerMySQL + objects []client.Object + expected apiv1alpha1.PerconaServerMySQLStatus + mysqlMemberStates []innodbcluster.MemberState + noMetadataDB bool }{ { name: "without pods", @@ -408,8 +412,40 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { State: apiv1alpha1.StateReady, Host: cr.Name + "-haproxy." + cr.Namespace, }, - clusterStatus: innodbcluster.ClusterStatusOK, - mysqlReady: true, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + }, + }, + { + name: "with all ready pods, ok cluster status and invalid database", + cr: cr, + objects: appendSlices( + makeFakeReadyPods(cr, 3, "mysql"), + makeFakeReadyPods(cr, 3, "haproxy"), + []client.Object{secret}, + ), + expected: apiv1alpha1.PerconaServerMySQLStatus{ + MySQL: apiv1alpha1.StatefulAppStatus{ + Size: 3, + Ready: 3, + State: apiv1alpha1.StateInitializing, + }, + HAProxy: apiv1alpha1.StatefulAppStatus{ + Size: 3, + Ready: 3, + State: apiv1alpha1.StateReady, + }, + State: apiv1alpha1.StateInitializing, + Host: cr.Name + "-haproxy." + cr.Namespace, + }, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + }, + noMetadataDB: true, }, { name: "with all ready pods and offline cluster status", @@ -433,7 +469,11 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, }, - clusterStatus: innodbcluster.ClusterStatusOffline, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOffline, + innodbcluster.MemberStateOffline, + innodbcluster.MemberStateOffline, + }, }, { name: "with all ready pods and partial ok cluster status", @@ -447,25 +487,28 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { MySQL: apiv1alpha1.StatefulAppStatus{ Size: 3, Ready: 3, - State: apiv1alpha1.StateReady, + State: apiv1alpha1.StateInitializing, }, HAProxy: apiv1alpha1.StatefulAppStatus{ Size: 3, Ready: 3, State: apiv1alpha1.StateReady, }, - State: apiv1alpha1.StateReady, + State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, }, - clusterStatus: innodbcluster.ClusterStatusOKPartial, - mysqlReady: true, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOffline, + }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cr := tt.cr.DeepCopy() cb := fake.NewClientBuilder().WithScheme(scheme).WithObjects(cr).WithStatusSubresource(cr).WithObjects(tt.objects...).WithStatusSubresource(tt.objects...) - cliCmd, err := getFakeClient(cr, operatorPass, tt.mysqlReady, tt.clusterStatus) + cliCmd, err := getFakeClient(cr, tt.mysqlMemberStates, tt.noMetadataDB) if err != nil { t.Fatal(err) } @@ -526,12 +569,12 @@ func TestReconcileStatusRouterGR(t *testing.T) { } tests := []struct { - name string - cr *apiv1alpha1.PerconaServerMySQL - clusterStatus innodbcluster.ClusterStatus - objects []client.Object - expected apiv1alpha1.PerconaServerMySQLStatus - mysqlReady bool + name string + cr *apiv1alpha1.PerconaServerMySQL + objects []client.Object + expected apiv1alpha1.PerconaServerMySQLStatus + mysqlMemberStates []innodbcluster.MemberState + noMetadataDB bool }{ { name: "without pods", @@ -571,8 +614,40 @@ func TestReconcileStatusRouterGR(t *testing.T) { State: apiv1alpha1.StateReady, Host: cr.Name + "-router." + cr.Namespace, }, - clusterStatus: innodbcluster.ClusterStatusOK, - mysqlReady: true, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + }, + }, + { + name: "with all ready pods, ok cluster status and invalid databaes", + cr: cr, + objects: appendSlices( + makeFakeReadyPods(cr, 3, "mysql"), + makeFakeReadyPods(cr, 3, "router"), + []client.Object{secret}, + ), + expected: apiv1alpha1.PerconaServerMySQLStatus{ + MySQL: apiv1alpha1.StatefulAppStatus{ + Size: 3, + Ready: 3, + State: apiv1alpha1.StateInitializing, + }, + Router: apiv1alpha1.StatefulAppStatus{ + Size: 3, + Ready: 3, + State: apiv1alpha1.StateReady, + }, + State: apiv1alpha1.StateInitializing, + Host: cr.Name + "-router." + cr.Namespace, + }, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + }, + noMetadataDB: true, }, { name: "with all ready pods and offline cluster status", @@ -596,7 +671,11 @@ func TestReconcileStatusRouterGR(t *testing.T) { State: apiv1alpha1.StateInitializing, Host: cr.Name + "-router." + cr.Namespace, }, - clusterStatus: innodbcluster.ClusterStatusOffline, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOffline, + innodbcluster.MemberStateOffline, + innodbcluster.MemberStateOffline, + }, }, { name: "with all ready pods and partial ok cluster status", @@ -610,25 +689,28 @@ func TestReconcileStatusRouterGR(t *testing.T) { MySQL: apiv1alpha1.StatefulAppStatus{ Size: 3, Ready: 3, - State: apiv1alpha1.StateReady, + State: apiv1alpha1.StateInitializing, }, Router: apiv1alpha1.StatefulAppStatus{ Size: 3, Ready: 3, State: apiv1alpha1.StateReady, }, - State: apiv1alpha1.StateReady, + State: apiv1alpha1.StateInitializing, Host: cr.Name + "-router." + cr.Namespace, }, - clusterStatus: innodbcluster.ClusterStatusOKPartial, - mysqlReady: true, + mysqlMemberStates: []innodbcluster.MemberState{ + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOnline, + innodbcluster.MemberStateOffline, + }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cr := tt.cr.DeepCopy() cb := fake.NewClientBuilder().WithScheme(scheme).WithObjects(cr).WithStatusSubresource(cr).WithObjects(tt.objects...).WithStatusSubresource(tt.objects...) - cliCmd, err := getFakeClient(cr, operatorPass, tt.mysqlReady, tt.clusterStatus) + cliCmd, err := getFakeClient(cr, tt.mysqlMemberStates, tt.noMetadataDB) if err != nil { t.Fatal(err) } @@ -661,7 +743,12 @@ type fakeClient struct { execCount int } -func (c *fakeClient) Exec(ctx context.Context, pod *corev1.Pod, containerName string, command []string, stdin io.Reader, stdout, stderr io.Writer, tty bool) error { +// Exec increments the internal counter `execCount`. +// It compares the `scripts[execCount].cmd`, `scripts[execCount].stdin` with `command` and stdin parameters. +// It writes the `scripts[execCount].stdout`, `scripts[execCount].stderr` to `stdin` and `stderr` parameters. +// It writes the `scripts[execCount].stdout`, `scripts[execCount].stderr` to `stdin` and `stderr` parameters. +// fakeClient should have the array of fakeClientScript objects in order they are going to be executed in the tested function. +func (c *fakeClient) Exec(_ context.Context, _ *corev1.Pod, _ string, command []string, stdin io.Reader, stdout, stderr io.Writer, _ bool) error { if c.execCount >= len(c.scripts) { return errors.Errorf("unexpected exec call") } @@ -688,8 +775,8 @@ func (c *fakeClient) Exec(ctx context.Context, pod *corev1.Pod, containerName st return err } c.execCount++ - if c.scripts[c.execCount-1].shouldErr { - return errors.Errorf("fake error") + if c.scripts[c.execCount-1].err != nil { + return c.scripts[c.execCount-1].err } return nil } @@ -698,78 +785,89 @@ func (c *fakeClient) REST() restclient.Interface { return nil } +// fakeClientScript is an object which contains an info about executed command. +// cmd, stdin values are compared with the corresponding values in the Exec method. +// stdin, stdout values are written to the corresponding streams in the Exec method. +// err is the error which should be returned in the Exec method type fakeClientScript struct { - cmd []string - stdin []byte - stdout []byte - stderr []byte - shouldErr bool + cmd []string + stdin []byte + stdout []byte + stderr []byte + err error } -func getFakeClient(cr *apiv1alpha1.PerconaServerMySQL, operatorPass string, mysqlReady bool, clusterStatus innodbcluster.ClusterStatus) (clientcmd.Client, error) { - status, err := json.Marshal(innodbcluster.Status{ - DefaultReplicaSet: innodbcluster.ReplicaSetStatus{ - Status: clusterStatus, - }, - }) - if err != nil { - return nil, err - } - var scripts []fakeClientScript - if mysqlReady { +// getFakeClient returns a fake clientcmd.Client object with the array of fakeClientScript objects. +// This array is constructed to cover every possible client call in the reconcileCRStatus function. +func getFakeClient(cr *apiv1alpha1.PerconaServerMySQL, mysqlMemberStates []innodbcluster.MemberState, noMetadataDB bool) (clientcmd.Client, error) { + queryScript := func(query string, out any) fakeClientScript { + buf := new(bytes.Buffer) + w := csv.NewWriter(buf) + w.Comma = '\t' + if err := gocsv.MarshalCSV(out, w); err != nil { + panic(err) + } host := fmt.Sprintf("%s.%s.%s", mysql.PodName(cr, 0), mysql.ServiceName(cr), cr.Namespace) - scripts = append(scripts, []fakeClientScript{ - { - cmd: []string{ - "mysqlsh", - "--no-wizard", - "--uri", - fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, host), - "-e", - fmt.Sprintf("dba.getCluster('%s').status()", cr.InnoDBClusterName()), - }, - }, - { - cmd: []string{ - "mysqlsh", - "--result-format", - "json", - "--uri", - fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, host), - "--cluster", - "--", - "cluster", - "status", - }, - stdout: status, - }}...) - } - scripts = append(scripts, []fakeClientScript{ - { + + return fakeClientScript{ cmd: []string{ - "cat", - "/var/lib/mysql/full-cluster-crash", + "mysql", + "--database", + "performance_schema", + "-ptest", + "-u", + "operator", + "-h", + host, + "-e", + query, }, - stderr: []byte("No such file or directory"), - shouldErr: true, - }, + stdout: buf.Bytes(), + } + } + + var scripts []fakeClientScript + + // CheckIfDatabaseExists + type db struct { + DB string `csv:"db"` + } + dbs := []*db{ { - cmd: []string{ - "cat", - "/var/lib/mysql/full-cluster-crash", - }, - stderr: []byte("No such file or directory"), - shouldErr: true, + DB: "mysql_innodb_cluster_metadata", }, - { - cmd: []string{ - "cat", - "/var/lib/mysql/full-cluster-crash", - }, - stderr: []byte("No such file or directory"), - shouldErr: true, + } + s := queryScript("SELECT SCHEMA_NAME AS db FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'mysql_innodb_cluster_metadata'", dbs) + if !noMetadataDB { + } else { + s.err = sql.ErrNoRows + } + scripts = append(scripts, s) + + // GetGroupReplicationMembers + if !noMetadataDB { + type member struct { + Member string `csv:"member"` + State string `csv:"state"` + } + var members []*member + for _, state := range mysqlMemberStates { + members = append(members, &member{ + Member: cr.Name + "-mysql-0." + cr.Namespace, + State: string(state), + }) + } + scripts = append(scripts, queryScript("SELECT MEMBER_HOST as member, MEMBER_STATE as state FROM replication_group_members", members)) + } + + scripts = append(scripts, fakeClientScript{ + cmd: []string{ + "cat", + "/var/lib/mysql/full-cluster-crash", }, - }...) + stderr: []byte("No such file or directory"), + err: errors.New("fake error"), + }) return &fakeClient{ scripts: scripts, }, nil diff --git a/pkg/db/replication.go b/pkg/db/replication.go index f5a04b1f3..4c296ea9e 100644 --- a/pkg/db/replication.go +++ b/pkg/db/replication.go @@ -6,14 +6,15 @@ import ( "database/sql" "encoding/csv" "fmt" - "github.com/gocarina/gocsv" "strings" + "github.com/gocarina/gocsv" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" + "github.com/percona/percona-server-mysql-operator/pkg/innodbcluster" ) const defaultChannelName = "" @@ -167,3 +168,38 @@ func (m *ReplicationDBManager) GetMemberState(ctx context.Context, host string) return rows[0].State, nil } + +func (m *ReplicationDBManager) GetGroupReplicationMembers(ctx context.Context) ([]innodbcluster.Member, error) { + rows := []*struct { + Member string `csv:"member"` + State string `csv:"state"` + }{} + + err := m.query(ctx, "SELECT MEMBER_HOST as member, MEMBER_STATE as state FROM replication_group_members", &rows) + if err != nil { + return nil, errors.Wrap(err, "query members") + } + + members := make([]innodbcluster.Member, 0) + for _, row := range rows { + state := innodbcluster.MemberState(row.State) + members = append(members, innodbcluster.Member{Address: row.Member, MemberState: state}) + } + + return members, nil +} + +func (m *ReplicationDBManager) CheckIfDatabaseExists(ctx context.Context, name string) (bool, error) { + rows := []*struct { + DB string `csv:"db"` + }{} + q := fmt.Sprintf("SELECT SCHEMA_NAME AS db FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE '%s'", name) + err := m.query(ctx, q, &rows) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return false, nil + } + return false, err + } + return true, nil +} diff --git a/pkg/mysqlsh/mysqlshexec.go b/pkg/mysqlsh/mysqlshexec.go index 4e57c4d82..cd3543adb 100644 --- a/pkg/mysqlsh/mysqlshexec.go +++ b/pkg/mysqlsh/mysqlshexec.go @@ -39,54 +39,6 @@ func (m *mysqlshExec) runWithExec(ctx context.Context, cmd string) error { return nil } -func (m *mysqlshExec) ConfigureInstanceWithExec(ctx context.Context, instance string) error { - cmd := fmt.Sprintf( - "dba.configureInstance('%s', {'interactive': false, 'clearReadOnly': true})", - instance, - ) - - if err := m.runWithExec(ctx, cmd); err != nil { - return errors.Wrap(err, "configure instance") - } - - return nil -} - -func (m *mysqlshExec) AddInstanceWithExec(ctx context.Context, clusterName, instance string) error { - opts := struct { - Interactive bool `json:"interactive"` - RecoveryMethod string `json:"recoveryMethod"` - WaitRecovery int `json:"waitRecovery"` - }{ - Interactive: false, - RecoveryMethod: "clone", - WaitRecovery: 0, - } - - o, err := json.Marshal(opts) - if err != nil { - return errors.Wrap(err, "marshal options") - } - - cmd := fmt.Sprintf("dba.getCluster('%s').addInstance('%s', %s)", clusterName, instance, string(o)) - - if err := m.runWithExec(ctx, cmd); err != nil { - return errors.Wrap(err, "add instance") - } - - return nil -} - -func (m *mysqlshExec) RejoinInstanceWithExec(ctx context.Context, clusterName, instance string) error { - cmd := fmt.Sprintf("dba.getCluster('%s').rejoinInstance('%s', {'interactive': false})", clusterName, instance) - - if err := m.runWithExec(ctx, cmd); err != nil { - return errors.Wrap(err, "rejoin instance") - } - - return nil -} - func (m *mysqlshExec) RemoveInstanceWithExec(ctx context.Context, clusterName, instance string) error { cmd := fmt.Sprintf("dba.getCluster('%s').removeInstance('%s', {'interactive': false, 'force': true})", clusterName, instance) @@ -97,16 +49,6 @@ func (m *mysqlshExec) RemoveInstanceWithExec(ctx context.Context, clusterName, i return nil } -func (m *mysqlshExec) CreateClusterWithExec(ctx context.Context, clusterName string) error { - cmd := fmt.Sprintf("dba.createCluster('%s', {'adoptFromGR': true})", clusterName) - - if err := m.runWithExec(ctx, cmd); err != nil { - return errors.Wrap(err, "create cluster") - } - - return nil -} - func (m *mysqlshExec) DoesClusterExistWithExec(ctx context.Context, clusterName string) bool { log := logf.FromContext(ctx) @@ -141,33 +83,6 @@ func (m *mysqlshExec) ClusterStatusWithExec(ctx context.Context, clusterName str return status, nil } -func (m *mysqlshExec) MemberStateWithExec(ctx context.Context, clusterName, instance string) (innodbcluster.MemberState, error) { - log := logf.FromContext(ctx).WithName("InnoDBCluster").WithValues("cluster", clusterName) - - status, err := m.ClusterStatusWithExec(ctx, clusterName) - if err != nil { - return innodbcluster.MemberStateOffline, errors.Wrap(err, "get cluster status") - } - - log.V(1).Info("Cluster status", "status", status) - - member, ok := status.DefaultReplicaSet.Topology[instance] - if !ok { - return innodbcluster.MemberStateOffline, innodbcluster.ErrMemberNotFound - } - - return member.MemberState, nil -} - -func (m *mysqlshExec) TopologyWithExec(ctx context.Context, clusterName string) (map[string]innodbcluster.Member, error) { - status, err := m.ClusterStatusWithExec(ctx, clusterName) - if err != nil { - return nil, errors.Wrap(err, "get cluster status") - } - - return status.DefaultReplicaSet.Topology, nil -} - func (m *mysqlshExec) RebootClusterFromCompleteOutageWithExec(ctx context.Context, clusterName string) error { cmd := fmt.Sprintf("dba.rebootClusterFromCompleteOutage('%s')", clusterName) From 3fd0f52c8d5dd3705430977cfa04b22dd59cae47 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Wed, 31 Jan 2024 17:59:56 +0200 Subject: [PATCH 068/192] K8SPS-329 use peer-list from init image (#541) --- e2e-tests/tests/limits/01-assert.yaml | 2 +- e2e-tests/tests/limits/03-assert.yaml | 2 +- e2e-tests/tests/limits/05-assert.yaml | 2 +- pkg/orchestrator/orchestrator.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e-tests/tests/limits/01-assert.yaml b/e2e-tests/tests/limits/01-assert.yaml index 28bbb1b98..b7eb51f8f 100644 --- a/e2e-tests/tests/limits/01-assert.yaml +++ b/e2e-tests/tests/limits/01-assert.yaml @@ -334,7 +334,7 @@ spec: name: users subPath: orchestrator - args: - - /usr/bin/peer-list + - /opt/percona/peer-list - -on-change=/usr/bin/add_mysql_nodes.sh - -service=$(MYSQL_SERVICE) command: diff --git a/e2e-tests/tests/limits/03-assert.yaml b/e2e-tests/tests/limits/03-assert.yaml index 6c5e0ae12..6bc668cbd 100644 --- a/e2e-tests/tests/limits/03-assert.yaml +++ b/e2e-tests/tests/limits/03-assert.yaml @@ -334,7 +334,7 @@ spec: name: users subPath: orchestrator - args: - - /usr/bin/peer-list + - /opt/percona/peer-list - -on-change=/usr/bin/add_mysql_nodes.sh - -service=$(MYSQL_SERVICE) command: diff --git a/e2e-tests/tests/limits/05-assert.yaml b/e2e-tests/tests/limits/05-assert.yaml index d317b2177..e98a8507d 100644 --- a/e2e-tests/tests/limits/05-assert.yaml +++ b/e2e-tests/tests/limits/05-assert.yaml @@ -330,7 +330,7 @@ spec: name: users subPath: orchestrator - args: - - /usr/bin/peer-list + - /opt/percona/peer-list - -on-change=/usr/bin/add_mysql_nodes.sh - -service=$(MYSQL_SERVICE) command: diff --git a/pkg/orchestrator/orchestrator.go b/pkg/orchestrator/orchestrator.go index e9762c5b5..5b6e5d6f4 100644 --- a/pkg/orchestrator/orchestrator.go +++ b/pkg/orchestrator/orchestrator.go @@ -308,7 +308,7 @@ func sidecarContainers(cr *apiv1alpha1.PerconaServerMySQL) []corev1.Container { VolumeMounts: containerMounts(), Command: []string{"/opt/percona/orc-entrypoint.sh"}, Args: []string{ - "/usr/bin/peer-list", + "/opt/percona/peer-list", "-on-change=/usr/bin/add_mysql_nodes.sh", "-service=$(MYSQL_SERVICE)", }, From b21fdf09d0e6a9dff2b747b57d6b699a762bcbc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:09:46 +0200 Subject: [PATCH 069/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.16.0 to 0.16.1 (#542) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.0 to 0.16.1. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.16.0...0.16.1) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 36192a6e3..83bd5c4ac 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -14,7 +14,7 @@ jobs: export DOCKER_SQUASH=0 ./e2e-tests/build - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.16.0 + uses: aquasecurity/trivy-action@0.16.1 with: image-ref: 'docker.io/perconalab/percona-server-mysql-operator:${{ github.sha }}' format: 'table' From 8697caa3889f374464fff8df5a75c710953c618a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:23:35 +0200 Subject: [PATCH 070/192] CLOUD-727: Bump github.com/go-openapi/runtime from 0.27.0 to 0.27.1 (#540) Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.27.0 to 0.27.1. - [Release notes](https://github.com/go-openapi/runtime/releases) - [Commits](https://github.com/go-openapi/runtime/compare/v0.27.0...v0.27.1) --- updated-dependencies: - dependency-name: github.com/go-openapi/runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2fe799d85..05c710517 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 - github.com/go-openapi/runtime v0.27.0 + github.com/go-openapi/runtime v0.27.1 github.com/go-openapi/strfmt v0.22.0 github.com/go-openapi/swag v0.22.7 github.com/go-openapi/validate v0.22.6 diff --git a/go.sum b/go.sum index 0f4902ac7..080d52cc6 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,8 @@ github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdX github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= -github.com/go-openapi/runtime v0.27.0 h1:ukHSkyGp8gtDkwE1Mue2FofNh8kLfYv3xkCXWeLr0hM= -github.com/go-openapi/runtime v0.27.0/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= +github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto= +github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= From 381ac12bd2dc8cdf5706ea0599e5afcf99f9b336 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Fri, 2 Feb 2024 15:27:07 +0200 Subject: [PATCH 071/192] K8SPS-328 fix version-service test (#538) * K8SPS-328 fix version-service test * remove sleep --- Jenkinsfile | 2 +- e2e-tests/functions | 2 ++ e2e-tests/tests/version-service/00-deploy-operator.yaml | 2 +- e2e-tests/tests/version-service/01-assert.yaml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a1740c53..ee2f8c8d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ void createCluster(String CLUSTER_SUFFIX, String SUBNETWORK = CLUSTER_SUFFIX) { gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE gcloud config set project $GCP_PROJECT gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $region --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $region --quiet || true - gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.25 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ + gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.26 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user jenkins@"$GCP_PROJECT".iam.gserviceaccount.com || ret_val=\$? if [ \${ret_val} -eq 0 ]; then break; fi ret_num=\$((ret_num + 1)) diff --git a/e2e-tests/functions b/e2e-tests/functions index 8e77eeca8..003496d11 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -498,6 +498,8 @@ deploy_version_service() { --from-file "${TESTS_CONFIG_DIR}/operator.9.9.9.ps-operator.json" kubectl apply -n "${NAMESPACE}" -f "${TESTS_CONFIG_DIR}/vs.yaml" + VS_POD_NAME=$(kubectl -n "${NAMESPACE}" get pods --selector=name=percona-version-service -o 'jsonpath={.items[].metadata.name}') + wait_pod $VS_POD_NAME } deploy_cert_manager() { diff --git a/e2e-tests/tests/version-service/00-deploy-operator.yaml b/e2e-tests/tests/version-service/00-deploy-operator.yaml index 5d116a602..3f115d95c 100644 --- a/e2e-tests/tests/version-service/00-deploy-operator.yaml +++ b/e2e-tests/tests/version-service/00-deploy-operator.yaml @@ -12,5 +12,5 @@ commands: deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets - deploy_client deploy_version_service + deploy_client diff --git a/e2e-tests/tests/version-service/01-assert.yaml b/e2e-tests/tests/version-service/01-assert.yaml index 201ce0db3..d51e02382 100644 --- a/e2e-tests/tests/version-service/01-assert.yaml +++ b/e2e-tests/tests/version-service/01-assert.yaml @@ -1,6 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 500 +timeout: 600 --- apiVersion: apps/v1 kind: StatefulSet From 758c27ed41568cc1ddc664db1d3d9652f1fd73b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 17:45:06 +0200 Subject: [PATCH 072/192] CLOUD-727: Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#539) Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases) - [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml) - [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.19.0...v2.19.1) --- updated-dependencies: - dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 18 +++++++++--------- go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 05c710517..fc792d612 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.26.0 golang.org/x/sync v0.6.0 - google.golang.org/grpc v1.60.1 + google.golang.org/grpc v1.61.0 k8s.io/api v0.29.1 k8s.io/apimachinery v0.29.1 k8s.io/client-go v0.29.1 @@ -38,8 +38,8 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect go.opentelemetry.io/otel/metric v1.20.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect ) require ( @@ -72,7 +72,7 @@ require ( github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -108,17 +108,17 @@ require ( go.opentelemetry.io/otel v1.20.0 // indirect go.opentelemetry.io/otel/trace v1.20.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.16.1 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 080d52cc6..5a13b1675 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -293,8 +293,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= @@ -316,11 +316,11 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= 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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -347,8 +347,8 @@ golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -384,19 +384,19 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos= -google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= From da861f7f04b748ba075d7255a713c96738b3fb57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:25:38 +0200 Subject: [PATCH 073/192] CLOUD-727: Bump github.com/onsi/gomega from 1.30.0 to 1.31.1 (#527) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fc792d612..c0e10ef0f 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.66 github.com/onsi/ginkgo/v2 v2.15.0 - github.com/onsi/gomega v1.30.0 + github.com/onsi/gomega v1.31.1 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 diff --git a/go.sum b/go.sum index 5a13b1675..0dbd58519 100644 --- a/go.sum +++ b/go.sum @@ -197,8 +197,8 @@ github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= From 9fbab7a0bb21d3d66ec2324dcadedbb09521c2b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 21:44:15 +0200 Subject: [PATCH 074/192] CLOUD-727: Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9 (#537) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c0e10ef0f..965a45065 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.27.1 github.com/go-openapi/strfmt v0.22.0 - github.com/go-openapi/swag v0.22.7 + github.com/go-openapi/swag v0.22.9 github.com/go-openapi/validate v0.22.6 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d diff --git a/go.sum b/go.sum index 0dbd58519..cfaff3132 100644 --- a/go.sum +++ b/go.sum @@ -84,8 +84,8 @@ github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkI github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= -github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= -github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo= github.com/go-openapi/validate v0.22.6/go.mod h1:eaddXSqKeTg5XpSmj1dYyFTK/95n/XHwcOY+BMxKMyM= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= From 023eeda698ea68f2184d9b12c8d1685183a86c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Tue, 6 Feb 2024 10:46:42 +0300 Subject: [PATCH 075/192] K8SPS-291: Add prestop hook to MySQL pods (#535) * K8SPS-291: Add prestop hook to MySQL pods * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * use admin port * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix pre stop hook * fix gr-scaling * Update build/ps-pre-stop.sh Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix pod ip --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- build/Dockerfile | 1 + build/ps-init-entrypoint.sh | 4 +- build/ps-pre-stop.sh | 16 +++++++ cmd/manager/main.go | 2 + e2e-tests/tests/gr-scaling/06-assert.yaml | 45 +++---------------- .../gr-scaling/06-check-group-seeds.yaml | 21 +++++++++ e2e-tests/tests/gr-scaling/07-assert.yaml | 45 ++++++++++++++++--- ...wn-proxy.yaml => 07-scale-down-proxy.yaml} | 0 e2e-tests/tests/gr-scaling/08-assert.yaml | 45 +++---------------- ...primary.yaml => 08-read-from-primary.yaml} | 0 e2e-tests/tests/gr-scaling/09-assert.yaml | 45 ++++++++++++++++--- ...thing.yaml => 09-scale-up-everything.yaml} | 0 e2e-tests/tests/gr-scaling/10-assert.yaml | 8 ++-- .../gr-scaling/10-check-group-seeds.yaml | 21 +++++++++ e2e-tests/tests/gr-scaling/11-assert.yaml | 10 +++++ ...primary.yaml => 11-read-from-primary.yaml} | 0 e2e-tests/tests/gr-scaling/12-assert.yaml | 12 +++++ ...plicas.yaml => 12-read-from-replicas.yaml} | 0 pkg/mysql/mysql.go | 7 +++ 19 files changed, 187 insertions(+), 95 deletions(-) create mode 100755 build/ps-pre-stop.sh create mode 100644 e2e-tests/tests/gr-scaling/06-check-group-seeds.yaml rename e2e-tests/tests/gr-scaling/{06-scale-down-proxy.yaml => 07-scale-down-proxy.yaml} (100%) rename e2e-tests/tests/gr-scaling/{07-read-from-primary.yaml => 08-read-from-primary.yaml} (100%) rename e2e-tests/tests/gr-scaling/{08-scale-up-everything.yaml => 09-scale-up-everything.yaml} (100%) create mode 100644 e2e-tests/tests/gr-scaling/10-check-group-seeds.yaml create mode 100644 e2e-tests/tests/gr-scaling/11-assert.yaml rename e2e-tests/tests/gr-scaling/{09-read-from-primary.yaml => 11-read-from-primary.yaml} (100%) create mode 100644 e2e-tests/tests/gr-scaling/12-assert.yaml rename e2e-tests/tests/gr-scaling/{10-read-from-replicas.yaml => 12-read-from-replicas.yaml} (100%) diff --git a/build/Dockerfile b/build/Dockerfile index 95bb7edb2..928824ab7 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -85,6 +85,7 @@ COPY --from=go_builder /usr/local/bin/sidecar /opt/percona-server-mysql-operator COPY --from=go_builder /usr/local/bin/peer-list /opt/percona-server-mysql-operator/peer-list COPY --from=go_builder /usr/local/bin/orc-handler /opt/percona-server-mysql-operator/orc-handler COPY build/ps-entrypoint.sh /opt/percona-server-mysql-operator/ps-entrypoint.sh +COPY build/ps-pre-stop.sh /opt/percona-server-mysql-operator/ps-pre-stop.sh COPY build/heartbeat-entrypoint.sh /opt/percona-server-mysql-operator/heartbeat-entrypoint.sh COPY build/router-entrypoint.sh /opt/percona-server-mysql-operator/router-entrypoint.sh COPY build/router_readiness_check.sh /opt/percona-server-mysql-operator/router_readiness_check.sh diff --git a/build/ps-init-entrypoint.sh b/build/ps-init-entrypoint.sh index bc99f4f7c..1a87aaf12 100755 --- a/build/ps-init-entrypoint.sh +++ b/build/ps-init-entrypoint.sh @@ -7,6 +7,8 @@ OPERATORDIR="/opt/percona-server-mysql-operator" BINDIR="/opt/percona" install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/ps-entrypoint.sh" "${BINDIR}/ps-entrypoint.sh" +install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/ps-pre-stop.sh" "${BINDIR}/ps-pre-stop.sh" + install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/heartbeat-entrypoint.sh" "${BINDIR}/heartbeat-entrypoint.sh" install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/orc-entrypoint.sh" "${BINDIR}/orc-entrypoint.sh" @@ -34,4 +36,4 @@ install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/haproxy_readiness install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/haproxy.cfg" "${BINDIR}/haproxy.cfg" install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/haproxy-global.cfg" "${BINDIR}/haproxy-global.cfg" -install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/pmm-prerun.sh" "${BINDIR}/pmm-prerun.sh" \ No newline at end of file +install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "${OPERATORDIR}/pmm-prerun.sh" "${BINDIR}/pmm-prerun.sh" diff --git a/build/ps-pre-stop.sh b/build/ps-pre-stop.sh new file mode 100755 index 000000000..fda32482b --- /dev/null +++ b/build/ps-pre-stop.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +if [ "${CLUSTER_TYPE}" == "async" ]; then + exit 0 +fi + +LOG_FILE=/var/lib/mysql/pre-stop.log +NAMESPACE=$(>${LOG_FILE} +mysqlsh -i -h "${POD_IP}" -P 33062 -u operator -p"${OPERATOR_PASSWORD}" -e "dba.getCluster().removeInstance('${FQDN}:3306')" >>${LOG_FILE} 2>&1 diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 5ff5535fd..1bbf845d9 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -84,6 +84,8 @@ func main() { ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) + setupLog.Info("Build info", "GitCommit", GitCommit, "BuildTime", BuildTime) + namespace, err := k8s.GetWatchNamespace() if err != nil { setupLog.Error(err, "unable to get watch namespace") diff --git a/e2e-tests/tests/gr-scaling/06-assert.yaml b/e2e-tests/tests/gr-scaling/06-assert.yaml index 4b7324be5..42fef8df8 100644 --- a/e2e-tests/tests/gr-scaling/06-assert.yaml +++ b/e2e-tests/tests/gr-scaling/06-assert.yaml @@ -1,43 +1,10 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 90 +timeout: 30 --- -kind: StatefulSet -apiVersion: apps/v1 +kind: ConfigMap +apiVersion: v1 metadata: - name: gr-scaling-mysql -status: - observedGeneration: 2 - replicas: 1 - readyReplicas: 1 - currentReplicas: 1 - updatedReplicas: 1 - collisionCount: 0 ---- -kind: Deployment -apiVersion: apps/v1 -metadata: - name: gr-scaling-router -status: - observedGeneration: 2 - replicas: 1 - updatedReplicas: 1 - readyReplicas: 1 - availableReplicas: 1 ---- -apiVersion: ps.percona.com/v1alpha1 -kind: PerconaServerMySQL -metadata: - name: gr-scaling - finalizers: - - delete-mysql-pods-in-order -status: - mysql: - ready: 1 - size: 1 - state: ready - router: - ready: 1 - size: 1 - state: ready - state: ready + name: 06-check-group-seeds +data: + gr-scaling-mysql-0.gr-scaling-mysql: "" diff --git a/e2e-tests/tests/gr-scaling/06-check-group-seeds.yaml b/e2e-tests/tests/gr-scaling/06-check-group-seeds.yaml new file mode 100644 index 000000000..8420b6261 --- /dev/null +++ b/e2e-tests/tests/gr-scaling/06-check-group-seeds.yaml @@ -0,0 +1,21 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + args='' + size=$(kubectl -n ${NAMESPACE} get ps $(get_cluster_name) -o jsonpath='{.spec.mysql.size}') + for i in $(seq 0 $((size - 1))); do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + seeds=$(run_mysql "SELECT @@group_replication_group_seeds" "-h ${host} -uroot -proot_password") + echo ${seeds} + seeds=$(echo ${seeds} | sed -e "s/\.${NAMESPACE}//g") + args="${args} --from-literal=${host}=${seeds}" + done + + kubectl create configmap -n "${NAMESPACE}" 06-check-group-seeds ${args} diff --git a/e2e-tests/tests/gr-scaling/07-assert.yaml b/e2e-tests/tests/gr-scaling/07-assert.yaml index c02b5b4b9..4b7324be5 100644 --- a/e2e-tests/tests/gr-scaling/07-assert.yaml +++ b/e2e-tests/tests/gr-scaling/07-assert.yaml @@ -1,10 +1,43 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 30 +timeout: 90 --- -kind: ConfigMap -apiVersion: v1 +kind: StatefulSet +apiVersion: apps/v1 metadata: - name: 09-read-from-primary -data: - data: "100500" + name: gr-scaling-mysql +status: + observedGeneration: 2 + replicas: 1 + readyReplicas: 1 + currentReplicas: 1 + updatedReplicas: 1 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-scaling-router +status: + observedGeneration: 2 + replicas: 1 + updatedReplicas: 1 + readyReplicas: 1 + availableReplicas: 1 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-scaling + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 1 + size: 1 + state: ready + router: + ready: 1 + size: 1 + state: ready + state: ready diff --git a/e2e-tests/tests/gr-scaling/06-scale-down-proxy.yaml b/e2e-tests/tests/gr-scaling/07-scale-down-proxy.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/06-scale-down-proxy.yaml rename to e2e-tests/tests/gr-scaling/07-scale-down-proxy.yaml diff --git a/e2e-tests/tests/gr-scaling/08-assert.yaml b/e2e-tests/tests/gr-scaling/08-assert.yaml index a691c64b7..c02b5b4b9 100644 --- a/e2e-tests/tests/gr-scaling/08-assert.yaml +++ b/e2e-tests/tests/gr-scaling/08-assert.yaml @@ -1,43 +1,10 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 180 +timeout: 30 --- -kind: StatefulSet -apiVersion: apps/v1 +kind: ConfigMap +apiVersion: v1 metadata: - name: gr-scaling-mysql -status: - observedGeneration: 3 - replicas: 3 - readyReplicas: 3 - currentReplicas: 3 - updatedReplicas: 3 - collisionCount: 0 ---- -kind: Deployment -apiVersion: apps/v1 -metadata: - name: gr-scaling-router -status: - observedGeneration: 3 - replicas: 3 - updatedReplicas: 3 - readyReplicas: 3 - availableReplicas: 3 ---- -apiVersion: ps.percona.com/v1alpha1 -kind: PerconaServerMySQL -metadata: - name: gr-scaling - finalizers: - - delete-mysql-pods-in-order -status: - mysql: - ready: 3 - size: 3 - state: ready - router: - ready: 3 - size: 3 - state: ready - state: ready + name: 09-read-from-primary +data: + data: "100500" diff --git a/e2e-tests/tests/gr-scaling/07-read-from-primary.yaml b/e2e-tests/tests/gr-scaling/08-read-from-primary.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/07-read-from-primary.yaml rename to e2e-tests/tests/gr-scaling/08-read-from-primary.yaml diff --git a/e2e-tests/tests/gr-scaling/09-assert.yaml b/e2e-tests/tests/gr-scaling/09-assert.yaml index 5a5fbc15b..cf221f4db 100644 --- a/e2e-tests/tests/gr-scaling/09-assert.yaml +++ b/e2e-tests/tests/gr-scaling/09-assert.yaml @@ -1,10 +1,43 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 30 +timeout: 360 --- -kind: ConfigMap -apiVersion: v1 +kind: StatefulSet +apiVersion: apps/v1 metadata: - name: 11-read-from-primary -data: - data: "100500" + name: gr-scaling-mysql +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-scaling-router +status: + observedGeneration: 3 + replicas: 3 + updatedReplicas: 3 + readyReplicas: 3 + availableReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-scaling + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/gr-scaling/08-scale-up-everything.yaml b/e2e-tests/tests/gr-scaling/09-scale-up-everything.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/08-scale-up-everything.yaml rename to e2e-tests/tests/gr-scaling/09-scale-up-everything.yaml diff --git a/e2e-tests/tests/gr-scaling/10-assert.yaml b/e2e-tests/tests/gr-scaling/10-assert.yaml index f5dc3ae66..95fa326fb 100644 --- a/e2e-tests/tests/gr-scaling/10-assert.yaml +++ b/e2e-tests/tests/gr-scaling/10-assert.yaml @@ -5,8 +5,8 @@ timeout: 30 kind: ConfigMap apiVersion: v1 metadata: - name: 12-read-from-replicas + name: 10-check-group-seeds data: - gr-scaling-mysql-0.gr-scaling-mysql: "100500" - gr-scaling-mysql-1.gr-scaling-mysql: "100500" - gr-scaling-mysql-2.gr-scaling-mysql: "100500" + gr-scaling-mysql-0.gr-scaling-mysql: "gr-scaling-mysql-1.gr-scaling-mysql:3306,gr-scaling-mysql-2.gr-scaling-mysql:3306" + gr-scaling-mysql-1.gr-scaling-mysql: "gr-scaling-mysql-0.gr-scaling-mysql:3306,gr-scaling-mysql-1.gr-scaling-mysql:3306,gr-scaling-mysql-2.gr-scaling-mysql:3306" + gr-scaling-mysql-2.gr-scaling-mysql: "gr-scaling-mysql-0.gr-scaling-mysql:3306,gr-scaling-mysql-1.gr-scaling-mysql:3306,gr-scaling-mysql-2.gr-scaling-mysql:3306" diff --git a/e2e-tests/tests/gr-scaling/10-check-group-seeds.yaml b/e2e-tests/tests/gr-scaling/10-check-group-seeds.yaml new file mode 100644 index 000000000..b9ce15a5e --- /dev/null +++ b/e2e-tests/tests/gr-scaling/10-check-group-seeds.yaml @@ -0,0 +1,21 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + args='' + size=$(kubectl -n ${NAMESPACE} get ps $(get_cluster_name) -o jsonpath='{.spec.mysql.size}') + for i in $(seq 0 $((size - 1))); do + host=$(get_mysql_headless_fqdn $(get_cluster_name) $i) + seeds=$(run_mysql "SELECT @@group_replication_group_seeds" "-h ${host} -uroot -proot_password") + echo ${seeds} + seeds=$(echo ${seeds} | sed -e "s/\.${NAMESPACE}//g") + args="${args} --from-literal=${host}=${seeds}" + done + + kubectl create configmap -n "${NAMESPACE}" 10-check-group-seeds ${args} diff --git a/e2e-tests/tests/gr-scaling/11-assert.yaml b/e2e-tests/tests/gr-scaling/11-assert.yaml new file mode 100644 index 000000000..5a5fbc15b --- /dev/null +++ b/e2e-tests/tests/gr-scaling/11-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 11-read-from-primary +data: + data: "100500" diff --git a/e2e-tests/tests/gr-scaling/09-read-from-primary.yaml b/e2e-tests/tests/gr-scaling/11-read-from-primary.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/09-read-from-primary.yaml rename to e2e-tests/tests/gr-scaling/11-read-from-primary.yaml diff --git a/e2e-tests/tests/gr-scaling/12-assert.yaml b/e2e-tests/tests/gr-scaling/12-assert.yaml new file mode 100644 index 000000000..f5dc3ae66 --- /dev/null +++ b/e2e-tests/tests/gr-scaling/12-assert.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 12-read-from-replicas +data: + gr-scaling-mysql-0.gr-scaling-mysql: "100500" + gr-scaling-mysql-1.gr-scaling-mysql: "100500" + gr-scaling-mysql-2.gr-scaling-mysql: "100500" diff --git a/e2e-tests/tests/gr-scaling/10-read-from-replicas.yaml b/e2e-tests/tests/gr-scaling/12-read-from-replicas.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/10-read-from-replicas.yaml rename to e2e-tests/tests/gr-scaling/12-read-from-replicas.yaml diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index ee01456e9..4d1b9a05b 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -541,6 +541,13 @@ func mysqldContainer(cr *apiv1alpha1.PerconaServerMySQL) corev1.Container { LivenessProbe: k8s.ExecProbe(spec.LivenessProbe, []string{"/opt/percona/healthcheck", "liveness"}), ReadinessProbe: k8s.ExecProbe(spec.ReadinessProbe, []string{"/opt/percona/healthcheck", "readiness"}), StartupProbe: k8s.ExecProbe(spec.StartupProbe, []string{"/opt/percona/bootstrap"}), + Lifecycle: &corev1.Lifecycle{ + PreStop: &corev1.LifecycleHandler{ + Exec: &corev1.ExecAction{ + Command: []string{"/opt/percona/ps-pre-stop.sh"}, + }, + }, + }, } return container From d0ea0f25e1fd489f36c145f6244f5dc1d2159ad2 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Thu, 8 Feb 2024 14:59:29 +0100 Subject: [PATCH 076/192] K8SPS-302 keep service on paused cluster (#544) * K8SPS-302 keep service on paused cluster * delete outdate prints * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * a bit of refactoring * update the test * fix PR comments * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * delete unused test --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- e2e-tests/tests/recreate/03-assert.yaml | 80 +++++++++++++++++++++++++ pkg/controller/ps/controller.go | 41 +++++++------ pkg/controller/ps/controller_test.go | 37 ------------ 3 files changed, 102 insertions(+), 56 deletions(-) diff --git a/e2e-tests/tests/recreate/03-assert.yaml b/e2e-tests/tests/recreate/03-assert.yaml index 8dd1c9732..0dbe68338 100644 --- a/e2e-tests/tests/recreate/03-assert.yaml +++ b/e2e-tests/tests/recreate/03-assert.yaml @@ -166,3 +166,83 @@ spec: app.kubernetes.io/part-of: percona-server sessionAffinity: None type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + percona.com/exposed: "true" + name: recreate-orc-1 +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: web + port: 3000 + protocol: TCP + targetPort: 3000 + - name: raft + port: 10008 + protocol: TCP + targetPort: 10008 + selector: + app.kubernetes.io/component: orc + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + statefulset.kubernetes.io/pod-name: recreate-orc-1 + sessionAffinity: None + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: recreate-haproxy +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: 3306 + - name: mysql-replicas + port: 3307 + protocol: TCP + targetPort: 3307 + - name: proxy-protocol + port: 3309 + protocol: TCP + targetPort: 3309 + - name: mysqlx + port: 33060 + protocol: TCP + targetPort: 33060 + - name: mysql-admin + port: 33062 + protocol: TCP + targetPort: 33062 + selector: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: recreate + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + sessionAffinity: None + type: ClusterIP diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 9452cce87..b9f189aee 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -817,14 +817,6 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL, exposer Exposer) error { log := logf.FromContext(ctx).WithName("cleanupOutdatedServices") - - if !cr.HAProxyEnabled() || cr.Spec.Proxy.HAProxy.Size == 0 { - svc := haproxy.Service(cr, nil) - if err := r.Client.Delete(ctx, svc); err != nil && !k8serrors.IsNotFound(err) { - return errors.Wrapf(err, "delete HAProxy svc %s", svc.Name) - } - } - size := int(exposer.Size()) svcNames := make(map[string]struct{}, size) for i := 0; i < size; i++ { @@ -860,11 +852,27 @@ func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Conte return nil } -func (r *PerconaServerMySQLReconciler) cleanupOutdatedStatefulSets(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { +func (r *PerconaServerMySQLReconciler) cleanupMysql(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { + if !cr.Spec.Pause { + mysqlExposer := mysql.Exposer(*cr) + if err := r.cleanupOutdatedServices(ctx, cr, &mysqlExposer); err != nil { + return errors.Wrap(err, "cleanup MySQL services") + } + } + return nil +} + +func (r *PerconaServerMySQLReconciler) cleanupOrchestrator(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { + if !cr.OrchestratorEnabled() { if err := r.Delete(ctx, orchestrator.StatefulSet(cr, "")); err != nil && !k8serrors.IsNotFound(err) { return errors.Wrap(err, "failed to delete orchestrator statefulset") } + + orcExposer := orchestrator.Exposer(*cr) + if err := r.cleanupOutdatedServices(ctx, cr, &orcExposer); err != nil { + return errors.Wrap(err, "cleanup Orchestrator services") + } } return nil } @@ -944,22 +952,17 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, } func (r *PerconaServerMySQLReconciler) cleanupOutdated(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { - mysqlExposer := mysql.Exposer(*cr) - if err := r.cleanupOutdatedServices(ctx, cr, &mysqlExposer); err != nil { - return errors.Wrap(err, "cleanup MySQL services") - } - orcExposer := orchestrator.Exposer(*cr) - if err := r.cleanupOutdatedServices(ctx, cr, &orcExposer); err != nil { - return errors.Wrap(err, "cleanup Orchestrator services") + if err := r.cleanupMysql(ctx, cr); err != nil { + return errors.Wrap(err, "cleanup mysql") } - if err := r.cleanupOutdatedStatefulSets(ctx, cr); err != nil { - return errors.Wrap(err, "cleanup statefulsets") + if err := r.cleanupOrchestrator(ctx, cr); err != nil { + return errors.Wrap(err, "cleanup orchestrator") } if err := r.cleanupProxies(ctx, cr); err != nil { - return errors.Wrap(err, "cleanup statefulsets") + return errors.Wrap(err, "cleanup proxies") } return nil diff --git a/pkg/controller/ps/controller_test.go b/pkg/controller/ps/controller_test.go index 617cd5dfb..95ff947eb 100644 --- a/pkg/controller/ps/controller_test.go +++ b/pkg/controller/ps/controller_test.go @@ -433,42 +433,5 @@ var _ = Describe("Reconcile HAProxy", Ordered, func() { }, time.Second*15, time.Millisecond*250).Should(BeTrue()) }) }) - - When("HAPRoxy is disabled by setting the size to zero", Ordered, func() { - It("should remove outdated HAProxy service", func() { - Eventually(func() bool { - err := k8sClient.Get(ctx, crNamespacedName, cr) - return err == nil - }, time.Second*15, time.Millisecond*250).Should(BeTrue()) - - cr.Spec.Proxy.HAProxy.Enabled = true - Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) - - By("Reconcile once so the operator can create HAProxy service") - _, err = reconciler().Reconcile(ctx, ctrl.Request{NamespacedName: crNamespacedName}) - Expect(err).NotTo(HaveOccurred()) - - Eventually(func() bool { - err := k8sClient.Get(ctx, crNamespacedName, cr) - return err == nil - }, time.Second*15, time.Millisecond*250).Should(BeTrue()) - - cr.Spec.Proxy.HAProxy.Size = 0 - Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) - - _, err = reconciler().Reconcile(ctx, ctrl.Request{NamespacedName: crNamespacedName}) - Expect(err).NotTo(HaveOccurred()) - - svc := &corev1.Service{} - Eventually(func() bool { - err := k8sClient.Get(ctx, types.NamespacedName{ - Namespace: cr.Namespace, - Name: svcName, - }, svc) - - return k8serrors.IsNotFound(err) - }, time.Second*15, time.Millisecond*250).Should(BeTrue()) - }) - }) }) }) From b3824c08b8275f0d0a6e10f915aa176ca34adfe6 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Thu, 8 Feb 2024 15:02:21 +0100 Subject: [PATCH 077/192] K8SPS-303 update ports (#545) * K8SPS-303 update ports * fix test --------- Co-authored-by: Viacheslav Sarzhan --- .../async-ignore-annotations/02-assert.yaml | 4 ++-- .../async-ignore-annotations/04-assert.yaml | 4 ++-- .../async-ignore-annotations/05-assert.yaml | 4 ++-- .../async-ignore-annotations/06-assert.yaml | 4 ++-- .../async-ignore-annotations/07-assert.yaml | 4 ++-- e2e-tests/tests/auto-config/02-assert.yaml | 2 +- e2e-tests/tests/gr-haproxy/01-assert.yaml | 4 ++-- .../gr-ignore-annotations/01-assert.yaml | 8 ++++++-- .../gr-ignore-annotations/02-assert.yaml | 8 ++++++-- .../gr-ignore-annotations/04-assert.yaml | 8 ++++++-- .../gr-ignore-annotations/05-assert.yaml | 8 ++++++-- .../gr-ignore-annotations/06-assert.yaml | 8 ++++++-- .../gr-ignore-annotations/07-assert.yaml | 8 ++++++-- e2e-tests/tests/gr-init-deploy/01-assert.yaml | 8 ++++++-- e2e-tests/tests/gr-recreate/01-assert.yaml | 8 ++++++-- e2e-tests/tests/gr-recreate/03-assert.yaml | 8 ++++++-- e2e-tests/tests/gr-recreate/04-assert.yaml | 8 ++++++-- e2e-tests/tests/gr-recreate/09-assert.yaml | 8 ++++++-- .../tests/gr-self-healing/02-assert.yaml | 8 ++++++-- .../tests/gr-self-healing/05-assert.yaml | 8 ++++++-- .../tests/gr-self-healing/08-assert.yaml | 8 ++++++-- .../tests/gr-self-healing/11-assert.yaml | 8 ++++++-- .../tests/gr-self-healing/14-assert.yaml | 8 ++++++-- e2e-tests/tests/limits/01-assert.yaml | 2 +- e2e-tests/tests/limits/03-assert.yaml | 2 +- e2e-tests/tests/limits/05-assert.yaml | 2 +- e2e-tests/tests/recreate/01-assert.yaml | 4 ++-- e2e-tests/tests/recreate/03-assert.yaml | 4 ++-- e2e-tests/tests/recreate/04-assert.yaml | 4 ++-- e2e-tests/tests/recreate/09-assert.yaml | 4 ++-- .../tests/service-per-pod/01-assert.yaml | 20 +++++++++---------- .../tests/service-per-pod/04-assert.yaml | 20 +++++++++---------- pkg/controller/psbackup/controller.go | 2 +- pkg/mysql/mysql.go | 2 +- pkg/router/router.go | 9 +++++++++ 35 files changed, 151 insertions(+), 78 deletions(-) diff --git a/e2e-tests/tests/async-ignore-annotations/02-assert.yaml b/e2e-tests/tests/async-ignore-annotations/02-assert.yaml index 153c75b68..ed3fbbcf9 100644 --- a/e2e-tests/tests/async-ignore-annotations/02-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/02-assert.yaml @@ -39,9 +39,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: async-ignore-annotations diff --git a/e2e-tests/tests/async-ignore-annotations/04-assert.yaml b/e2e-tests/tests/async-ignore-annotations/04-assert.yaml index f10793655..2a1bd591b 100644 --- a/e2e-tests/tests/async-ignore-annotations/04-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/04-assert.yaml @@ -41,9 +41,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: async-ignore-annotations diff --git a/e2e-tests/tests/async-ignore-annotations/05-assert.yaml b/e2e-tests/tests/async-ignore-annotations/05-assert.yaml index 2ff3297ed..6fe806fd5 100644 --- a/e2e-tests/tests/async-ignore-annotations/05-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/05-assert.yaml @@ -39,9 +39,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: async-ignore-annotations diff --git a/e2e-tests/tests/async-ignore-annotations/06-assert.yaml b/e2e-tests/tests/async-ignore-annotations/06-assert.yaml index 1c332375b..93bb6aeaf 100644 --- a/e2e-tests/tests/async-ignore-annotations/06-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/06-assert.yaml @@ -39,9 +39,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: async-ignore-annotations diff --git a/e2e-tests/tests/async-ignore-annotations/07-assert.yaml b/e2e-tests/tests/async-ignore-annotations/07-assert.yaml index 7127e3983..c244dc5ab 100644 --- a/e2e-tests/tests/async-ignore-annotations/07-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/07-assert.yaml @@ -37,9 +37,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: async-ignore-annotations diff --git a/e2e-tests/tests/auto-config/02-assert.yaml b/e2e-tests/tests/auto-config/02-assert.yaml index 0e4abc677..1168398bb 100644 --- a/e2e-tests/tests/auto-config/02-assert.yaml +++ b/e2e-tests/tests/auto-config/02-assert.yaml @@ -17,7 +17,7 @@ spec: memory: 1Gi - name: xtrabackup ports: - - containerPort: 6033 + - containerPort: 6450 name: http protocol: TCP - name: pt-heartbeat diff --git a/e2e-tests/tests/gr-haproxy/01-assert.yaml b/e2e-tests/tests/gr-haproxy/01-assert.yaml index f27bafd60..168163cd8 100644 --- a/e2e-tests/tests/gr-haproxy/01-assert.yaml +++ b/e2e-tests/tests/gr-haproxy/01-assert.yaml @@ -73,9 +73,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP diff --git a/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml index ae1a696f1..eae064fbb 100644 --- a/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml @@ -75,9 +75,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -133,6 +133,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-ignore-annotations/02-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/02-assert.yaml index d69640b33..3abe6c125 100644 --- a/e2e-tests/tests/gr-ignore-annotations/02-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/02-assert.yaml @@ -38,9 +38,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -101,6 +101,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-ignore-annotations/04-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/04-assert.yaml index 0ff91b537..0e44e75f8 100644 --- a/e2e-tests/tests/gr-ignore-annotations/04-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/04-assert.yaml @@ -41,9 +41,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -108,6 +108,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-ignore-annotations/05-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/05-assert.yaml index 9f71c5c66..59e1cad34 100644 --- a/e2e-tests/tests/gr-ignore-annotations/05-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/05-assert.yaml @@ -39,9 +39,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -103,6 +103,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-ignore-annotations/06-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/06-assert.yaml index 0de8438a4..96be1be0a 100644 --- a/e2e-tests/tests/gr-ignore-annotations/06-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/06-assert.yaml @@ -39,9 +39,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -103,6 +103,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-ignore-annotations/07-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/07-assert.yaml index 4b5307b9a..2e911f1b4 100644 --- a/e2e-tests/tests/gr-ignore-annotations/07-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/07-assert.yaml @@ -37,9 +37,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -99,6 +99,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-init-deploy/01-assert.yaml b/e2e-tests/tests/gr-init-deploy/01-assert.yaml index b32a7f452..d13e2f01b 100644 --- a/e2e-tests/tests/gr-init-deploy/01-assert.yaml +++ b/e2e-tests/tests/gr-init-deploy/01-assert.yaml @@ -72,9 +72,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -130,6 +130,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-recreate/01-assert.yaml b/e2e-tests/tests/gr-recreate/01-assert.yaml index ccdaa8c93..0defb50bc 100644 --- a/e2e-tests/tests/gr-recreate/01-assert.yaml +++ b/e2e-tests/tests/gr-recreate/01-assert.yaml @@ -73,9 +73,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -131,6 +131,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-recreate/03-assert.yaml b/e2e-tests/tests/gr-recreate/03-assert.yaml index d7f76e017..f6a32005e 100644 --- a/e2e-tests/tests/gr-recreate/03-assert.yaml +++ b/e2e-tests/tests/gr-recreate/03-assert.yaml @@ -103,9 +103,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -161,6 +161,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-recreate/04-assert.yaml b/e2e-tests/tests/gr-recreate/04-assert.yaml index 1ea611d15..954091fa1 100644 --- a/e2e-tests/tests/gr-recreate/04-assert.yaml +++ b/e2e-tests/tests/gr-recreate/04-assert.yaml @@ -73,9 +73,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -131,6 +131,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-recreate/09-assert.yaml b/e2e-tests/tests/gr-recreate/09-assert.yaml index e76c4c22b..8fbe7b5f8 100644 --- a/e2e-tests/tests/gr-recreate/09-assert.yaml +++ b/e2e-tests/tests/gr-recreate/09-assert.yaml @@ -73,9 +73,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -131,6 +131,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-self-healing/02-assert.yaml b/e2e-tests/tests/gr-self-healing/02-assert.yaml index 85cf66437..ea774179f 100644 --- a/e2e-tests/tests/gr-self-healing/02-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/02-assert.yaml @@ -72,9 +72,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -130,6 +130,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-self-healing/05-assert.yaml b/e2e-tests/tests/gr-self-healing/05-assert.yaml index cb4289cf5..f107033cd 100644 --- a/e2e-tests/tests/gr-self-healing/05-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/05-assert.yaml @@ -72,9 +72,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -130,6 +130,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-self-healing/08-assert.yaml b/e2e-tests/tests/gr-self-healing/08-assert.yaml index 7206b894c..e2f394cc0 100644 --- a/e2e-tests/tests/gr-self-healing/08-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/08-assert.yaml @@ -72,9 +72,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -130,6 +130,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-self-healing/11-assert.yaml b/e2e-tests/tests/gr-self-healing/11-assert.yaml index 7a197b77f..7075a30c6 100644 --- a/e2e-tests/tests/gr-self-healing/11-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/11-assert.yaml @@ -72,9 +72,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -130,6 +130,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/gr-self-healing/14-assert.yaml b/e2e-tests/tests/gr-self-healing/14-assert.yaml index 497b0571d..022a09012 100644 --- a/e2e-tests/tests/gr-self-healing/14-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/14-assert.yaml @@ -72,9 +72,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 - name: mysql-gr port: 33061 protocol: TCP @@ -130,6 +130,10 @@ spec: port: 6449 protocol: TCP targetPort: 6449 + - name: x-default + port: 33060 + protocol: TCP + targetPort: 33060 - name: rw-admin port: 33062 protocol: TCP diff --git a/e2e-tests/tests/limits/01-assert.yaml b/e2e-tests/tests/limits/01-assert.yaml index b7eb51f8f..b40a120e4 100644 --- a/e2e-tests/tests/limits/01-assert.yaml +++ b/e2e-tests/tests/limits/01-assert.yaml @@ -130,7 +130,7 @@ spec: imagePullPolicy: Always name: xtrabackup ports: - - containerPort: 6033 + - containerPort: 6450 name: http protocol: TCP resources: {} diff --git a/e2e-tests/tests/limits/03-assert.yaml b/e2e-tests/tests/limits/03-assert.yaml index 6bc668cbd..066ecd64e 100644 --- a/e2e-tests/tests/limits/03-assert.yaml +++ b/e2e-tests/tests/limits/03-assert.yaml @@ -130,7 +130,7 @@ spec: imagePullPolicy: Always name: xtrabackup ports: - - containerPort: 6033 + - containerPort: 6450 name: http protocol: TCP resources: {} diff --git a/e2e-tests/tests/limits/05-assert.yaml b/e2e-tests/tests/limits/05-assert.yaml index e98a8507d..9a33aed96 100644 --- a/e2e-tests/tests/limits/05-assert.yaml +++ b/e2e-tests/tests/limits/05-assert.yaml @@ -128,7 +128,7 @@ spec: imagePullPolicy: Always name: xtrabackup ports: - - containerPort: 6033 + - containerPort: 6450 name: http protocol: TCP resources: {} diff --git a/e2e-tests/tests/recreate/01-assert.yaml b/e2e-tests/tests/recreate/01-assert.yaml index aaee4e863..bb37dfc40 100644 --- a/e2e-tests/tests/recreate/01-assert.yaml +++ b/e2e-tests/tests/recreate/01-assert.yaml @@ -91,9 +91,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: recreate diff --git a/e2e-tests/tests/recreate/03-assert.yaml b/e2e-tests/tests/recreate/03-assert.yaml index 0dbe68338..75e60f85a 100644 --- a/e2e-tests/tests/recreate/03-assert.yaml +++ b/e2e-tests/tests/recreate/03-assert.yaml @@ -118,9 +118,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: recreate diff --git a/e2e-tests/tests/recreate/04-assert.yaml b/e2e-tests/tests/recreate/04-assert.yaml index 0eb6c8028..90f7e13d3 100644 --- a/e2e-tests/tests/recreate/04-assert.yaml +++ b/e2e-tests/tests/recreate/04-assert.yaml @@ -91,9 +91,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: recreate diff --git a/e2e-tests/tests/recreate/09-assert.yaml b/e2e-tests/tests/recreate/09-assert.yaml index 4c3ff6477..041fc7797 100644 --- a/e2e-tests/tests/recreate/09-assert.yaml +++ b/e2e-tests/tests/recreate/09-assert.yaml @@ -91,9 +91,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: recreate diff --git a/e2e-tests/tests/service-per-pod/01-assert.yaml b/e2e-tests/tests/service-per-pod/01-assert.yaml index 44b783b7e..9fb5f5e2e 100644 --- a/e2e-tests/tests/service-per-pod/01-assert.yaml +++ b/e2e-tests/tests/service-per-pod/01-assert.yaml @@ -75,9 +75,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod @@ -119,9 +119,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 publishNotReadyAddresses: true selector: app.kubernetes.io/component: mysql @@ -164,9 +164,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod @@ -209,9 +209,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod @@ -254,9 +254,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod diff --git a/e2e-tests/tests/service-per-pod/04-assert.yaml b/e2e-tests/tests/service-per-pod/04-assert.yaml index 37f331d8e..b7cebc665 100644 --- a/e2e-tests/tests/service-per-pod/04-assert.yaml +++ b/e2e-tests/tests/service-per-pod/04-assert.yaml @@ -75,9 +75,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod @@ -119,9 +119,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 publishNotReadyAddresses: true selector: app.kubernetes.io/component: mysql @@ -164,9 +164,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod @@ -209,9 +209,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod @@ -254,9 +254,9 @@ spec: protocol: TCP targetPort: 33060 - name: http - port: 6033 + port: 6450 protocol: TCP - targetPort: 6033 + targetPort: 6450 selector: app.kubernetes.io/component: mysql app.kubernetes.io/instance: service-per-pod diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index dbb24c966..5158c6104 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -516,7 +516,7 @@ func (r *PerconaServerMySQLBackupReconciler) deleteBackup(ctx context.Context, c return false, errors.Wrap(err, "get backup source node") } sidecarURL := url.URL{ - Host: src + ":6033", + Host: src + ":6450", Scheme: "http", Path: "/backup/" + cr.Name, } diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index 4d1b9a05b..c1bd8d130 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -33,7 +33,7 @@ const ( DefaultGRPort = 33061 DefaultAdminPort = 33062 DefaultXPort = 33060 - SidecarHTTPPort = 6033 + SidecarHTTPPort = 6450 ) type User struct { diff --git a/pkg/router/router.go b/pkg/router/router.go index 14f2f2c96..a2c55ee3d 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -32,6 +32,7 @@ const ( PortReadOnly = 6447 PortXReadWrite = 6448 PortXReadOnly = 6449 + PortXDefault = 33060 PortRWAdmin = 33062 ) @@ -113,6 +114,10 @@ func Service(cr *apiv1alpha1.PerconaServerMySQL) *corev1.Service { Name: "x-read-only", Port: int32(PortXReadOnly), }, + { + Name: "x-default", + Port: int32(PortXDefault), + }, { Name: "rw-admin", Port: int32(PortRWAdmin), @@ -282,6 +287,10 @@ func routerContainer(cr *apiv1alpha1.PerconaServerMySQL) corev1.Container { Name: "x-read-only", ContainerPort: int32(PortXReadOnly), }, + { + Name: "x-default", + ContainerPort: int32(PortXDefault), + }, { Name: "rw-admin", ContainerPort: int32(PortRWAdmin), From 121c4967a65c8e881fe81e86bfbfab6cdf0a7f85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:30:03 +0200 Subject: [PATCH 078/192] CLOUD-727: Bump github.com/go-openapi/validate from 0.22.6 to 0.23.0 (#546) Bumps [github.com/go-openapi/validate](https://github.com/go-openapi/validate) from 0.22.6 to 0.23.0. - [Commits](https://github.com/go-openapi/validate/compare/v0.22.6...v0.23.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/validate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 965a45065..216e30ff1 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/go-openapi/runtime v0.27.1 github.com/go-openapi/strfmt v0.22.0 github.com/go-openapi/swag v0.22.9 - github.com/go-openapi/validate v0.22.6 + github.com/go-openapi/validate v0.23.0 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.66 @@ -58,11 +58,11 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/analysis v0.22.0 // indirect + github.com/go-openapi/analysis v0.22.2 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/loads v0.21.5 // indirect - github.com/go-openapi/spec v0.20.13 // indirect + github.com/go-openapi/spec v0.20.14 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect diff --git a/go.sum b/go.sum index cfaff3132..54b3167c0 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/analysis v0.22.0 h1:wQ/d07nf78HNj4u+KiSY0sT234IAyePPbMgpUjUJQR0= -github.com/go-openapi/analysis v0.22.0/go.mod h1:acDnkkCI2QxIo8sSIPgmp1wUlRohV7vfGtAIVae73b0= +github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= +github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= @@ -80,14 +80,14 @@ github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRz github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto= github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= -github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= -github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= +github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= -github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo= -github.com/go-openapi/validate v0.22.6/go.mod h1:eaddXSqKeTg5XpSmj1dYyFTK/95n/XHwcOY+BMxKMyM= +github.com/go-openapi/validate v0.23.0 h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw= +github.com/go-openapi/validate v0.23.0/go.mod h1:EeiAZ5bmpSIOJV1WLfyYF9qp/B1ZgSaEpHTJHtN5cbE= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= From 571d2662cb3b6d511e225108b349f9b9d350999a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 18:45:09 +0200 Subject: [PATCH 079/192] CLOUD-727: Bump github.com/Azure/azure-sdk-for-go/sdk/storage/azblob (#557) Bumps [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azidentity/v1.2.1...sdk/azcore/v1.3.0) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 216e30ff1..b4f0f4ad3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/percona/percona-server-mysql-operator go 1.21 require ( - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0 github.com/cert-manager/cert-manager v1.13.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 @@ -43,8 +43,8 @@ require ( ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -70,7 +70,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect - github.com/google/uuid v1.5.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/iancoleman/orderedmap v0.3.0 // indirect diff --git a/go.sum b/go.sum index 54b3167c0..5c8f5d65d 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,17 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 h1:AMf7YbZOZIW5b66cXNHMWWT/zkjhz5+a+k/3x40EO7E= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1/go.mod h1:uwfk06ZBcvL/g4VHNjurPfVln9NMbsk2XIZxJ+hu81k= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0 h1:IfFdxTUDiV58iZqPKgyWiz4X4fCxZeQ1pTQPImLYXpY= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0/go.mod h1:SUZc9YRRHfx2+FAQKNDGrssXehqLpxmwRv2mC/5ntj4= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= @@ -97,8 +97,8 @@ github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04v github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= -github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= +github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -124,8 +124,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -202,8 +202,8 @@ github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYG github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= From d7ce8419264d5123f1070006d638f6cc2caf10ff Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Mon, 19 Feb 2024 10:51:23 +0200 Subject: [PATCH 080/192] K8SPS-325: add `PMM_AGENT_PATHS_TEMPDIR` (#553) https://perconadev.atlassian.net/browse/K8SPS-325 Co-authored-by: Viacheslav Sarzhan --- e2e-tests/tests/monitoring/02-assert.yaml | 4 ++++ e2e-tests/tests/monitoring/03-assert.yaml | 4 ++++ pkg/pmm/container.go | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/e2e-tests/tests/monitoring/02-assert.yaml b/e2e-tests/tests/monitoring/02-assert.yaml index 2ebeb2c96..914e8fef2 100644 --- a/e2e-tests/tests/monitoring/02-assert.yaml +++ b/e2e-tests/tests/monitoring/02-assert.yaml @@ -79,6 +79,8 @@ spec: value: "true" - name: PMM_AGENT_SIDECAR_SLEEP value: "5" + - name: PMM_AGENT_PATHS_TEMPDIR + value: "/tmp" - name: DB_CLUSTER value: monitoring - name: DB_TYPE @@ -209,6 +211,8 @@ spec: value: "true" - name: PMM_AGENT_SIDECAR_SLEEP value: "5" + - name: PMM_AGENT_PATHS_TEMPDIR + value: "/tmp" - name: DB_CLUSTER value: monitoring - name: DB_TYPE diff --git a/e2e-tests/tests/monitoring/03-assert.yaml b/e2e-tests/tests/monitoring/03-assert.yaml index 0d8982c96..a0c643f01 100644 --- a/e2e-tests/tests/monitoring/03-assert.yaml +++ b/e2e-tests/tests/monitoring/03-assert.yaml @@ -79,6 +79,8 @@ spec: value: "true" - name: PMM_AGENT_SIDECAR_SLEEP value: "5" + - name: PMM_AGENT_PATHS_TEMPDIR + value: "/tmp" - name: DB_CLUSTER value: monitoring - name: DB_TYPE @@ -208,6 +210,8 @@ spec: value: "true" - name: PMM_AGENT_SIDECAR_SLEEP value: "5" + - name: PMM_AGENT_PATHS_TEMPDIR + value: "/tmp" - name: DB_CLUSTER value: monitoring - name: DB_TYPE diff --git a/pkg/pmm/container.go b/pkg/pmm/container.go index a2d102a9e..0f0bff03e 100644 --- a/pkg/pmm/container.go +++ b/pkg/pmm/container.go @@ -155,6 +155,10 @@ func pmmEnvs(cr *apiv1alpha1.PerconaServerMySQL, secret *corev1.Secret, dbType s Name: "PMM_AGENT_SIDECAR_SLEEP", Value: "5", }, + { + Name: "PMM_AGENT_PATHS_TEMPDIR", + Value: "/tmp", + }, { Name: "DB_CLUSTER", Value: cr.Name, From 5394abf370d8a78c0d5ae02d60c0e4d933b525a7 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Mon, 19 Feb 2024 11:53:00 +0300 Subject: [PATCH 081/192] K8SPS-315 do not restart cluster if don't use CustomConfigKey as config name in config map. (#558) * fix condition * Update pkg/controller/ps/configuration.go Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- pkg/controller/ps/configuration.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/controller/ps/configuration.go b/pkg/controller/ps/configuration.go index 40d9769f9..7713e25f4 100644 --- a/pkg/controller/ps/configuration.go +++ b/pkg/controller/ps/configuration.go @@ -18,6 +18,7 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" + "github.com/percona/percona-server-mysql-operator/pkg/mysql" ) type Configurable interface { @@ -33,7 +34,6 @@ func (r *PerconaServerMySQLReconciler) reconcileCustomConfiguration(ctx context. cmName := configurable.GetConfigMapName() nn := types.NamespacedName{Name: cmName, Namespace: cr.Namespace} - currCm := &corev1.ConfigMap{} if err := r.Client.Get(ctx, nn, currCm); err != nil && !k8serrors.IsNotFound(err) { return "", errors.Wrapf(err, "get ConfigMap/%s", cmName) @@ -54,6 +54,11 @@ func (r *PerconaServerMySQLReconciler) reconcileCustomConfiguration(ctx context. d := struct{ Data map[string]string }{Data: currCm.Data} data, err := json.Marshal(d) + + if cmName == cr.Name+"-mysql" && currCm.Data[mysql.CustomConfigKey] == "" { + return "", errors.New("Failed to update config map. Please use my.cnf as a config name. Only in this case config map will be applied to the cluster") + } + if err != nil { return "", errors.Wrap(err, "marshal configmap data to json") } From 471bd86d1ad970f279f48ce2426ac595becff29a Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Mon, 19 Feb 2024 10:19:37 +0100 Subject: [PATCH 082/192] Complete orchestrator ssl connection config. (#550) Co-authored-by: Viacheslav Sarzhan --- build/orc-entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/orc-entrypoint.sh b/build/orc-entrypoint.sh index 131f561c0..37f1aa299 100755 --- a/build/orc-entrypoint.sh +++ b/build/orc-entrypoint.sh @@ -21,6 +21,8 @@ jq -M ". + { RaftAdvertise:\"$HOSTNAME.$NAMESPACE\", RaftBind:\"$HOSTNAME.$ORC_SERVICE.$NAMESPACE\", RaftEnabled: ${RAFT_ENABLED:-"true"}, + MySQLTopologyUseMutualTLS: true, + MySQLTopologySSLSkipVerify: true, MySQLTopologySSLPrivateKeyFile:\"${ORC_CONF_PATH}/ssl/tls.key\", MySQLTopologySSLCertFile:\"${ORC_CONF_PATH}/ssl/tls.crt\", MySQLTopologySSLCAFile:\"${ORC_CONF_PATH}/ssl/ca.crt\", From e911efe960ce47a94da974ff9e2eb722aaa83e1f Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Mon, 19 Feb 2024 15:17:42 +0200 Subject: [PATCH 083/192] K8SPS-330 use haproxy_check_primary.sh for one pod deployment (#559) * we need to use haproxy_check_primary.sh to allow users to connect to DB via admin port in case of one pod deployment --- build/haproxy_add_mysql_nodes.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/haproxy_add_mysql_nodes.sh b/build/haproxy_add_mysql_nodes.sh index 48fd9ef88..cea2819e4 100755 --- a/build/haproxy_add_mysql_nodes.sh +++ b/build/haproxy_add_mysql_nodes.sh @@ -37,6 +37,11 @@ function main() { echo "${#NODE_LIST_REPL[@]}" >$path_to_haproxy_cfg/AVAILABLE_NODES + haproxy_check_script='haproxy_check_primary.sh' + if [ "${#NODE_LIST_REPL[@]}" -gt 1 ]; then + haproxy_check_script='haproxy_check_replicas.sh' + fi + cat <<-EOF >"$path_to_haproxy_cfg/haproxy.cfg" backend mysql-primary mode tcp @@ -71,7 +76,7 @@ function main() { option srvtcpka balance roundrobin option external-check - external-check command /opt/percona/haproxy_check_replicas.sh + external-check command /opt/percona/$haproxy_check_script EOF ( @@ -85,7 +90,7 @@ function main() { option srvtcpka balance roundrobin option external-check - external-check command /opt/percona/haproxy_check_replicas.sh + external-check command /opt/percona/$haproxy_check_script EOF ( From 46327040241d73c45f207df0f2f7398f54e440e8 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Tue, 20 Feb 2024 15:01:59 +0200 Subject: [PATCH 084/192] fix gr-self-healing test (#563) --- e2e-tests/tests/gr-self-healing/01-assert.yaml | 13 +++++++++++++ .../tests/gr-self-healing/03-write-data.yaml | 1 + .../tests/gr-self-healing/06-write-data.yaml | 1 + .../tests/gr-self-healing/09-write-data.yaml | 1 + .../tests/gr-self-healing/12-write-data.yaml | 1 + e2e-tests/tests/gr-self-healing/13-assert.yaml | 16 ++++++++++++++++ .../tests/gr-self-healing/15-write-data.yaml | 1 + .../tests/operator-self-healing/02-assert.yaml | 13 +++++++++++++ .../operator-self-healing/03-write-data.yaml | 1 + 9 files changed, 48 insertions(+) diff --git a/e2e-tests/tests/gr-self-healing/01-assert.yaml b/e2e-tests/tests/gr-self-healing/01-assert.yaml index 253d7158f..071e20178 100644 --- a/e2e-tests/tests/gr-self-healing/01-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/01-assert.yaml @@ -13,3 +13,16 @@ status: readyReplicas: 3 replicas: 3 updatedReplicas: 3 +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: chaos-daemon +status: + currentNumberScheduled: 3 + desiredNumberScheduled: 3 + numberAvailable: 3 + numberMisscheduled: 0 + numberReady: 3 + observedGeneration: 1 + updatedNumberScheduled: 3 diff --git a/e2e-tests/tests/gr-self-healing/03-write-data.yaml b/e2e-tests/tests/gr-self-healing/03-write-data.yaml index 1bbd291a9..2e74d138f 100644 --- a/e2e-tests/tests/gr-self-healing/03-write-data.yaml +++ b/e2e-tests/tests/gr-self-healing/03-write-data.yaml @@ -14,3 +14,4 @@ commands: run_mysql \ "INSERT myDB.myTable (id) VALUES (100500)" \ "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + sleep 5 diff --git a/e2e-tests/tests/gr-self-healing/06-write-data.yaml b/e2e-tests/tests/gr-self-healing/06-write-data.yaml index a8da85c54..e0036d7de 100644 --- a/e2e-tests/tests/gr-self-healing/06-write-data.yaml +++ b/e2e-tests/tests/gr-self-healing/06-write-data.yaml @@ -10,3 +10,4 @@ commands: run_mysql \ "INSERT myDB.myTable (id) VALUES (100501)" \ "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + sleep 5 diff --git a/e2e-tests/tests/gr-self-healing/09-write-data.yaml b/e2e-tests/tests/gr-self-healing/09-write-data.yaml index f3bb7eb48..2cb0a9a12 100644 --- a/e2e-tests/tests/gr-self-healing/09-write-data.yaml +++ b/e2e-tests/tests/gr-self-healing/09-write-data.yaml @@ -10,3 +10,4 @@ commands: run_mysql \ "INSERT myDB.myTable (id) VALUES (100502)" \ "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + sleep 5 diff --git a/e2e-tests/tests/gr-self-healing/12-write-data.yaml b/e2e-tests/tests/gr-self-healing/12-write-data.yaml index a683b8542..cbd944ca5 100644 --- a/e2e-tests/tests/gr-self-healing/12-write-data.yaml +++ b/e2e-tests/tests/gr-self-healing/12-write-data.yaml @@ -10,3 +10,4 @@ commands: run_mysql \ "INSERT myDB.myTable (id) VALUES (100503)" \ "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + sleep 5 diff --git a/e2e-tests/tests/gr-self-healing/13-assert.yaml b/e2e-tests/tests/gr-self-healing/13-assert.yaml index 7d2f48cde..c74eca537 100644 --- a/e2e-tests/tests/gr-self-healing/13-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/13-assert.yaml @@ -2,6 +2,22 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert timeout: 30 --- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-self-healing + finalizers: + - delete-mysql-pods-in-order +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready +--- kind: ConfigMap apiVersion: v1 metadata: diff --git a/e2e-tests/tests/gr-self-healing/15-write-data.yaml b/e2e-tests/tests/gr-self-healing/15-write-data.yaml index 9152934e0..4cf36efa4 100644 --- a/e2e-tests/tests/gr-self-healing/15-write-data.yaml +++ b/e2e-tests/tests/gr-self-healing/15-write-data.yaml @@ -10,3 +10,4 @@ commands: run_mysql \ "INSERT myDB.myTable (id) VALUES (100504)" \ "-h $(get_mysql_router_service $(get_cluster_name)) -P 6446 -uroot -proot_password" + sleep 5 diff --git a/e2e-tests/tests/operator-self-healing/02-assert.yaml b/e2e-tests/tests/operator-self-healing/02-assert.yaml index 143e658f6..5c32cb344 100644 --- a/e2e-tests/tests/operator-self-healing/02-assert.yaml +++ b/e2e-tests/tests/operator-self-healing/02-assert.yaml @@ -58,3 +58,16 @@ status: size: 3 state: ready state: ready +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: chaos-daemon +status: + currentNumberScheduled: 3 + desiredNumberScheduled: 3 + numberAvailable: 3 + numberMisscheduled: 0 + numberReady: 3 + observedGeneration: 1 + updatedNumberScheduled: 3 diff --git a/e2e-tests/tests/operator-self-healing/03-write-data.yaml b/e2e-tests/tests/operator-self-healing/03-write-data.yaml index bc82e7920..28af49e59 100644 --- a/e2e-tests/tests/operator-self-healing/03-write-data.yaml +++ b/e2e-tests/tests/operator-self-healing/03-write-data.yaml @@ -14,3 +14,4 @@ commands: run_mysql \ "INSERT myDB.myTable (id) VALUES (100500)" \ "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + sleep 5 From caf206b136474ab4b4b402fd863fbee8cee12e66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:29:37 +0200 Subject: [PATCH 085/192] CLOUD-727: Bump sigs.k8s.io/controller-runtime from 0.17.0 to 0.17.2 (#561) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.17.0 to 0.17.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.17.0...v0.17.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b4f0f4ad3..a4decc8d1 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( k8s.io/apimachinery v0.29.1 k8s.io/client-go v0.29.1 k8s.io/utils v0.0.0-20230726121419-3b25d923346b - sigs.k8s.io/controller-runtime v0.17.0 + sigs.k8s.io/controller-runtime v0.17.2 ) require ( diff --git a/go.sum b/go.sum index 5c8f5d65d..7b7d49263 100644 --- a/go.sum +++ b/go.sum @@ -440,8 +440,8 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s= -sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= +sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= +sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg= sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From c0f644a40e20c6be80a22bf8bb553fbc61d19786 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Tue, 20 Feb 2024 21:23:25 +0100 Subject: [PATCH 086/192] K8SPS-314 - Fix chaos mesh cleanup (#564) Co-authored-by: Viacheslav Sarzhan --- e2e-tests/functions | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 003496d11..16f5c99bb 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -591,16 +591,25 @@ deploy_chaos_mesh() { destroy_chaos_mesh() { local chaos_mesh_ns=$(helm list --all-namespaces --filter chaos-mesh | tail -n1 | awk -F' ' '{print $2}' | sed 's/NAMESPACE//') - for i in $(kubectl api-resources | grep chaos-mesh | awk '{print $1}'); do timeout 30 kubectl delete ${i} --all --all-namespaces || :; done if [ -n "${chaos_mesh_ns}" ]; then - helm uninstall chaos-mesh --namespace ${chaos_mesh_ns} || : + helm uninstall --wait --timeout 60s chaos-mesh --namespace ${chaos_mesh_ns} || : fi - timeout 30 kubectl delete crd $(kubectl get crd | grep 'chaos-mesh.org' | awk '{print $1}') || : - timeout 30 kubectl delete clusterrolebinding $(kubectl get clusterrolebinding | grep 'chaos-mesh' | awk '{print $1}') || : - timeout 30 kubectl delete clusterrole $(kubectl get clusterrole | grep 'chaos-mesh' | awk '{print $1}') || : timeout 30 kubectl delete MutatingWebhookConfiguration $(kubectl get MutatingWebhookConfiguration | grep 'chaos-mesh' | awk '{print $1}') || : timeout 30 kubectl delete ValidatingWebhookConfiguration $(kubectl get ValidatingWebhookConfiguration | grep 'chaos-mesh' | awk '{print $1}') || : timeout 30 kubectl delete ValidatingWebhookConfiguration $(kubectl get ValidatingWebhookConfiguration | grep 'validate-auth' | awk '{print $1}') || : + for i in $(kubectl api-resources | grep chaos-mesh | awk '{print $1}'); do + kubectl get ${i} --all-namespaces --no-headers -o custom-columns=Kind:.kind,Name:.metadata.name,NAMESPACE:.metadata.namespace \ + | while read -r line; do + local kind=$(echo "$line" | awk '{print $1}') + local name=$(echo "$line" | awk '{print $2}') + local namespace=$(echo "$line" | awk '{print $3}') + kubectl patch $kind $name -n $namespace --type=merge -p '{"metadata":{"finalizers":[]}}' || : + done + timeout 30 kubectl delete ${i} --all --all-namespaces || : + done + timeout 30 kubectl delete crd $(kubectl get crd | grep 'chaos-mesh.org' | awk '{print $1}') || : + timeout 30 kubectl delete clusterrolebinding $(kubectl get clusterrolebinding | grep 'chaos-mesh' | awk '{print $1}') || : + timeout 30 kubectl delete clusterrole $(kubectl get clusterrole | grep 'chaos-mesh' | awk '{print $1}') || : } kill_pods() { From 07292a2f4f83d7583f608b2acefa8eb29c6139f0 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Wed, 21 Feb 2024 11:07:47 +0200 Subject: [PATCH 087/192] K8SPS-277: add `topologySpreadConstraints` (#549) https://perconadev.atlassian.net/browse/K8SPS-277 Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 64 +-- api/v1alpha1/zz_generated.deepcopy.go | 14 + ...percona.com_perconaservermysqlbackups.yaml | 52 +++ ...ercona.com_perconaservermysqlrestores.yaml | 52 +++ .../ps.percona.com_perconaservermysqls.yaml | 260 +++++++++++++ deploy/bundle.yaml | 364 ++++++++++++++++++ deploy/cr.yaml | 35 ++ deploy/crd.yaml | 364 ++++++++++++++++++ pkg/haproxy/haproxy.go | 7 +- pkg/mysql/mysql.go | 1 + pkg/orchestrator/orchestrator.go | 1 + pkg/router/router.go | 1 + pkg/xtrabackup/xtrabackup.go | 50 +-- 13 files changed, 1215 insertions(+), 50 deletions(-) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index da1b5b3e8..7f9cf70fd 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -145,13 +145,14 @@ type PodSpec struct { VolumeSpec *VolumeSpec `json:"volumeSpec,omitempty"` InitImage string `json:"initImage,omitempty"` - Affinity *PodAffinity `json:"affinity,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - PriorityClassName string `json:"priorityClassName,omitempty"` - TerminationGracePeriodSeconds *int64 `json:"gracePeriod,omitempty"` - SchedulerName string `json:"schedulerName,omitempty"` - RuntimeClassName *string `json:"runtimeClassName,omitempty"` + Affinity *PodAffinity `json:"affinity,omitempty"` + TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + PriorityClassName string `json:"priorityClassName,omitempty"` + TerminationGracePeriodSeconds *int64 `json:"gracePeriod,omitempty"` + SchedulerName string `json:"schedulerName,omitempty"` + RuntimeClassName *string `json:"runtimeClassName,omitempty"` PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` ServiceAccountName string `json:"serviceAccountName,omitempty"` @@ -204,23 +205,24 @@ const ( ) type BackupStorageSpec struct { - Type BackupStorageType `json:"type"` - Volume *VolumeSpec `json:"volumeSpec,omitempty"` - S3 *BackupStorageS3Spec `json:"s3,omitempty"` - GCS *BackupStorageGCSSpec `json:"gcs,omitempty"` - Azure *BackupStorageAzureSpec `json:"azure,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Resources corev1.ResourceRequirements `json:"resources,omitempty"` - Affinity *corev1.Affinity `json:"affinity,omitempty"` - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - SchedulerName string `json:"schedulerName,omitempty"` - PriorityClassName string `json:"priorityClassName,omitempty"` - PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` - ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` - RuntimeClassName *string `json:"runtimeClassName,omitempty"` - VerifyTLS *bool `json:"verifyTLS,omitempty"` + Type BackupStorageType `json:"type"` + Volume *VolumeSpec `json:"volumeSpec,omitempty"` + S3 *BackupStorageS3Spec `json:"s3,omitempty"` + GCS *BackupStorageGCSSpec `json:"gcs,omitempty"` + Azure *BackupStorageAzureSpec `json:"azure,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Resources corev1.ResourceRequirements `json:"resources,omitempty"` + Affinity *corev1.Affinity `json:"affinity,omitempty"` + TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + SchedulerName string `json:"schedulerName,omitempty"` + PriorityClassName string `json:"priorityClassName,omitempty"` + PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` + ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` + RuntimeClassName *string `json:"runtimeClassName,omitempty"` + VerifyTLS *bool `json:"verifyTLS,omitempty"` } type BackupStorageS3Spec struct { @@ -804,6 +806,20 @@ func (p *PodSpec) GetAffinity(labels map[string]string) *corev1.Affinity { return nil } +func (p *PodSpec) GetTopologySpreadConstraints(ls map[string]string) []corev1.TopologySpreadConstraint { + tscs := make([]corev1.TopologySpreadConstraint, 0) + + for _, tsc := range p.TopologySpreadConstraints { + if tsc.LabelSelector == nil && tsc.MatchLabelKeys == nil { + tsc.LabelSelector = &metav1.LabelSelector{ + MatchLabels: ls, + } + } + tscs = append(tscs, tsc) + } + return tscs +} + type AnnotationKey string const ( diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 44c8bb175..131c8121f 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -151,6 +151,13 @@ func (in *BackupStorageSpec) DeepCopyInto(out *BackupStorageSpec) { *out = new(corev1.Affinity) (*in).DeepCopyInto(*out) } + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]corev1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations *out = make([]corev1.Toleration, len(*in)) @@ -769,6 +776,13 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { *out = new(PodAffinity) (*in).DeepCopyInto(*out) } + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]corev1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector *out = make(map[string]string, len(*in)) diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml index 5788cd229..8350cba8e 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml @@ -714,6 +714,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml index b313cf284..b717a8a7f 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml @@ -698,6 +698,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: diff --git a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml index 34a5077eb..e4110bc34 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml @@ -816,6 +816,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -3392,6 +3444,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -4475,6 +4579,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -5671,6 +5827,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -6754,6 +6962,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index e94f4e46c..733250d7b 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -713,6 +713,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -1534,6 +1586,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -2488,6 +2592,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -5064,6 +5220,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -6147,6 +6355,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -7343,6 +7603,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -8426,6 +8738,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 10e19d6ab..6f73004fd 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -71,6 +71,13 @@ spec: # values: # - e2e-az1 # - e2e-az2 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # expose: # enabled: false @@ -207,6 +214,13 @@ spec: # values: # - e2e-az1 # - e2e-az2 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # expose: # type: ClusterIP @@ -245,6 +259,13 @@ spec: # values: # - e2e-az1 # - e2e-az2 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # configuration: | # [default] @@ -286,6 +307,13 @@ spec: # values: # - e2e-az1 # - e2e-az2 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # expose: # type: ClusterIP @@ -352,6 +380,13 @@ spec: # operator: In # values: # - 'True' +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # tolerations: # - key: "backupWorker" # operator: "Equal" diff --git a/deploy/crd.yaml b/deploy/crd.yaml index 5482ce331..a7fa0b489 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -713,6 +713,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -1534,6 +1586,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -2488,6 +2592,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: type: string verifyTLS: @@ -5064,6 +5220,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -6147,6 +6355,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -7343,6 +7603,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -8426,6 +8738,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: diff --git a/pkg/haproxy/haproxy.go b/pkg/haproxy/haproxy.go index 9af536637..700fb267e 100644 --- a/pkg/haproxy/haproxy.go +++ b/pkg/haproxy/haproxy.go @@ -170,9 +170,10 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash strin cr.Spec.Proxy.HAProxy.ContainerSecurityContext, ), }, - Containers: containers(cr, secret), - Affinity: cr.Spec.Proxy.HAProxy.GetAffinity(labels), - ImagePullSecrets: cr.Spec.Proxy.HAProxy.ImagePullSecrets, + Containers: containers(cr, secret), + Affinity: cr.Spec.Proxy.HAProxy.GetAffinity(labels), + TopologySpreadConstraints: cr.Spec.Proxy.HAProxy.GetTopologySpreadConstraints(labels), + ImagePullSecrets: cr.Spec.Proxy.HAProxy.ImagePullSecrets, // TerminationGracePeriodSeconds: 30, RestartPolicy: corev1.RestartPolicyAlways, SchedulerName: "default-scheduler", diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index c1bd8d130..5a9d77d19 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -162,6 +162,7 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash strin NodeSelector: cr.Spec.MySQL.NodeSelector, Tolerations: cr.Spec.MySQL.Tolerations, Affinity: spec.GetAffinity(labels), + TopologySpreadConstraints: spec.GetTopologySpreadConstraints(labels), ImagePullSecrets: spec.ImagePullSecrets, TerminationGracePeriodSeconds: spec.TerminationGracePeriodSeconds, PriorityClassName: spec.PriorityClassName, diff --git a/pkg/orchestrator/orchestrator.go b/pkg/orchestrator/orchestrator.go index 5b6e5d6f4..ff04b4664 100644 --- a/pkg/orchestrator/orchestrator.go +++ b/pkg/orchestrator/orchestrator.go @@ -143,6 +143,7 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage string) *appsv1.S Tolerations: cr.Spec.Orchestrator.Tolerations, Containers: containers(cr), Affinity: spec.GetAffinity(labels), + TopologySpreadConstraints: spec.GetTopologySpreadConstraints(labels), ImagePullSecrets: spec.ImagePullSecrets, TerminationGracePeriodSeconds: spec.TerminationGracePeriodSeconds, PriorityClassName: spec.PriorityClassName, diff --git a/pkg/router/router.go b/pkg/router/router.go index a2c55ee3d..2a3650b86 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -183,6 +183,7 @@ func Deployment(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash string NodeSelector: cr.Spec.Proxy.Router.NodeSelector, Tolerations: cr.Spec.Proxy.Router.Tolerations, Affinity: spec.GetAffinity(labels), + TopologySpreadConstraints: spec.GetTopologySpreadConstraints(labels), ImagePullSecrets: spec.ImagePullSecrets, TerminationGracePeriodSeconds: spec.TerminationGracePeriodSeconds, RestartPolicy: corev1.RestartPolicyAlways, diff --git a/pkg/xtrabackup/xtrabackup.go b/pkg/xtrabackup/xtrabackup.go index ab3713c78..1e6399fe5 100644 --- a/pkg/xtrabackup/xtrabackup.go +++ b/pkg/xtrabackup/xtrabackup.go @@ -107,14 +107,15 @@ func Job( Containers: []corev1.Container{ xtrabackupContainer(cluster, cr.Name, destination, storage), }, - SecurityContext: storage.PodSecurityContext, - Affinity: storage.Affinity, - Tolerations: storage.Tolerations, - NodeSelector: storage.NodeSelector, - SchedulerName: storage.SchedulerName, - PriorityClassName: storage.PriorityClassName, - RuntimeClassName: storage.RuntimeClassName, - DNSPolicy: corev1.DNSClusterFirst, + SecurityContext: storage.PodSecurityContext, + Affinity: storage.Affinity, + TopologySpreadConstraints: storage.TopologySpreadConstraints, + Tolerations: storage.Tolerations, + NodeSelector: storage.NodeSelector, + SchedulerName: storage.SchedulerName, + PriorityClassName: storage.PriorityClassName, + RuntimeClassName: storage.RuntimeClassName, + DNSPolicy: corev1.DNSClusterFirst, Volumes: []corev1.Volume{ { Name: apiv1alpha1.BinVolumeName, @@ -355,13 +356,14 @@ func RestoreJob( Containers: []corev1.Container{ restoreContainer(cluster, restore, destination, storage), }, - Affinity: storage.Affinity, - Tolerations: storage.Tolerations, - NodeSelector: storage.NodeSelector, - SchedulerName: storage.SchedulerName, - PriorityClassName: storage.PriorityClassName, - RuntimeClassName: storage.RuntimeClassName, - DNSPolicy: corev1.DNSClusterFirst, + Affinity: storage.Affinity, + TopologySpreadConstraints: storage.TopologySpreadConstraints, + Tolerations: storage.Tolerations, + NodeSelector: storage.NodeSelector, + SchedulerName: storage.SchedulerName, + PriorityClassName: storage.PriorityClassName, + RuntimeClassName: storage.RuntimeClassName, + DNSPolicy: corev1.DNSClusterFirst, Volumes: []corev1.Volume{ { Name: apiv1alpha1.BinVolumeName, @@ -432,14 +434,15 @@ func GetDeleteJob(cr *apiv1alpha1.PerconaServerMySQLBackup, conf *BackupConfig) Containers: []corev1.Container{ deleteContainer(cr.Status.Image, conf, storage), }, - SecurityContext: storage.PodSecurityContext, - Affinity: storage.Affinity, - Tolerations: storage.Tolerations, - NodeSelector: storage.NodeSelector, - SchedulerName: storage.SchedulerName, - PriorityClassName: storage.PriorityClassName, - RuntimeClassName: storage.RuntimeClassName, - DNSPolicy: corev1.DNSClusterFirst, + SecurityContext: storage.PodSecurityContext, + Affinity: storage.Affinity, + TopologySpreadConstraints: storage.TopologySpreadConstraints, + Tolerations: storage.Tolerations, + NodeSelector: storage.NodeSelector, + SchedulerName: storage.SchedulerName, + PriorityClassName: storage.PriorityClassName, + RuntimeClassName: storage.RuntimeClassName, + DNSPolicy: corev1.DNSClusterFirst, Volumes: []corev1.Volume{ { Name: apiv1alpha1.BinVolumeName, @@ -453,6 +456,7 @@ func GetDeleteJob(cr *apiv1alpha1.PerconaServerMySQLBackup, conf *BackupConfig) }, } } + func restoreContainer(cluster *apiv1alpha1.PerconaServerMySQL, restore *apiv1alpha1.PerconaServerMySQLRestore, destination string, storage *apiv1alpha1.BackupStorageSpec) corev1.Container { spec := cluster.Spec.Backup From 65bbed92e708ddcf4b74cf2affd440b56ae7d55c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:35:07 +0200 Subject: [PATCH 088/192] CLOUD-727: Bump k8s.io/client-go from 0.29.1 to 0.29.2 (#567) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.1 to 0.29.2. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.29.1...v0.29.2) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index a4decc8d1..9648b3408 100644 --- a/go.mod +++ b/go.mod @@ -23,9 +23,9 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/sync v0.6.0 google.golang.org/grpc v1.61.0 - k8s.io/api v0.29.1 - k8s.io/apimachinery v0.29.1 - k8s.io/client-go v0.29.1 + k8s.io/api v0.29.2 + k8s.io/apimachinery v0.29.2 + k8s.io/client-go v0.29.2 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.17.2 ) diff --git a/go.sum b/go.sum index 7b7d49263..3709874ce 100644 --- a/go.sum +++ b/go.sum @@ -424,14 +424,14 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= -k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ= +k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A= +k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0= k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= -k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc= -k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= -k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= -k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= +k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8= +k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= +k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= From 4168ca2080cf27e0fde0c49f785bc9acc595da48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:39:00 +0200 Subject: [PATCH 089/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.66 to 7.0.67 (#556) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.66 to 7.0.67. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.66...v7.0.67) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9648b3408..cc1f3721d 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/go-openapi/validate v0.23.0 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d - github.com/minio/minio-go/v7 v7.0.66 + github.com/minio/minio-go/v7 v7.0.67 github.com/onsi/ginkgo/v2 v2.15.0 github.com/onsi/gomega v1.31.1 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 3709874ce..33afb156a 100644 --- a/go.sum +++ b/go.sum @@ -170,8 +170,8 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvls github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.66 h1:bnTOXOHjOqv/gcMuiVbN9o2ngRItvqE774dG9nq0Dzw= -github.com/minio/minio-go/v7 v7.0.66/go.mod h1:DHAgmyQEGdW3Cif0UooKOyrT3Vxs82zNdV6tkKhRtbs= +github.com/minio/minio-go/v7 v7.0.67 h1:BeBvZWAS+kRJm1vGTMJYVjKUNoo0FoEt/wUWdUtfmh8= +github.com/minio/minio-go/v7 v7.0.67/go.mod h1:+UXocnUeZ3wHvVh5s95gcrA4YjMIbccT6ubB+1m054A= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= From c672cd730c366410d2b6e67e2ecee267672dfb32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:43:27 +0200 Subject: [PATCH 090/192] CLOUD-727: Bump go.uber.org/zap from 1.26.0 to 1.27.0 (#568) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.26.0 to 1.27.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/zap/compare/v1.26.0...v1.27.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cc1f3721d..caa5ad93b 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 golang.org/x/sync v0.6.0 google.golang.org/grpc v1.61.0 k8s.io/api v0.29.2 diff --git a/go.sum b/go.sum index 33afb156a..dcc2877d2 100644 --- a/go.sum +++ b/go.sum @@ -286,8 +286,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= From 83f5320a83ea4be6817c5edf6a4984011f45af01 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Mon, 26 Feb 2024 17:45:03 +0300 Subject: [PATCH 091/192] K8SPS-124 add backoffLimit (#565) * K8SPS-124 add backoffLimit * delete unsused * fix tabs and return backup example * update demand-backup test * update demand-backup test * fix indentation --------- Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 1 + api/v1alpha1/zz_generated.deepcopy.go | 5 +++++ .../crd/bases/ps.percona.com_perconaservermysqls.yaml | 3 +++ deploy/bundle.yaml | 3 +++ deploy/cr.yaml | 1 + deploy/crd.yaml | 3 +++ e2e-tests/tests/gr-demand-backup/02-assert.yaml | 7 ++++++- .../tests/gr-demand-backup/02-create-cluster.yaml | 1 + pkg/xtrabackup/xtrabackup.go | 11 ++++++++--- 9 files changed, 31 insertions(+), 4 deletions(-) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 7f9cf70fd..d57fc6745 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -188,6 +188,7 @@ type BackupSpec struct { ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` Storages map[string]*BackupStorageSpec `json:"storages,omitempty"` + BackoffLimit *int32 `json:"backoffLimit,omitempty"` } // Retrieves the initialization image for the backup. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 131c8121f..88ddcb5ce 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -58,6 +58,11 @@ func (in *BackupSpec) DeepCopyInto(out *BackupSpec) { (*out)[key] = outVal } } + if in.BackoffLimit != nil { + in, out := &in.BackoffLimit, &out.BackoffLimit + *out = new(int32) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec. diff --git a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml index e4110bc34..5289cd5b9 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml @@ -58,6 +58,9 @@ spec: type: boolean backup: properties: + backoffLimit: + format: int32 + type: integer containerSecurityContext: properties: allowPrivilegeEscalation: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 733250d7b..24cb14586 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -1834,6 +1834,9 @@ spec: type: boolean backup: properties: + backoffLimit: + format: int32 + type: integer containerSecurityContext: properties: allowPrivilegeEscalation: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 6f73004fd..6ff1c8c16 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -358,6 +358,7 @@ spec: backup: enabled: true image: perconalab/percona-server-mysql-operator:main-backup +# backoffLimit: 6 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.7.0 storages: diff --git a/deploy/crd.yaml b/deploy/crd.yaml index a7fa0b489..cb1b45bc3 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -1834,6 +1834,9 @@ spec: type: boolean backup: properties: + backoffLimit: + format: int32 + type: integer containerSecurityContext: properties: allowPrivilegeEscalation: diff --git a/e2e-tests/tests/gr-demand-backup/02-assert.yaml b/e2e-tests/tests/gr-demand-backup/02-assert.yaml index ce014534f..977da5b4b 100644 --- a/e2e-tests/tests/gr-demand-backup/02-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup/02-assert.yaml @@ -28,6 +28,10 @@ apiVersion: ps.percona.com/v1alpha1 kind: PerconaServerMySQL metadata: name: gr-demand-backup +spec: + allowUnsafeConfigurations: false + backup: + backoffLimit: 3 status: conditions: - message: InnoDB cluster successfully bootstrapped with 3 nodes @@ -42,4 +46,5 @@ status: ready: 3 size: 3 state: ready - state: ready \ No newline at end of file + state: ready + diff --git a/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml b/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml index 2f76185d5..27b4cf9ef 100644 --- a/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml +++ b/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml @@ -9,6 +9,7 @@ commands: source ../../functions get_cr \ + | yq eval '.spec.backup.backoffLimit=3' - \ | yq eval '.spec.backup.storages.minio.type="s3"' - \ | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ diff --git a/pkg/xtrabackup/xtrabackup.go b/pkg/xtrabackup/xtrabackup.go index 1e6399fe5..9b0b758a5 100644 --- a/pkg/xtrabackup/xtrabackup.go +++ b/pkg/xtrabackup/xtrabackup.go @@ -73,7 +73,10 @@ func Job( t := true labels := util.SSMapMerge(storage.Labels, MatchLabels(cluster)) - + backoffLimit := int32(10) + if cluster.Spec.Backup.BackoffLimit != nil { + backoffLimit = *cluster.Spec.Backup.BackoffLimit + } return &batchv1.Job{ TypeMeta: metav1.TypeMeta{ APIVersion: "batch/v1", @@ -86,8 +89,9 @@ func Job( Annotations: storage.Annotations, }, Spec: batchv1.JobSpec{ - Parallelism: &one, - Completions: &one, + Parallelism: &one, + Completions: &one, + BackoffLimit: &backoffLimit, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, @@ -398,6 +402,7 @@ func RestoreJob( }, }, }, + BackoffLimit: func(i int32) *int32 { return &i }(4), }, } } From 1a49d6e81657f9cd53c8fe3a77331112b7cb20ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:08:43 +0200 Subject: [PATCH 092/192] CLOUD-727: Bump google.golang.org/grpc from 1.61.0 to 1.62.0 (#573) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.61.0 to 1.62.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.61.0...v1.62.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index caa5ad93b..44b1bb36c 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.6.0 - google.golang.org/grpc v1.61.0 + google.golang.org/grpc v1.62.0 k8s.io/api v0.29.2 k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 @@ -118,7 +118,7 @@ require ( golang.org/x/tools v0.16.1 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index dcc2877d2..98a9e9f43 100644 --- a/go.sum +++ b/go.sum @@ -384,8 +384,8 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= -google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= @@ -395,8 +395,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= From fe1658040fce141422c4b3a21dab7bf8a98b9b18 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Tue, 27 Feb 2024 09:09:43 +0100 Subject: [PATCH 093/192] K8SPS-316: Read-only off for single-node cluster without Orchestrator (#562) * Set read_only=0 for single-node cluster without orc enabled. * Update read_only config. * Write correct config. * Add super_read_only. * Comment updated. * remove files * Set read_only if memory is nil. --------- Co-authored-by: Viacheslav Sarzhan --- pkg/controller/ps/controller.go | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index b9f189aee..7536108c9 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -473,6 +473,8 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLServices(ctx context.Contex return nil } +// reconcileMySQLAutoConfig reconciles the ConfigMap for MySQL auto-tuning parameters and +// sets read_only=0 for single-node clusters without Orchestrator func (r *PerconaServerMySQLReconciler) reconcileMySQLAutoConfig(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { log := logf.FromContext(ctx).WithName("reconcileMySQLAutoConfig") var memory *resource.Quantity @@ -491,11 +493,15 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLAutoConfig(ctx context.Cont Name: mysql.AutoConfigMapName(cr), Namespace: cr.Namespace, } + currentConfigMap := new(corev1.ConfigMap) if err = r.Client.Get(ctx, nn, currentConfigMap); client.IgnoreNotFound(err) != nil { return errors.Wrapf(err, "get ConfigMap/%s", nn.Name) } - if memory == nil { + + setWriteMode := cr.MySQLSpec().Size == 1 && !cr.Spec.Orchestrator.Enabled + + if memory == nil && !setWriteMode { exists := true if k8serrors.IsNotFound(err) { exists = false @@ -513,11 +519,23 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLAutoConfig(ctx context.Cont return nil } - autotuneParams, err := mysql.GetAutoTuneParams(cr, memory) - if err != nil { - return err + + config := "" + + // for single-node clusters, we need to set read_only=0 if orchestrator is disabled + if setWriteMode { + config = "\nsuper_read_only=0\nread_only=0" } - configMap := k8s.ConfigMap(mysql.AutoConfigMapName(cr), cr.Namespace, mysql.CustomConfigKey, autotuneParams) + + if memory != nil { + autotuneParams, err := mysql.GetAutoTuneParams(cr, memory) + if err != nil { + return err + } + config += autotuneParams + } + + configMap := k8s.ConfigMap(mysql.AutoConfigMapName(cr), cr.Namespace, mysql.CustomConfigKey, config) if !reflect.DeepEqual(currentConfigMap.Data, configMap.Data) { if err := k8s.EnsureObject(ctx, r.Client, cr, configMap, r.Scheme); err != nil { return errors.Wrapf(err, "ensure ConfigMap/%s", configMap.Name) From a0b35227ead19f5c875ff9f00b03d2d411f8c19c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:14:09 +0200 Subject: [PATCH 094/192] CLOUD-727: Bump github.com/cert-manager/cert-manager (#572) Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.13.3 to 1.14.3. - [Release notes](https://github.com/cert-manager/cert-manager/releases) - [Commits](https://github.com/cert-manager/cert-manager/compare/v1.13.3...v1.14.3) --- updated-dependencies: - dependency-name: github.com/cert-manager/cert-manager dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 20 ++++++++++---------- go.sum | 50 ++++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/go.mod b/go.mod index 44b1bb36c..cf9954ab0 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0 - github.com/cert-manager/cert-manager v1.13.3 + github.com/cert-manager/cert-manager v1.14.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 @@ -26,7 +26,7 @@ require ( k8s.io/api v0.29.2 k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b + k8s.io/utils v0.0.0-20240102154912-e7106e64919e sigs.k8s.io/controller-runtime v0.17.2 ) @@ -36,8 +36,8 @@ require ( github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + go.opentelemetry.io/otel/metric v1.21.0 // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect ) @@ -53,7 +53,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.8.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -74,7 +74,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/iancoleman/orderedmap v0.3.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.4 // indirect @@ -105,8 +105,8 @@ require ( go.mongodb.org/mongo-driver v1.13.1 // indirect go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.18.0 // indirect golang.org/x/net v0.20.0 // indirect @@ -127,8 +127,8 @@ require ( k8s.io/apiextensions-apiserver v0.29.0 // indirect k8s.io/component-base v0.29.0 // indirect k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - sigs.k8s.io/gateway-api v0.8.0 // indirect + k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 // indirect + sigs.k8s.io/gateway-api v1.0.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index 98a9e9f43..c94bd5765 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,4 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= @@ -27,8 +26,8 @@ github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8 github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cert-manager/cert-manager v1.13.3 h1:3R4G0RI7K0OkTZhWlVOC5SGZMYa2NwqmQJoyKydrz/M= -github.com/cert-manager/cert-manager v1.13.3/go.mod h1:BM2+Pt/NmSv1Zr25/MHv6BgIEF9IUxA1xAjp80qkxgc= +github.com/cert-manager/cert-manager v1.14.3 h1:u1TVd/bD4NnAFjttzOyZYV0iOcoMGGoNfrLvSdx7a70= +github.com/cert-manager/cert-manager v1.14.3/go.mod h1:pik7K6jXfgh++lfVJ/i1HzEnDluSUtTVLXSHikj8Lho= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -50,8 +49,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= @@ -136,8 +135,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHg github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -219,8 +218,8 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= @@ -270,14 +269,14 @@ go.nhat.io/matcher/v2 v2.0.0 h1:W+rbHi0hKuZHtOQH4U5g+KwyKyfVioIxrxjoGRcUETE= go.nhat.io/matcher/v2 v2.0.0/go.mod h1:cL5oYp0M9A4L8jEGqjmUfy+k7AXVDddoVt6aYIL1r5g= go.nhat.io/wait v0.1.0 h1:aQ4YDzaOgFbypiJ9c/eAfOIB1G25VOv7Gd2QS8uz1gw= go.nhat.io/wait v0.1.0/go.mod h1:+ijMghc9/9zXi+HDcs49HNReprvXOZha2Q3jTOtqJrE= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -296,8 +295,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -415,7 +414,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -436,14 +434,14 @@ k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 h1:avRdiaB03v88Mfvum2S3BBwkNuTlmuar4LlfO9Hajko= +k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022/go.mod h1:sIV51WBTkZrlGOJMCDZDA1IaPBUDTulPpD4y7oe038k= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= -sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg= -sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM= +sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= +sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= From 4e797945a00155c45a075c98bef3a7928471c177 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Tue, 27 Feb 2024 13:34:37 +0200 Subject: [PATCH 095/192] K8SPS-258: check if backup is running (#552) * K8SPS-258: check if backup is running https://perconadev.atlassian.net/browse/K8SPS-258 * compare destination * add unit-test --------- Co-authored-by: Viacheslav Sarzhan --- build/run-backup.sh | 6 +- cmd/manager/main.go | 10 +- cmd/sidecar/main.go | 67 +++++- pkg/controller/psbackup/controller.go | 262 +++++++++++---------- pkg/controller/psbackup/controller_test.go | 115 +++++++++ pkg/xtrabackup/sidecarclient.go | 96 ++++++++ 6 files changed, 425 insertions(+), 131 deletions(-) create mode 100644 pkg/xtrabackup/sidecarclient.go diff --git a/build/run-backup.sh b/build/run-backup.sh index 550a55d35..a4ec6932b 100755 --- a/build/run-backup.sh +++ b/build/run-backup.sh @@ -2,6 +2,8 @@ set -e +SIDECAR_PORT="6450" + request_data() { case "${STORAGE_TYPE}" in "s3") @@ -73,7 +75,7 @@ request_backup() { -d "$(request_data)" \ -H "Content-Type: application/json" \ -w "httpcode=%{http_code}" \ - "http://${SRC_NODE}:6033/backup/${BACKUP_NAME}" \ + "http://${SRC_NODE}:${SIDECAR_PORT}/backup/${BACKUP_NAME}" \ | sed -e 's/.*\httpcode=//' ) if [ "${http_code}" -eq 200 ]; then @@ -96,7 +98,7 @@ request_backup() { } request_logs() { - curl -s http://"${SRC_NODE}":6033/logs/"${BACKUP_NAME}" + curl -s http://"${SRC_NODE}":${SIDECAR_PORT}/logs/"${BACKUP_NAME}" } main() { diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 1bbf845d9..15eed38d6 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -48,6 +48,7 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/controller/psrestore" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/platform" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" //+kubebuilder:scaffold:imports ) @@ -162,10 +163,11 @@ func main() { os.Exit(1) } if err = (&psbackup.PerconaServerMySQLBackupReconciler{ - Client: nsClient, - Scheme: mgr.GetScheme(), - ServerVersion: serverVersion, - ClientCmd: cliCmd, + Client: nsClient, + Scheme: mgr.GetScheme(), + ServerVersion: serverVersion, + ClientCmd: cliCmd, + NewSidecarClient: xtrabackup.NewSidecarClient, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "PerconaServerMySQLBackup") os.Exit(1) diff --git a/cmd/sidecar/main.go b/cmd/sidecar/main.go index 171fd7976..f1fd79409 100644 --- a/cmd/sidecar/main.go +++ b/cmd/sidecar/main.go @@ -11,7 +11,9 @@ import ( "os/exec" "path/filepath" "regexp" + "strconv" "strings" + "sync" "sync/atomic" "golang.org/x/sync/errgroup" @@ -26,13 +28,18 @@ import ( xb "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" ) -var log = logf.Log.WithName("sidecar") -var sensitiveFlags = regexp.MustCompile("--password=(.*)|--.*-access-key=(.*)|--.*secret-key=(.*)") +var ( + log = logf.Log.WithName("sidecar") + sensitiveFlags = regexp.MustCompile("--password=(.*)|--.*-access-key=(.*)|--.*secret-key=(.*)") +) var status Status type Status struct { - isRunning atomic.Bool + isRunning atomic.Bool + currentBackupConf *xb.BackupConfig + + mu sync.Mutex } func (s *Status) TryRunBackup() bool { @@ -43,6 +50,25 @@ func (s *Status) DoneBackup() { s.isRunning.Store(false) } +func (s *Status) SetBackupConfig(conf xb.BackupConfig) { + s.mu.Lock() + s.currentBackupConf = &conf + s.mu.Unlock() +} + +func (s *Status) RemoveBackupConfig() { + s.mu.Lock() + s.currentBackupConf = nil + s.mu.Unlock() +} + +func (s *Status) GetBackupConfig() *xb.BackupConfig { + s.mu.Lock() + cfg := *s.currentBackupConf + s.mu.Unlock() + return &cfg +} + func main() { opts := zap.Options{Development: true} logf.SetLogger(zap.New(zap.UseFlagOptions(&opts))) @@ -56,7 +82,7 @@ func main() { mux.HandleFunc("/logs/", logHandler) log.Info("starting http server") - log.Error(http.ListenAndServe(":6033", mux), "http server failed") + log.Error(http.ListenAndServe(":"+strconv.Itoa(mysql.SidecarHTTPPort), mux), "http server failed") } func getSecret(username apiv1alpha1.SystemUser) (string, error) { @@ -102,6 +128,8 @@ func xtrabackupArgs(user, pass string) []string { func backupHandler(w http.ResponseWriter, req *http.Request) { switch req.Method { + case http.MethodGet: + getBackupHandler(w, req) case http.MethodPost: createBackupHandler(w, req) case http.MethodDelete: @@ -111,6 +139,29 @@ func backupHandler(w http.ResponseWriter, req *http.Request) { } } +func getBackupHandler(w http.ResponseWriter, req *http.Request) { + defer req.Body.Close() + + if !status.isRunning.Load() { + http.Error(w, "backup is not running", http.StatusNotFound) + return + } + + data, err := json.Marshal(status.GetBackupConfig()) + if err != nil { + log.Error(err, "failed to marshal data") + http.Error(w, "backup failed", http.StatusInternalServerError) + return + } + + _, err = w.Write(data) + if err != nil { + log.Error(err, "failed to write data") + http.Error(w, "backup failed", http.StatusInternalServerError) + return + } +} + func deleteBackupHandler(w http.ResponseWriter, req *http.Request) { ns, err := getNamespace() if err != nil { @@ -154,7 +205,7 @@ func deleteBackupHandler(w http.ResponseWriter, req *http.Request) { func deleteBackup(ctx context.Context, cfg *xtrabackup.BackupConfig, backupName string) error { logWriter := io.Writer(os.Stderr) if backupName != "" { - backupLog, err := os.OpenFile(filepath.Join(mysql.BackupLogDir, backupName+".log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) + backupLog, err := os.OpenFile(filepath.Join(mysql.BackupLogDir, backupName+".log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o666) if err != nil { return errors.Wrap(err, "failed to open log file") } @@ -237,6 +288,7 @@ func createBackupHandler(w http.ResponseWriter, req *http.Request) { return } defer status.DoneBackup() + ns, err := getNamespace() if err != nil { log.Error(err, "failed to detect namespace") @@ -266,6 +318,11 @@ func createBackupHandler(w http.ResponseWriter, req *http.Request) { http.Error(w, "backup failed", http.StatusBadRequest) return } + + status.SetBackupConfig(backupConf) + defer func() { + status.RemoveBackupConfig() + }() log.V(1).Info("Checking if backup exists") exists, err := backupExists(req.Context(), &backupConf) if err != nil { diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index 5158c6104..74daaceca 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -17,13 +17,8 @@ limitations under the License. package psbackup import ( - "bytes" "context" - "encoding/json" "fmt" - "io" - "net/http" - "net/url" "path" "time" @@ -54,6 +49,8 @@ type PerconaServerMySQLBackupReconciler struct { Scheme *runtime.Scheme ServerVersion *platform.ServerVersion ClientCmd clientcmd.Client + + NewSidecarClient xtrabackup.NewSidecarClientFunc } //+kubebuilder:rbac:groups=ps.percona.com,resources=perconaservermysqlbackups;perconaservermysqlbackups/status;perconaservermysqlbackups/finalizers,verbs=get;list;watch;create;update;patch;delete @@ -165,134 +162,180 @@ func (r *PerconaServerMySQLBackupReconciler) Reconcile(ctx context.Context, req if k8serrors.IsNotFound(err) { log.Info("Creating backup job", "jobName", nn.Name) - initImage, err := k8s.InitImage(ctx, r.Client, cluster, cluster.Spec.Backup) - if err != nil { - return rr, errors.Wrap(err, "get operator image") + if err := r.createBackupJob(ctx, cr, cluster, storage, &status); err != nil { + return rr, errors.Wrap(err, "failed to create backup job") } - destination := getDestination(storage, cr.Spec.ClusterName, cr.CreationTimestamp.Format("2006-01-02-15:04:05")) - job := xtrabackup.Job(cluster, cr, destination, initImage, storage) + return rr, nil + } - switch storage.Type { - case apiv1alpha1.BackupStorageS3: - if storage.S3 == nil { - return rr, errors.New("s3 stanza is required in storage") - } + for _, cond := range job.Status.Conditions { + if cond.Status != corev1.ConditionTrue { + continue + } - nn := types.NamespacedName{Name: storage.S3.CredentialsSecret, Namespace: cr.Namespace} - exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) - if err != nil { - return rr, errors.Wrapf(err, "check %s exists", nn) - } + switch cond.Type { + case batchv1.JobFailed: + status.State = apiv1alpha1.BackupFailed + case batchv1.JobComplete: + status.State = apiv1alpha1.BackupSucceeded + } - if !exists { - return rr, errors.Errorf("secret %s not found", nn) - } + status.CompletedAt = job.Status.CompletionTime + } - if err := xtrabackup.SetStorageS3(job, storage.S3); err != nil { - return rr, errors.Wrap(err, "set storage S3") - } + switch status.State { + case apiv1alpha1.BackupStarting: + if job.Status.Active == 0 { + return rr, nil + } - status.Destination = fmt.Sprintf("s3://%s/%s", storage.S3.Bucket, destination) - case apiv1alpha1.BackupStorageGCS: - if storage.GCS == nil { - return rr, errors.New("gcs stanza is required in storage") - } + running, err := r.isBackupJobRunning(ctx, job) + if err != nil { + return rr, errors.Wrap(err, "check if backup job is running") + } - nn := types.NamespacedName{Name: storage.GCS.CredentialsSecret, Namespace: cr.Namespace} - exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) - if err != nil { - return rr, errors.Wrapf(err, "check %s exists", nn) - } + if running { + status.State = apiv1alpha1.BackupRunning + } + case apiv1alpha1.BackupRunning: + if job.Status.Active > 0 { + return rr, nil + } + case apiv1alpha1.BackupFailed, apiv1alpha1.BackupSucceeded: + return rr, nil + default: + status.State = apiv1alpha1.BackupStarting + status.StateDesc = "" + } - if !exists { - return rr, errors.Errorf("secret %s not found", nn) - } + return rr, nil +} - if err := xtrabackup.SetStorageGCS(job, storage.GCS); err != nil { - return rr, errors.Wrap(err, "set storage GCS") - } +func (r *PerconaServerMySQLBackupReconciler) isBackupJobRunning(ctx context.Context, job *batchv1.Job) (bool, error) { + if len(job.Spec.Template.Spec.Containers) == 0 { + return false, nil + } - status.Destination = fmt.Sprintf("gs://%s/%s", storage.GCS.Bucket, destination) - case apiv1alpha1.BackupStorageAzure: - if storage.Azure == nil { - return rr, errors.New("azure stanza is required in storage") - } + srcNode := "" + destination := "" + for _, env := range job.Spec.Template.Spec.Containers[0].Env { + switch env.Name { + case "SRC_NODE": + srcNode = env.Value + case "BACKUP_DEST": + destination = env.Value + } + } - nn := types.NamespacedName{Name: storage.Azure.CredentialsSecret, Namespace: cr.Namespace} - exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) - if err != nil { - return rr, errors.Wrapf(err, "check %s exists", nn) - } + sc := r.NewSidecarClient(srcNode) + cfg, err := sc.GetRunningBackupConfig(ctx) + if err != nil { + return false, errors.Wrap(err, "get running backup config") + } - if !exists { - return rr, errors.Errorf("secret %s not found", nn) - } + if cfg == nil || cfg.Destination != destination { + return false, nil + } - if err := xtrabackup.SetStorageAzure(job, storage.Azure); err != nil { - return rr, errors.Wrap(err, "set storage Azure") - } + return true, nil +} - status.Destination = fmt.Sprintf("%s/%s", storage.Azure.ContainerName, destination) - default: - return rr, errors.Errorf("storage type %s is not supported", storage.Type) - } +func (r *PerconaServerMySQLBackupReconciler) createBackupJob(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQLBackup, cluster *apiv1alpha1.PerconaServerMySQL, storage *apiv1alpha1.BackupStorageSpec, status *apiv1alpha1.PerconaServerMySQLBackupStatus) error { + initImage, err := k8s.InitImage(ctx, r.Client, cluster, cluster.Spec.Backup) + if err != nil { + return errors.Wrap(err, "get operator image") + } - status.Image = cluster.Spec.Backup.Image - status.Storage = storage + destination := getDestination(storage, cr.Spec.ClusterName, cr.CreationTimestamp.Format("2006-01-02-15:04:05")) + job := xtrabackup.Job(cluster, cr, destination, initImage, storage) - src, err := r.getBackupSource(ctx, cluster) + switch storage.Type { + case apiv1alpha1.BackupStorageS3: + if storage.S3 == nil { + return errors.New("s3 stanza is required in storage") + } + + nn := types.NamespacedName{Name: storage.S3.CredentialsSecret, Namespace: cr.Namespace} + exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) if err != nil { - return rr, errors.Wrap(err, "get backup source node") + return errors.Wrapf(err, "check %s exists", nn) } - if err := xtrabackup.SetSourceNode(job, src); err != nil { - return rr, errors.Wrap(err, "set backup source node") + if !exists { + return errors.Errorf("secret %s not found", nn) } - if err := controllerutil.SetControllerReference(cr, job, r.Scheme); err != nil { - return rr, errors.Wrapf(err, "set controller reference to Job %s/%s", job.Namespace, job.Name) + if err := xtrabackup.SetStorageS3(job, storage.S3); err != nil { + return errors.Wrap(err, "set storage S3") } - if err := r.Client.Create(ctx, job); err != nil { - return rr, errors.Wrapf(err, "create job %s/%s", job.Namespace, job.Name) + status.Destination = fmt.Sprintf("s3://%s/%s", storage.S3.Bucket, destination) + case apiv1alpha1.BackupStorageGCS: + if storage.GCS == nil { + return errors.New("gcs stanza is required in storage") } - return rr, nil - } + nn := types.NamespacedName{Name: storage.GCS.CredentialsSecret, Namespace: cr.Namespace} + exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) + if err != nil { + return errors.Wrapf(err, "check %s exists", nn) + } - switch status.State { - case apiv1alpha1.BackupStarting: - if job.Status.Active > 0 { - status.State = apiv1alpha1.BackupRunning + if !exists { + return errors.Errorf("secret %s not found", nn) } - case apiv1alpha1.BackupRunning: - if job.Status.Active > 0 { - return rr, nil + + if err := xtrabackup.SetStorageGCS(job, storage.GCS); err != nil { + return errors.Wrap(err, "set storage GCS") } - for _, cond := range job.Status.Conditions { - if cond.Status != corev1.ConditionTrue { - continue - } + status.Destination = fmt.Sprintf("gs://%s/%s", storage.GCS.Bucket, destination) + case apiv1alpha1.BackupStorageAzure: + if storage.Azure == nil { + return errors.New("azure stanza is required in storage") + } - switch cond.Type { - case batchv1.JobFailed: - status.State = apiv1alpha1.BackupFailed - case batchv1.JobComplete: - status.State = apiv1alpha1.BackupSucceeded - } + nn := types.NamespacedName{Name: storage.Azure.CredentialsSecret, Namespace: cr.Namespace} + exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) + if err != nil { + return errors.Wrapf(err, "check %s exists", nn) + } - status.CompletedAt = job.Status.CompletionTime + if !exists { + return errors.Errorf("secret %s not found", nn) } - case apiv1alpha1.BackupFailed, apiv1alpha1.BackupSucceeded: - return rr, nil + + if err := xtrabackup.SetStorageAzure(job, storage.Azure); err != nil { + return errors.Wrap(err, "set storage Azure") + } + + status.Destination = fmt.Sprintf("%s/%s", storage.Azure.ContainerName, destination) default: - status.State = apiv1alpha1.BackupStarting - status.StateDesc = "" + return errors.Errorf("storage type %s is not supported", storage.Type) } - return rr, nil + status.Image = cluster.Spec.Backup.Image + status.Storage = storage + + src, err := r.getBackupSource(ctx, cluster) + if err != nil { + return errors.Wrap(err, "get backup source node") + } + + if err := xtrabackup.SetSourceNode(job, src); err != nil { + return errors.Wrap(err, "set backup source node") + } + + if err := controllerutil.SetControllerReference(cr, job, r.Scheme); err != nil { + return errors.Wrapf(err, "set controller reference to Job %s/%s", job.Namespace, job.Name) + } + + if err := r.Client.Create(ctx, job); err != nil { + return errors.Wrapf(err, "create job %s/%s", job.Namespace, job.Name) + } + + return nil } func getDestination(storage *apiv1alpha1.BackupStorageSpec, clusterName, creationTimeStamp string) string { @@ -507,34 +550,13 @@ func (r *PerconaServerMySQLBackupReconciler) deleteBackup(ctx context.Context, c } return complete, nil } - data, err := json.Marshal(backupConf) - if err != nil { - return false, errors.Wrap(err, "marshal sidecar backup config") - } src, err := r.getBackupSource(ctx, cluster) if err != nil { return false, errors.Wrap(err, "get backup source node") } - sidecarURL := url.URL{ - Host: src + ":6450", - Scheme: "http", - Path: "/backup/" + cr.Name, - } - req, err := http.NewRequestWithContext(ctx, http.MethodDelete, sidecarURL.String(), bytes.NewReader(data)) - if err != nil { - return false, errors.Wrap(err, "create http request") - } - resp, err := http.DefaultClient.Do(req) - if err != nil { + sc := r.NewSidecarClient(src) + if err := sc.DeleteBackup(ctx, cr.Name, *backupConf); err != nil { return false, errors.Wrap(err, "delete backup") } - defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - body, err := io.ReadAll(resp.Body) - if err != nil { - return false, errors.Wrap(err, "read response body") - } - return false, errors.Errorf("delete backup failed: %s", string(body)) - } return true, nil } diff --git a/pkg/controller/psbackup/controller_test.go b/pkg/controller/psbackup/controller_test.go index 42e579035..6838fd1f0 100644 --- a/pkg/controller/psbackup/controller_test.go +++ b/pkg/controller/psbackup/controller_test.go @@ -304,6 +304,121 @@ func TestCheckFinalizers(t *testing.T) { } } +func TestRunningState(t *testing.T) { + ctx := context.Background() + scheme := runtime.NewScheme() + if err := clientgoscheme.AddToScheme(scheme); err != nil { + t.Fatal(err, "failed to add client-go scheme") + } + if err := apiv1alpha1.AddToScheme(scheme); err != nil { + t.Fatal(err, "failed to add apis scheme") + } + namespace := "some-namespace" + + cr, err := readDefaultCRBackup("some-name", namespace) + if err != nil { + t.Fatal(err, "failed to read default backup") + } + cr.Status.State = apiv1alpha1.BackupStarting + cr.Spec.StorageName = "s3-us-west" + cluster, err := readDefaultCR("cluster1", namespace) + if err != nil { + t.Fatal(err, "failed to read default cr") + } + cluster.Status.MySQL.State = apiv1alpha1.StateReady + tests := []struct { + name string + cr *apiv1alpha1.PerconaServerMySQLBackup + cluster *apiv1alpha1.PerconaServerMySQL + sidecarClient *fakeSidecarClient + state apiv1alpha1.BackupState + }{ + { + name: "not running", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + state: apiv1alpha1.BackupStarting, + sidecarClient: &fakeSidecarClient{}, + }, + { + name: "other backup is running", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + state: apiv1alpha1.BackupStarting, + sidecarClient: &fakeSidecarClient{ + destination: "other-dest", + }, + }, + { + name: "running", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + state: apiv1alpha1.BackupRunning, + sidecarClient: &fakeSidecarClient{ + destination: "dest", + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + storage, ok := tt.cluster.Spec.Backup.Storages["s3-us-west"] + if !ok { + t.Fatal("storage not found") + } + job := xtrabackup.Job(tt.cluster, tt.cr, "dest", "init-image", storage) + job.Status.Active = 1 + cb := fake.NewClientBuilder().WithScheme(scheme).WithObjects(tt.cr, tt.cluster, job).WithStatusSubresource(tt.cr, tt.cluster, job) + + r := PerconaServerMySQLBackupReconciler{ + Client: cb.Build(), + Scheme: scheme, + ServerVersion: &platform.ServerVersion{Platform: platform.PlatformKubernetes}, + NewSidecarClient: func(srcNode string) xtrabackup.SidecarClient { + return tt.sidecarClient + }, + } + _, err := r.Reconcile(ctx, controllerruntime.Request{ + NamespacedName: types.NamespacedName{ + Name: tt.cr.Name, + Namespace: tt.cr.Namespace, + }, + }) + if err != nil { + t.Fatal(err, "failed to reconcile") + } + cr := &apiv1alpha1.PerconaServerMySQLBackup{} + err = r.Get(ctx, types.NamespacedName{ + Name: tt.cr.Name, + Namespace: tt.cr.Namespace, + }, cr) + if err != nil { + t.Fatal(err, "failed to get backup") + } + if cr.Status.State != tt.state { + t.Fatalf("expected state %s, got %s", apiv1alpha1.RestoreError, cr.Status.State) + } + }) + } +} + +type fakeSidecarClient struct { + destination string +} + +func (f *fakeSidecarClient) GetRunningBackupConfig(ctx context.Context) (*xtrabackup.BackupConfig, error) { + if f.destination == "" { + return nil, nil + } + return &xtrabackup.BackupConfig{ + Destination: f.destination, + }, nil +} + +func (f *fakeSidecarClient) DeleteBackup(ctx context.Context, name string, cfg xtrabackup.BackupConfig) error { + return nil +} + func readDefaultCR(name, namespace string) (*apiv1alpha1.PerconaServerMySQL, error) { data, err := os.ReadFile(filepath.Join("..", "..", "..", "deploy", "cr.yaml")) if err != nil { diff --git a/pkg/xtrabackup/sidecarclient.go b/pkg/xtrabackup/sidecarclient.go new file mode 100644 index 000000000..87b7528bc --- /dev/null +++ b/pkg/xtrabackup/sidecarclient.go @@ -0,0 +1,96 @@ +package xtrabackup + +import ( + "bytes" + "context" + "encoding/json" + "io" + "net/http" + "net/url" + "strconv" + + "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/pkg/errors" +) + +type SidecarClient interface { + GetRunningBackupConfig(ctx context.Context) (*BackupConfig, error) + DeleteBackup(ctx context.Context, name string, cfg BackupConfig) error +} + +type NewSidecarClientFunc func(srcNode string) SidecarClient + +type sidecarClient struct { + srcNode string +} + +func NewSidecarClient(srcNode string) SidecarClient { + return &sidecarClient{srcNode: srcNode} +} + +func (c *sidecarClient) port() string { + return strconv.Itoa(mysql.SidecarHTTPPort) +} + +func (c *sidecarClient) GetRunningBackupConfig(ctx context.Context) (*BackupConfig, error) { + sidecarURL := url.URL{ + Host: c.srcNode + ":" + c.port(), + Scheme: "http", + Path: "/backup/", + } + req, err := http.NewRequestWithContext(ctx, http.MethodGet, sidecarURL.String(), nil) + if err != nil { + return nil, errors.Wrap(err, "create http request") + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return nil, errors.Wrap(err, "get backup") + } + defer resp.Body.Close() + + data, err := io.ReadAll(resp.Body) + if err != nil { + return nil, errors.Wrap(err, "read response body") + } + if resp.StatusCode != http.StatusOK { + if resp.StatusCode == http.StatusNotFound { + return nil, nil + } + return nil, errors.Errorf("get backup failed: %s %d", string(data), resp.StatusCode) + } + + backupConf := new(BackupConfig) + if err := json.Unmarshal(data, backupConf); err != nil { + return nil, errors.Wrap(err, "failed to unmarshal") + } + return backupConf, nil +} + +func (c *sidecarClient) DeleteBackup(ctx context.Context, name string, cfg BackupConfig) error { + sidecarURL := url.URL{ + Host: c.srcNode + ":" + c.port(), + Scheme: "http", + Path: "/backup/" + name, + } + data, err := json.Marshal(cfg) + if err != nil { + return errors.Wrap(err, "marshal backup config") + } + req, err := http.NewRequestWithContext(ctx, http.MethodDelete, sidecarURL.String(), bytes.NewReader(data)) + if err != nil { + return errors.Wrap(err, "create http request") + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return errors.Wrap(err, "delete backup") + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + body, err := io.ReadAll(resp.Body) + if err != nil { + return errors.Wrap(err, "read response body") + } + return errors.Errorf("delete backup failed: %s", string(body)) + } + return nil +} From 6f21b6d7c59d7cc19471d808dc094a6ad2627d1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:08:21 +0200 Subject: [PATCH 096/192] CLOUD-727: Bump github.com/go-openapi/strfmt from 0.22.0 to 0.22.1 (#574) Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.22.0 to 0.22.1. - [Commits](https://github.com/go-openapi/strfmt/compare/v0.22.0...v0.22.1) --- updated-dependencies: - dependency-name: github.com/go-openapi/strfmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 21 ++++----------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index cf9954ab0..7490cf9eb 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.0 github.com/go-openapi/runtime v0.27.1 - github.com/go-openapi/strfmt v0.22.0 + github.com/go-openapi/strfmt v0.22.1 github.com/go-openapi/swag v0.22.9 github.com/go-openapi/validate v0.23.0 github.com/go-sql-driver/mysql v1.7.1 @@ -102,7 +102,7 @@ require ( github.com/swaggest/assertjson v1.9.0 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect - go.mongodb.org/mongo-driver v1.13.1 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect go.opentelemetry.io/otel v1.21.0 // indirect diff --git a/go.sum b/go.sum index c94bd5765..a86944d7c 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqv github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= -github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= +github.com/go-openapi/strfmt v0.22.1 h1:5Ky8cybT4576C6Ffc+8gYji/wRXCo6Ozm8RaWjPI6jc= +github.com/go-openapi/strfmt v0.22.1/go.mod h1:OfVoytIXJasDkkGvkb1Cceb3BPyMOwk1FgmyyEw7NYg= github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-openapi/validate v0.23.0 h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw= @@ -109,11 +109,9 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -143,7 +141,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -182,7 +179,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= @@ -246,10 +242,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= @@ -259,8 +251,8 @@ github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= -go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= +go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= +go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.nhat.io/aferomock v0.4.0 h1:gs3nJzIqAezglUuaPfautAmZwulwRWLcfSSzdK4YCC0= go.nhat.io/aferomock v0.4.0/go.mod h1:msi5MDOtJ/AroUa/lDc3jVGOILM4SKP//4yBRImOvkI= go.nhat.io/grpcmock v0.25.0 h1:zk03vvA60w7UrnurZbqL4wxnjmJz1Kuyb7ig2MF+n4c= @@ -291,7 +283,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -313,7 +304,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= @@ -335,7 +325,6 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -350,10 +339,8 @@ golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= From 6f9d31ad6f4750dde5c537a76eac1e51bfd5a362 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:19:32 +0200 Subject: [PATCH 097/192] CLOUD-727: Bump golangci/golangci-lint-action from 3 to 4 (#575) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/reviewdog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 9544c0adf..f08ceabc6 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -10,7 +10,7 @@ jobs: go-version: '^1.20' - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: latest only-new-issues: true From b31183e700f9d200e540e27a815ecdeadb174de3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:20:10 +0200 Subject: [PATCH 098/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.16.1 to 0.18.0 (#576) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.1 to 0.18.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.16.1...0.18.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 83bd5c4ac..487b97931 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -14,7 +14,7 @@ jobs: export DOCKER_SQUASH=0 ./e2e-tests/build - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.16.1 + uses: aquasecurity/trivy-action@0.18.0 with: image-ref: 'docker.io/perconalab/percona-server-mysql-operator:${{ github.sha }}' format: 'table' From 4195773240bf8489b425be94a334a517b6257006 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 1 Mar 2024 14:07:34 +0100 Subject: [PATCH 099/192] K8SPS-331 - Add chainsaw binary into Jenkinsfile (#577) --- Jenkinsfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ee2f8c8d4..9b82b2dfa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -203,7 +203,11 @@ void runTest(Integer TEST_ID) { export KUBECONFIG=/tmp/$CLUSTER_NAME-$clusterSuffix export PATH="\${KREW_ROOT:-\$HOME/.krew}/bin:\$PATH" set -o pipefail - kubectl kuttl test --config ./e2e-tests/kuttl.yaml --test "^${testName}\$" |& tee e2e-tests/logs/${testName}.log + if [ -f ./e2e-tests/kuttl.yaml ]; then + kubectl kuttl test --config ./e2e-tests/kuttl.yaml --test "^${testName}\$" |& tee e2e-tests/logs/${testName}.log + else + chainsaw test "./e2e-tests/tests/${testName}" |& tee e2e-tests/logs/${testName}.log + fi """ } pushArtifactFile("${env.GIT_BRANCH}-${env.GIT_SHORT_COMMIT}-$testName") @@ -252,6 +256,9 @@ void prepareNode() { kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/a67f31ecb2e62f15149ca66d096357050f07b77d/plugins/kuttl.yaml echo \$(kubectl kuttl --version) is installed + curl -fsSL https://github.com/kyverno/chainsaw/releases/download/v0.1.7/chainsaw_linux_amd64.tar.gz | sudo tar -C /usr/local/bin -xzf - chainsaw + echo \$(chainsaw version) is installed + sudo tee /etc/yum.repos.d/google-cloud-sdk.repo << EOF [google-cloud-cli] name=Google Cloud CLI From 5c27a82962fa560584916857a03ec73133ffbe24 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Fri, 1 Mar 2024 15:45:48 +0200 Subject: [PATCH 100/192] K8SPS-275: validate before starting restore (#571) * K8SPS-275: validate before starting restore https://perconadev.atlassian.net/browse/K8SPS-275 * fix unit-tests * fix * improvements * generate * Revert "generate" This reverts commit 149c3f3b55f5162b7d5c905e34588f5bf01c50bd. --------- Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 53 ++- .../perconaservermysqlbackup_types.go | 78 +++- cmd/manager/main.go | 8 +- cmd/sidecar/main.go | 24 +- cmd/sidecar/storage.go | 160 ------- pkg/controller/psbackup/controller.go | 45 +- pkg/controller/psbackup/controller_test.go | 8 +- pkg/controller/psrestore/controller.go | 178 +++----- pkg/controller/psrestore/controller_test.go | 397 ++++++++++++++++-- pkg/controller/psrestore/helpers_test.go | 153 +++++++ pkg/controller/psrestore/restorer.go | 299 +++++++++++++ pkg/xtrabackup/storage/fake/storage.go | 44 ++ pkg/xtrabackup/storage/options.go | 228 ++++++++++ pkg/xtrabackup/storage/storage.go | 293 +++++++++++++ pkg/xtrabackup/xtrabackup.go | 28 +- 15 files changed, 1619 insertions(+), 377 deletions(-) delete mode 100644 cmd/sidecar/storage.go create mode 100644 pkg/controller/psrestore/helpers_test.go create mode 100644 pkg/controller/psrestore/restorer.go create mode 100644 pkg/xtrabackup/storage/fake/storage.go create mode 100644 pkg/xtrabackup/storage/options.go create mode 100644 pkg/xtrabackup/storage/storage.go diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index d57fc6745..687157442 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "hash/fnv" + "path" "regexp" "strings" @@ -235,17 +236,33 @@ type BackupStorageS3Spec struct { StorageClass string `json:"storageClass,omitempty"` } +// BucketAndPrefix returns bucket name and backup prefix from Bucket concatenated with Prefix. +// BackupStorageS3Spec.Bucket can contain backup path in format `/`. +func (b *BackupStorageS3Spec) BucketAndPrefix() (string, string) { + bucket := b.Bucket.bucket() + prefix := b.Bucket.prefix() + if b.Prefix != "" { + prefix = path.Join(prefix, b.Prefix) + } + if prefix != "" { + prefix = strings.TrimSuffix(prefix, "/") + prefix += "/" + } + + return bucket, prefix +} + // BucketWithPrefix contains a bucket name with or without a prefix in a format / type BucketWithPrefix string // Extracts the bucket name from a combined bucket with prefix string. -func (b BucketWithPrefix) Bucket() string { +func (b BucketWithPrefix) bucket() string { bucket, _, _ := strings.Cut(string(b), "/") return bucket } // Extracts the prefix from a combined bucket with prefix string. -func (b BucketWithPrefix) Prefix() string { +func (b BucketWithPrefix) prefix() string { _, prefix, _ := strings.Cut(string(b), "/") return prefix } @@ -260,6 +277,22 @@ type BackupStorageGCSSpec struct { StorageClass string `json:"storageClass,omitempty"` } +// BucketAndPrefix returns bucket name and backup prefix from Bucket concatenated with Prefix. +// BackupStorageGCSSpec.Bucket can contain backup path in format `/`. +func (b *BackupStorageGCSSpec) BucketAndPrefix() (string, string) { + bucket := b.Bucket.bucket() + prefix := b.Bucket.prefix() + if b.Prefix != "" { + prefix = path.Join(prefix, b.Prefix) + } + if prefix != "" { + prefix = strings.TrimSuffix(prefix, "/") + prefix += "/" + } + + return bucket, prefix +} + type BackupStorageAzureSpec struct { // A container name is a valid DNS name that conforms to the Azure naming rules. ContainerName BucketWithPrefix `json:"containerName"` @@ -277,6 +310,22 @@ type BackupStorageAzureSpec struct { StorageClass string `json:"storageClass,omitempty"` } +// ContainerAndPrefix returns container name from ContainerName and backup prefix from ContainerName concatenated with Prefix. +// BackupStorageAzureSpec.ContainerName can contain backup path in format `/`. +func (b *BackupStorageAzureSpec) ContainerAndPrefix() (string, string) { + container := b.ContainerName.bucket() + prefix := b.ContainerName.prefix() + if b.Prefix != "" { + prefix = path.Join(prefix, b.Prefix) + } + if prefix != "" { + prefix = strings.TrimSuffix(prefix, "/") + prefix += "/" + } + + return container, prefix +} + type ProxySpec struct { Router *MySQLRouterSpec `json:"router,omitempty"` HAProxy *HAProxySpec `json:"haproxy,omitempty"` diff --git a/api/v1alpha1/perconaservermysqlbackup_types.go b/api/v1alpha1/perconaservermysqlbackup_types.go index 31b1fa706..8dbc97bf4 100644 --- a/api/v1alpha1/perconaservermysqlbackup_types.go +++ b/api/v1alpha1/perconaservermysqlbackup_types.go @@ -16,7 +16,12 @@ limitations under the License. package v1alpha1 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + "path" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) // PerconaServerMySQLBackupSpec defines the desired state of PerconaServerMySQLBackup type PerconaServerMySQLBackupSpec struct { @@ -39,12 +44,81 @@ const ( type PerconaServerMySQLBackupStatus struct { State BackupState `json:"state,omitempty"` StateDesc string `json:"stateDescription,omitempty"` - Destination string `json:"destination,omitempty"` + Destination BackupDestination `json:"destination,omitempty"` Storage *BackupStorageSpec `json:"storage,omitempty"` CompletedAt *metav1.Time `json:"completed,omitempty"` Image string `json:"image,omitempty"` } +const ( + AzureBlobStoragePrefix string = "" + AwsBlobStoragePrefix string = "s3://" + GCSStoragePrefix string = "gs://" +) + +type BackupDestination string + +func (dest *BackupDestination) set(value string) { + if dest == nil { + return + } + *dest = BackupDestination(value) +} + +func (dest *BackupDestination) SetGCSDestination(bucket, backupName string) { + dest.set(GCSStoragePrefix + bucket + "/" + backupName) +} + +func (dest *BackupDestination) SetS3Destination(bucket, backupName string) { + dest.set(AwsBlobStoragePrefix + bucket + "/" + backupName) +} + +func (dest *BackupDestination) SetAzureDestination(container, backupName string) { + dest.set(AzureBlobStoragePrefix + container + "/" + backupName) +} + +func (dest *BackupDestination) String() string { + if dest == nil { + return "" + } + return string(*dest) +} + +func (dest *BackupDestination) StorageTypePrefix() string { + for _, p := range []string{AwsBlobStoragePrefix, GCSStoragePrefix} { + if strings.HasPrefix(dest.String(), p) { + return p + } + } + return AzureBlobStoragePrefix +} + +func (dest *BackupDestination) BucketAndPrefix() (string, string) { + d := strings.TrimPrefix(dest.String(), dest.StorageTypePrefix()) + bucket, left, _ := strings.Cut(d, "/") + + spl := strings.Split(left, "/") + prefix := "" + if len(spl) > 1 { + prefix = path.Join(spl[:len(spl)-1]...) + prefix = strings.TrimSuffix(prefix, "/") + prefix += "/" + } + return bucket, prefix +} + +func (dest *BackupDestination) PathWithoutBucket() string { + _, prefix := dest.BucketAndPrefix() + return path.Join(prefix, dest.BackupName()) +} + +func (dest *BackupDestination) BackupName() string { + bucket, prefix := dest.BucketAndPrefix() + backupName := strings.TrimPrefix(dest.String(), dest.StorageTypePrefix()+path.Join(bucket, prefix)) + backupName = strings.TrimPrefix(backupName, "/") + return backupName +} + // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Storage",type=string,JSONPath=".spec.storageName" diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 15eed38d6..a29df5643 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -49,6 +49,7 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage" //+kubebuilder:scaffold:imports ) @@ -173,9 +174,10 @@ func main() { os.Exit(1) } if err = (&psrestore.PerconaServerMySQLRestoreReconciler{ - Client: nsClient, - Scheme: mgr.GetScheme(), - ServerVersion: serverVersion, + Client: nsClient, + Scheme: mgr.GetScheme(), + ServerVersion: serverVersion, + NewStorageClient: storage.NewClient, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "PerconaServerMySQLRestore") os.Exit(1) diff --git a/cmd/sidecar/main.go b/cmd/sidecar/main.go index f1fd79409..51c35e7cc 100644 --- a/cmd/sidecar/main.go +++ b/cmd/sidecar/main.go @@ -24,8 +24,8 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/mysql" - "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" xb "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage" ) var ( @@ -202,7 +202,7 @@ func deleteBackupHandler(w http.ResponseWriter, req *http.Request) { log.Info("Backup deleted successfully", "destination", backupConf.Destination, "storage", backupConf.Type) } -func deleteBackup(ctx context.Context, cfg *xtrabackup.BackupConfig, backupName string) error { +func deleteBackup(ctx context.Context, cfg *xb.BackupConfig, backupName string) error { logWriter := io.Writer(os.Stderr) if backupName != "" { backupLog, err := os.OpenFile(filepath.Join(mysql.BackupLogDir, backupName+".log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o666) @@ -238,12 +238,16 @@ func deleteBackup(ctx context.Context, cfg *xtrabackup.BackupConfig, backupName return nil } -func backupExists(ctx context.Context, cfg *xtrabackup.BackupConfig) (bool, error) { - storage, err := newStorage(cfg) +func backupExists(ctx context.Context, cfg *xb.BackupConfig) (bool, error) { + opts, err := storage.GetOptionsFromBackupConfig(cfg) + if err != nil { + return false, errors.Wrap(err, "get options from backup config") + } + storage, err := storage.NewClient(ctx, opts) if err != nil { return false, errors.Wrap(err, "new storage") } - objects, err := storage.listObjects(ctx, cfg.Destination) + objects, err := storage.ListObjects(ctx, cfg.Destination) if err != nil { return false, errors.Wrap(err, "list objects") } @@ -253,17 +257,21 @@ func backupExists(ctx context.Context, cfg *xtrabackup.BackupConfig) (bool, erro return true, nil } -func checkBackupMD5Size(ctx context.Context, cfg *xtrabackup.BackupConfig) error { +func checkBackupMD5Size(ctx context.Context, cfg *xb.BackupConfig) error { // xbcloud doesn't create md5 file for azure if cfg.Type == apiv1alpha1.BackupStorageAzure { return nil } - storage, err := newStorage(cfg) + opts, err := storage.GetOptionsFromBackupConfig(cfg) + if err != nil { + return errors.Wrap(err, "get options from backup config") + } + storage, err := storage.NewClient(ctx, opts) if err != nil { return errors.Wrap(err, "new storage") } - r, err := storage.getObject(ctx, cfg.Destination+".md5") + r, err := storage.GetObject(ctx, cfg.Destination+".md5") if err != nil { return errors.Wrap(err, "get object") } diff --git a/cmd/sidecar/storage.go b/cmd/sidecar/storage.go deleted file mode 100644 index 353c4fed5..000000000 --- a/cmd/sidecar/storage.go +++ /dev/null @@ -1,160 +0,0 @@ -package main - -import ( - "context" - "crypto/tls" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" - "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container" - "github.com/minio/minio-go/v7" - "github.com/minio/minio-go/v7/pkg/credentials" - "github.com/pkg/errors" - - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" - "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" -) - -type storage interface { - getObject(ctx context.Context, objectName string) (io.ReadCloser, error) - listObjects(ctx context.Context, prefix string) ([]string, error) -} - -func newStorage(cfg *xtrabackup.BackupConfig) (storage, error) { - switch cfg.Type { - case apiv1alpha1.BackupStorageAzure: - a := cfg.Azure - endpoint := a.EndpointURL - if endpoint == "" { - endpoint = fmt.Sprintf("https://%s.blob.core.windows.net/", a.StorageAccount) - } - return newAzure(a.StorageAccount, a.AccessKey, endpoint, a.ContainerName) - case apiv1alpha1.BackupStorageGCS: - gcs := cfg.GCS - endpoint := gcs.EndpointURL - if endpoint == "" { - endpoint = "https://storage.googleapis.com" - } - return newS3(endpoint, gcs.AccessKey, gcs.SecretKey, gcs.Bucket, "", cfg.VerifyTLS) - case apiv1alpha1.BackupStorageS3: - s3 := cfg.S3 - endpoint := s3.EndpointURL - if endpoint == "" { - endpoint = "https://s3.amazonaws.com" - } - return newS3(endpoint, s3.AccessKey, s3.SecretKey, s3.Bucket, s3.Region, cfg.VerifyTLS) - } - return nil, errors.Errorf("storage type %s is not supported", cfg.Type) -} - -// s3 is a type for working with s3 storages -type s3 struct { - client *minio.Client // minio client for work with storage - bucketName string // S3 bucket name where binlogs will be stored -} - -// newS3 return new Manager, useSSL using ssl for connection with storage -func newS3(endpoint, accessKeyID, secretAccessKey, bucketName, region string, verifyTLS bool) (*s3, error) { - useSSL := strings.Contains(endpoint, "https") - endpoint = strings.TrimPrefix(strings.TrimPrefix(endpoint, "https://"), "http://") - transport := http.DefaultTransport - transport.(*http.Transport).TLSClientConfig = &tls.Config{ - InsecureSkipVerify: !verifyTLS, - } - minioClient, err := minio.New(strings.TrimRight(endpoint, "/"), &minio.Options{ - Creds: credentials.NewStaticV4(accessKeyID, secretAccessKey, ""), - Secure: useSSL, - Region: region, - Transport: transport, - }) - if err != nil { - return nil, errors.Wrap(err, "new minio client") - } - - return &s3{ - client: minioClient, - bucketName: bucketName, - }, nil -} - -// GetObject return content by given object name -func (s *s3) getObject(ctx context.Context, objectName string) (io.ReadCloser, error) { - oldObj, err := s.client.GetObject(ctx, s.bucketName, objectName, minio.GetObjectOptions{}) - if err != nil { - return nil, errors.Wrapf(err, "get object %s", objectName) - } - - return oldObj, nil -} - -func (s *s3) listObjects(ctx context.Context, prefix string) ([]string, error) { - opts := minio.ListObjectsOptions{ - UseV1: true, - Prefix: prefix, - } - list := []string{} - - for object := range s.client.ListObjects(ctx, s.bucketName, opts) { - if object.Err != nil { - return nil, errors.Wrapf(object.Err, "list object %s", object.Key) - } - list = append(list, object.Key) - } - - return list, nil -} - -// azure is a type for working with azure Blob storages -type azure struct { - client *azblob.Client // azure client for work with storage - container string -} - -func newAzure(storageAccount, accessKey, endpoint, container string) (*azure, error) { - credential, err := azblob.NewSharedKeyCredential(storageAccount, accessKey) - if err != nil { - return nil, errors.Wrap(err, "new credentials") - } - cli, err := azblob.NewClientWithSharedKeyCredential(endpoint, credential, nil) - if err != nil { - return nil, errors.Wrap(err, "new client") - } - - return &azure{ - client: cli, - container: container, - }, nil -} - -func (a *azure) getObject(ctx context.Context, name string) (io.ReadCloser, error) { - resp, err := a.client.DownloadStream(ctx, a.container, url.QueryEscape(name), &azblob.DownloadStreamOptions{}) - if err != nil { - return nil, errors.Wrapf(err, "download stream: %s", name) - } - return resp.Body, nil -} - -func (a *azure) listObjects(ctx context.Context, prefix string) ([]string, error) { - pg := a.client.NewListBlobsFlatPager(a.container, &container.ListBlobsFlatOptions{ - Prefix: &prefix, - }) - var blobs []string - for pg.More() { - resp, err := pg.NextPage(ctx) - if err != nil { - return nil, errors.Wrapf(err, "next page: %s", prefix) - } - if resp.Segment != nil { - for _, item := range resp.Segment.BlobItems { - if item != nil && item.Name != nil { - blobs = append(blobs, *item.Name) - } - } - } - } - return blobs, nil -} diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index 74daaceca..febf74957 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -247,7 +247,10 @@ func (r *PerconaServerMySQLBackupReconciler) createBackupJob(ctx context.Context return errors.Wrap(err, "get operator image") } - destination := getDestination(storage, cr.Spec.ClusterName, cr.CreationTimestamp.Format("2006-01-02-15:04:05")) + destination, err := getDestination(storage, cr.Spec.ClusterName, cr.CreationTimestamp.Format("2006-01-02-15:04:05")) + if err != nil { + return errors.Wrap(err, "get backup destination") + } job := xtrabackup.Job(cluster, cr, destination, initImage, storage) switch storage.Type { @@ -270,7 +273,7 @@ func (r *PerconaServerMySQLBackupReconciler) createBackupJob(ctx context.Context return errors.Wrap(err, "set storage S3") } - status.Destination = fmt.Sprintf("s3://%s/%s", storage.S3.Bucket, destination) + status.Destination = destination case apiv1alpha1.BackupStorageGCS: if storage.GCS == nil { return errors.New("gcs stanza is required in storage") @@ -290,7 +293,7 @@ func (r *PerconaServerMySQLBackupReconciler) createBackupJob(ctx context.Context return errors.Wrap(err, "set storage GCS") } - status.Destination = fmt.Sprintf("gs://%s/%s", storage.GCS.Bucket, destination) + status.Destination = destination case apiv1alpha1.BackupStorageAzure: if storage.Azure == nil { return errors.New("azure stanza is required in storage") @@ -310,7 +313,7 @@ func (r *PerconaServerMySQLBackupReconciler) createBackupJob(ctx context.Context return errors.Wrap(err, "set storage Azure") } - status.Destination = fmt.Sprintf("%s/%s", storage.Azure.ContainerName, destination) + status.Destination = destination default: return errors.Errorf("storage type %s is not supported", storage.Type) } @@ -338,19 +341,25 @@ func (r *PerconaServerMySQLBackupReconciler) createBackupJob(ctx context.Context return nil } -func getDestination(storage *apiv1alpha1.BackupStorageSpec, clusterName, creationTimeStamp string) string { - dest := fmt.Sprintf("%s-%s-full", clusterName, creationTimeStamp) +func getDestination(storage *apiv1alpha1.BackupStorageSpec, clusterName, creationTimeStamp string) (apiv1alpha1.BackupDestination, error) { + backupName := fmt.Sprintf("%s-%s-full", clusterName, creationTimeStamp) + var d apiv1alpha1.BackupDestination switch storage.Type { case apiv1alpha1.BackupStorageS3: - dest = path.Join(storage.S3.Bucket.Prefix(), storage.S3.Prefix, dest) + bucket, prefix := storage.S3.BucketAndPrefix() + d.SetS3Destination(path.Join(bucket, prefix), backupName) case apiv1alpha1.BackupStorageGCS: - dest = path.Join(storage.GCS.Bucket.Prefix(), storage.GCS.Prefix, dest) + bucket, prefix := storage.GCS.BucketAndPrefix() + d.SetGCSDestination(path.Join(bucket, prefix), backupName) case apiv1alpha1.BackupStorageAzure: - dest = path.Join(storage.Azure.ContainerName.Prefix(), storage.Azure.Prefix, dest) + container, prefix := storage.Azure.ContainerAndPrefix() + d.SetAzureDestination(path.Join(container, prefix), backupName) + default: + return d, errors.Errorf("storage type %s is not supported", storage.Type) } - return dest + return d, nil } func (r *PerconaServerMySQLBackupReconciler) getBackupSource(ctx context.Context, cluster *apiv1alpha1.PerconaServerMySQL) (string, error) { @@ -427,9 +436,12 @@ func (r *PerconaServerMySQLBackupReconciler) backupConfig(ctx context.Context, c if storage.VerifyTLS != nil { verifyTLS = *storage.VerifyTLS } - destination := getDestination(storage, cr.Spec.ClusterName, cr.CreationTimestamp.Format("2006-01-02-15:04:05")) + destination, err := getDestination(storage, cr.Spec.ClusterName, cr.CreationTimestamp.Format("2006-01-02-15:04:05")) + if err != nil { + return nil, errors.Wrap(err, "get backup destination") + } conf := &xtrabackup.BackupConfig{ - Destination: destination, + Destination: destination.PathWithoutBucket(), VerifyTLS: verifyTLS, } s := new(corev1.Secret) @@ -451,7 +463,8 @@ func (r *PerconaServerMySQLBackupReconciler) backupConfig(ctx context.Context, c if !ok { return nil, errors.Errorf("no credentials for S3 in secret %s", nn.Name) } - conf.S3.Bucket = s3.Bucket.Bucket() + bucket, _ := s3.BucketAndPrefix() + conf.S3.Bucket = bucket conf.S3.Region = s3.Region conf.S3.EndpointURL = s3.EndpointURL conf.S3.StorageClass = s3.StorageClass @@ -472,7 +485,8 @@ func (r *PerconaServerMySQLBackupReconciler) backupConfig(ctx context.Context, c if !ok { return nil, errors.Errorf("no credentials for GCS in secret %s", nn.Name) } - conf.GCS.Bucket = gcs.Bucket.Bucket() + bucket, _ := gcs.BucketAndPrefix() + conf.GCS.Bucket = bucket conf.GCS.EndpointURL = gcs.EndpointURL conf.GCS.StorageClass = gcs.StorageClass conf.GCS.AccessKey = string(accessKey) @@ -492,7 +506,8 @@ func (r *PerconaServerMySQLBackupReconciler) backupConfig(ctx context.Context, c if !ok { return nil, errors.Errorf("no credentials for Azure in secret %s", nn.Name) } - conf.Azure.ContainerName = azure.ContainerName.Bucket() + container, _ := azure.ContainerAndPrefix() + conf.Azure.ContainerName = container conf.Azure.EndpointURL = azure.EndpointURL conf.Azure.StorageClass = azure.StorageClass conf.Azure.StorageAccount = string(storageAccount) diff --git a/pkg/controller/psbackup/controller_test.go b/pkg/controller/psbackup/controller_test.go index 6838fd1f0..63eb29093 100644 --- a/pkg/controller/psbackup/controller_test.go +++ b/pkg/controller/psbackup/controller_test.go @@ -346,7 +346,7 @@ func TestRunningState(t *testing.T) { cluster: cluster.DeepCopy(), state: apiv1alpha1.BackupStarting, sidecarClient: &fakeSidecarClient{ - destination: "other-dest", + destination: "other-container", }, }, { @@ -355,7 +355,7 @@ func TestRunningState(t *testing.T) { cluster: cluster.DeepCopy(), state: apiv1alpha1.BackupRunning, sidecarClient: &fakeSidecarClient{ - destination: "dest", + destination: "container", }, }, } @@ -366,7 +366,7 @@ func TestRunningState(t *testing.T) { if !ok { t.Fatal("storage not found") } - job := xtrabackup.Job(tt.cluster, tt.cr, "dest", "init-image", storage) + job := xtrabackup.Job(tt.cluster, tt.cr, "s3://bucket/container", "init-image", storage) job.Status.Active = 1 cb := fake.NewClientBuilder().WithScheme(scheme).WithObjects(tt.cr, tt.cluster, job).WithStatusSubresource(tt.cr, tt.cluster, job) @@ -396,7 +396,7 @@ func TestRunningState(t *testing.T) { t.Fatal(err, "failed to get backup") } if cr.Status.State != tt.state { - t.Fatalf("expected state %s, got %s", apiv1alpha1.RestoreError, cr.Status.State) + t.Fatalf("expected state %s, got %s", tt.state, cr.Status.State) } }) } diff --git a/pkg/controller/psrestore/controller.go b/pkg/controller/psrestore/controller.go index d083a25b3..97b1a0143 100644 --- a/pkg/controller/psrestore/controller.go +++ b/pkg/controller/psrestore/controller.go @@ -33,7 +33,6 @@ import ( k8sretry "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/pkg/errors" @@ -46,13 +45,15 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/router" "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage" ) // PerconaServerMySQLRestoreReconciler reconciles a PerconaServerMySQLRestore object type PerconaServerMySQLRestoreReconciler struct { client.Client - Scheme *runtime.Scheme - ServerVersion *platform.ServerVersion + Scheme *runtime.Scheme + ServerVersion *platform.ServerVersion + NewStorageClient storage.NewClientFunc sm sync.Map } @@ -86,7 +87,7 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req } defer func() { - if status.State == cr.Status.State { + if status.State == cr.Status.State && status.StateDesc == cr.Status.StateDesc { return } @@ -137,47 +138,6 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req return ctrl.Result{}, errors.Wrapf(err, "get cluster %s", nn) } - var destination string - var storage *apiv1alpha1.BackupStorageSpec - if cr.Spec.BackupName != "" { - backup := &apiv1alpha1.PerconaServerMySQLBackup{} - nn := types.NamespacedName{Name: cr.Spec.BackupName, Namespace: cr.Namespace} - if err := r.Client.Get(ctx, nn, backup); err != nil { - if k8serrors.IsNotFound(err) { - status.State = apiv1alpha1.RestoreError - status.StateDesc = fmt.Sprintf("PerconaServerMySQLBackup %s in namespace %s is not found", cr.Spec.BackupName, cr.Namespace) - return ctrl.Result{}, nil - } - return ctrl.Result{}, errors.Wrapf(err, "get backup %s", nn) - } - destination = backup.Status.Destination - storageName := backup.Spec.StorageName - var ok bool - storage, ok = cluster.Spec.Backup.Storages[storageName] - if !ok { - status.State = apiv1alpha1.RestoreError - status.StateDesc = fmt.Sprintf("%s not found in spec.backup.storages in PerconaServerMySQL CustomResource", storageName) - return ctrl.Result{}, nil - } - } else if cr.Spec.BackupSource != nil { - storage = cr.Spec.BackupSource.Storage - destination = cr.Spec.BackupSource.Destination - if destination == "" { - status.State = apiv1alpha1.RestoreError - status.StateDesc = "backupSource.destination is empty" - return ctrl.Result{}, nil - } - if storage == nil { - status.State = apiv1alpha1.RestoreError - status.StateDesc = "backupSource.storage is empty" - return ctrl.Result{}, nil - } - } else { - status.State = apiv1alpha1.RestoreError - status.StateDesc = "backupName and backupSource are empty" - return ctrl.Result{}, nil - } - restoreList := &apiv1alpha1.PerconaServerMySQLRestoreList{} if err := r.List(ctx, restoreList, &client.ListOptions{Namespace: cr.Namespace}); err != nil { return ctrl.Result{}, errors.Wrap(err, "get restore jobs list") @@ -190,12 +150,19 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req switch restore.Status.State { case apiv1alpha1.RestoreSucceeded, apiv1alpha1.RestoreFailed, apiv1alpha1.RestoreError, apiv1alpha1.RestoreNew: default: - status.State = apiv1alpha1.RestoreError + status.State = apiv1alpha1.RestoreNew status.StateDesc = fmt.Sprintf("PerconaServerMySQLRestore %s is already running", restore.Name) log.Info("PerconaServerMySQLRestore is already running", "restore", restore.Name) return ctrl.Result{RequeueAfter: 5 * time.Second}, nil } } + + if err := r.validate(ctx, cr, cluster); err != nil { + status.State = apiv1alpha1.RestoreError + status.StateDesc = errors.Cause(err).Error() + return ctrl.Result{}, nil + } + // The above code is to prevent multiple restores from running at the same time. It works only if restore job is created. // But if multiple restores are created at the same time, then the above code will not work, because there are no restore jobs yet. // Therefore, we need to use sync.Map to prevent multiple restores from creating restore jobs at the same time. @@ -229,84 +196,18 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req if k8serrors.IsNotFound(err) { log.Info("Creating restore job", "jobName", nn.Name) - initImage, err := k8s.InitImage(ctx, r.Client, cluster, cluster.Spec.Backup) + restorer, err := r.getRestorer(ctx, cr, cluster) if err != nil { - return ctrl.Result{}, errors.Wrap(err, "get operator image") - } - - pvcName := fmt.Sprintf("%s-%s-mysql-0", mysql.DataVolumeName, cluster.Name) - job := xtrabackup.RestoreJob(cluster, destination, cr, storage, initImage, pvcName) - - switch storage.Type { - case apiv1alpha1.BackupStorageS3: - if storage.S3 == nil { - return ctrl.Result{}, errors.New("s3 stanza is required in storage") - } - - nn := types.NamespacedName{Name: storage.S3.CredentialsSecret, Namespace: cr.Namespace} - exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) - if err != nil { - return ctrl.Result{}, errors.Wrapf(err, "check %s exists", nn) - } - - if !exists { - status.State = apiv1alpha1.RestoreError - status.StateDesc = fmt.Sprintf("secret %s is not found", storage.S3.CredentialsSecret) - return ctrl.Result{}, errors.Wrapf(err, "secret %s not found", nn) - } - - if err := xtrabackup.SetStorageS3(job, storage.S3); err != nil { - return ctrl.Result{}, errors.Wrap(err, "set storage s3") - } - case apiv1alpha1.BackupStorageGCS: - if storage.GCS == nil { - return ctrl.Result{}, errors.New("gcs stanza is required in storage") - } - - nn := types.NamespacedName{Name: storage.GCS.CredentialsSecret, Namespace: cr.Namespace} - exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) - if err != nil { - return ctrl.Result{}, errors.Wrapf(err, "check %s exists", nn) - } - - if !exists { - status.State = apiv1alpha1.RestoreError - status.StateDesc = fmt.Sprintf("secret %s is not found", storage.GCS.CredentialsSecret) - return ctrl.Result{}, errors.Wrapf(err, "secret %s not found", nn) - } - - if err := xtrabackup.SetStorageGCS(job, storage.GCS); err != nil { - return ctrl.Result{}, errors.Wrap(err, "set storage GCS") - } - case apiv1alpha1.BackupStorageAzure: - if storage.Azure == nil { - return ctrl.Result{}, errors.New("azure stanza is required in storage") - } - - nn := types.NamespacedName{Name: storage.Azure.CredentialsSecret, Namespace: cr.Namespace} - exists, err := k8s.ObjectExists(ctx, r.Client, nn, &corev1.Secret{}) - if err != nil { - return ctrl.Result{}, errors.Wrapf(err, "check %s exists", nn) - } - - if !exists { - status.State = apiv1alpha1.RestoreError - status.StateDesc = fmt.Sprintf("secret %s is not found", storage.Azure.CredentialsSecret) - return ctrl.Result{}, errors.Wrapf(err, "secret %s not found", nn) - } - - if err := xtrabackup.SetStorageAzure(job, storage.Azure); err != nil { - return ctrl.Result{}, errors.Wrap(err, "set storage Azure") - } - default: - return ctrl.Result{}, errors.Errorf("Storage type %s is not supported", storage.Type) + status.State = apiv1alpha1.RestoreError + status.StateDesc = err.Error() + return ctrl.Result{}, nil } - - if err := controllerutil.SetControllerReference(cr, job, r.Scheme); err != nil { - return ctrl.Result{}, errors.Wrapf(err, "set controller reference to Job %s/%s", job.Namespace, job.Name) + job, err := restorer.Job() + if err != nil { + return ctrl.Result{}, errors.Wrap(err, "get job") } - if err := r.Client.Create(ctx, job); err != nil { + if err := r.Create(ctx, job); err != nil { return ctrl.Result{}, errors.Wrapf(err, "create job %s/%s", job.Namespace, job.Name) } @@ -498,3 +399,40 @@ func (r *PerconaServerMySQLRestoreReconciler) SetupWithManager(mgr ctrl.Manager) Owns(&batchv1.Job{}). Complete(r) } + +func (r *PerconaServerMySQLRestoreReconciler) validate(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQLRestore, cluster *apiv1alpha1.PerconaServerMySQL) error { + bcp, err := getBackup(ctx, r.Client, cr, cluster) + if err != nil { + return err + } + + if bs := cr.Spec.BackupSource; bs != nil { + storage := bs.Storage + destination := bs.Destination + if destination == "" { + return errors.New("backupSource.destination is empty") + } + if storage == nil { + return errors.New("backupSource.storage is empty") + } + } else { + storageName := bcp.Spec.StorageName + var ok bool + _, ok = cluster.Spec.Backup.Storages[storageName] + if !ok { + return errors.Errorf("%s not found in spec.backup.storages in PerconaServerMySQL CustomResource", storageName) + } + } + if bcp.Status.Storage == nil { + return errors.New("backup's status.storage is empty") + } + restorer, err := r.getRestorer(ctx, cr, cluster) + if err != nil { + return errors.Wrap(err, "get restorer") + } + if err := restorer.Validate(ctx); err != nil { + return err + } + + return nil +} diff --git a/pkg/controller/psrestore/controller_test.go b/pkg/controller/psrestore/controller_test.go index 3c5bb08f9..d9fcab182 100644 --- a/pkg/controller/psrestore/controller_test.go +++ b/pkg/controller/psrestore/controller_test.go @@ -3,23 +3,22 @@ package psrestore import ( "context" "fmt" - "os" - "path/filepath" "testing" + "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/yaml" clientgoscheme "k8s.io/client-go/kubernetes/scheme" controllerruntime "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/platform" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage" + fakestorage "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage/fake" ) func TestRestoreStatusErrStateDesc(t *testing.T) { @@ -29,22 +28,18 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { restoreName := "restore1" storageName := "some-storage" - cr, err := readDefaultCRRestore(restoreName, namespace) - if err != nil { - t.Fatal(err, "failed to read restore file") - } - + cr := readDefaultRestore(t, restoreName, namespace) tests := []struct { name string cr *apiv1alpha1.PerconaServerMySQLRestore cluster *apiv1alpha1.PerconaServerMySQL - objects []client.Object + objects []runtime.Object stateDesc string shouldSucceed bool }{ { name: "without cluster", - cr: cr, + cr: cr.DeepCopy(), cluster: nil, stateDesc: fmt.Sprintf("PerconaServerMySQL %s in namespace %s is not found", clusterName, namespace), }, @@ -112,7 +107,7 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { { name: "without backup storage in cluster", cr: cr, - objects: []client.Object{ + objects: []runtime.Object{ &apiv1alpha1.PerconaServerMySQLBackup{ ObjectMeta: metav1.ObjectMeta{ Name: backupName, @@ -140,7 +135,7 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { { name: "without secret", cr: cr, - objects: []client.Object{ + objects: []runtime.Object{ &apiv1alpha1.PerconaServerMySQLBackup{ ObjectMeta: metav1.ObjectMeta{ Name: backupName, @@ -171,12 +166,12 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { }, }, }, - stateDesc: "secret aws-secret is not found", + stateDesc: "secrets aws-secret not found", }, { name: "should succeed", cr: cr, - objects: []client.Object{ + objects: []runtime.Object{ &apiv1alpha1.PerconaServerMySQLBackup{ ObjectMeta: metav1.ObjectMeta{ Name: backupName, @@ -204,6 +199,7 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { Storages: map[string]*apiv1alpha1.BackupStorageSpec{ storageName: { S3: &apiv1alpha1.BackupStorageS3Spec{ + Bucket: "some-bucket", CredentialsSecret: "aws-secret", }, Type: apiv1alpha1.BackupStorageS3, @@ -219,7 +215,7 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { { name: "with running restore", cr: cr, - objects: []client.Object{ + objects: []runtime.Object{ &apiv1alpha1.PerconaServerMySQLBackup{ ObjectMeta: metav1.ObjectMeta{ Name: backupName, @@ -269,12 +265,12 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { }, }, stateDesc: "PerconaServerMySQLRestore running-restore is already running", - shouldSucceed: false, + shouldSucceed: true, }, { name: "with new, failed, errored and succeeded restore", cr: cr, - objects: []client.Object{ + objects: []runtime.Object{ &apiv1alpha1.PerconaServerMySQLBackup{ ObjectMeta: metav1.ObjectMeta{ Name: backupName, @@ -351,6 +347,7 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { storageName: { S3: &apiv1alpha1.BackupStorageS3Spec{ CredentialsSecret: "aws-secret", + Bucket: "some-bucket", }, Type: apiv1alpha1.BackupStorageS3, }, @@ -376,19 +373,29 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - cb := fake.NewClientBuilder().WithScheme(scheme).WithObjects(tt.cr).WithStatusSubresource(tt.cr).WithObjects(tt.objects...) + tt.objects = append(tt.objects, tt.cr) if tt.cluster != nil { - cb.WithObjects(tt.cluster, &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: mysql.Name(tt.cluster), - Namespace: namespace, - }, - }) + if tt.cluster.Spec.Backup == nil { + tt.cluster.Spec.Backup = &apiv1alpha1.BackupSpec{} + } + tt.cluster.Spec.Backup.InitImage = "operator-image" + tt.objects = append(tt.objects, tt.cluster) + tt.objects = append(tt.objects, + &appsv1.StatefulSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: mysql.Name(tt.cluster), + Namespace: namespace, + }, + }) } - - r := PerconaServerMySQLRestoreReconciler{ - Client: cb.Build(), - Scheme: scheme, + cl := buildFakeClient(t, tt.objects...) + r := reconciler(cl) + r.NewStorageClient = func(_ context.Context, opts storage.Options) (storage.Storage, error) { + defaultFakeClient, err := fakestorage.NewFakeClient(ctx, opts) + if err != nil { + return nil, err + } + return &fakeStorageClient{Storage: defaultFakeClient}, nil } _, err := r.Reconcile(ctx, controllerruntime.Request{ NamespacedName: types.NamespacedName{ @@ -423,26 +430,328 @@ func TestRestoreStatusErrStateDesc(t *testing.T) { } } -func readDefaultCRRestore(name, namespace string) (*apiv1alpha1.PerconaServerMySQLRestore, error) { - data, err := os.ReadFile(filepath.Join("..", "..", "..", "deploy", "restore.yaml")) - if err != nil { - return nil, err +func TestRestorerValidate(t *testing.T) { + ctx := context.Background() + + const clusterName = "test-cluster" + const namespace = "namespace" + const backupName = clusterName + "-backup" + const restoreName = clusterName + "-restore" + const s3SecretName = "my-cluster-name-backup-s3" + const gcsSecretName = "my-cluster-name-backup-gcs" + const azureSecretName = "azure-secret" + + cluster := readDefaultCluster(t, clusterName, namespace) + cluster.Spec.Backup.Storages["azure-blob"] = &apiv1alpha1.BackupStorageSpec{ + Type: apiv1alpha1.BackupStorageAzure, + Azure: &apiv1alpha1.BackupStorageAzureSpec{ + ContainerName: "some-bucket", + CredentialsSecret: azureSecretName, + }, + } + cluster.Spec.Backup.Storages["gcs"] = &apiv1alpha1.BackupStorageSpec{ + Type: apiv1alpha1.BackupStorageGCS, + GCS: &apiv1alpha1.BackupStorageGCSSpec{ + Bucket: "some-bucket", + CredentialsSecret: gcsSecretName, + }, + } + cluster.Spec.Backup.Storages["s3-us-west"].S3.CredentialsSecret = s3SecretName + + s3Bcp := readDefaultBackup(t, backupName, namespace) + s3Bcp.Spec.StorageName = "s3-us-west" + s3Bcp.Status.Destination.SetS3Destination("some-dest", "dest") + s3Bcp.Status.Storage.S3 = &apiv1alpha1.BackupStorageS3Spec{ + Bucket: "some-bucket", + CredentialsSecret: s3SecretName, + } + s3Bcp.Status.State = apiv1alpha1.BackupSucceeded + s3Bcp.Status.Storage.Type = apiv1alpha1.BackupStorageS3 + + azureBcp := readDefaultBackup(t, backupName, namespace) + azureBcp.Spec.StorageName = "azure-blob" + azureBcp.Status.Destination.SetAzureDestination("some-dest", "dest") + azureBcp.Status.Storage.Azure = &apiv1alpha1.BackupStorageAzureSpec{ + ContainerName: "some-bucket", + CredentialsSecret: azureSecretName, + } + azureBcp.Status.State = apiv1alpha1.BackupSucceeded + azureBcp.Status.Storage.Type = apiv1alpha1.BackupStorageAzure + + gcsBcp := readDefaultBackup(t, backupName, namespace) + gcsBcp.Spec.StorageName = "gcs" + gcsBcp.Status.Destination.SetAzureDestination("some-dest", "dest") + gcsBcp.Status.Storage.GCS = &apiv1alpha1.BackupStorageGCSSpec{ + Bucket: "some-bucket", + CredentialsSecret: gcsSecretName, + } + gcsBcp.Status.State = apiv1alpha1.BackupSucceeded + gcsBcp.Status.Storage.Type = apiv1alpha1.BackupStorageGCS + + cr := readDefaultRestore(t, restoreName, namespace) + cr.Spec.BackupName = backupName + s3Secret := readDefaultS3Secret(t, s3SecretName, namespace) + azureSecret := readDefaultAzureSecret(t, azureSecretName, namespace) + gcsSecret := readDefaultGCSSecret(t, gcsSecretName, namespace) + + tests := []struct { + name string + cr *apiv1alpha1.PerconaServerMySQLRestore + bcp *apiv1alpha1.PerconaServerMySQLBackup + cluster *apiv1alpha1.PerconaServerMySQL + objects []runtime.Object + expectedErr string + fakeStorageClientFunc storage.NewClientFunc + }{ + { + name: "s3", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: s3Bcp.DeepCopy(), + objects: []runtime.Object{ + s3Secret, + }, + }, + { + name: "s3 without secrets", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: s3Bcp.DeepCopy(), + expectedErr: "failed to validate job: secrets my-cluster-name-backup-s3 not found", + }, + { + name: "s3 without credentialsSecret", + cr: cr.DeepCopy(), + bcp: s3Bcp.DeepCopy(), + objects: []runtime.Object{ + s3Secret, + }, + cluster: updateResource(cluster.DeepCopy(), func(cluster *apiv1alpha1.PerconaServerMySQL) { + cluster.Spec.Backup.Storages["s3-us-west"].S3.CredentialsSecret = "" + }), + expectedErr: "", + }, + { + name: "s3 with failing storage client", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: s3Bcp.DeepCopy(), + expectedErr: "failed to validate storage: failed to list objects: failListObjects", + objects: []runtime.Object{ + s3Secret, + }, + fakeStorageClientFunc: func(_ context.Context, opts storage.Options) (storage.Storage, error) { + return &fakeStorageClient{failListObjects: true}, nil + }, + }, + { + name: "s3 without provided bucket", + cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLRestore) { + cr.Spec.BackupName = "" + cr.Spec.BackupSource = &apiv1alpha1.PerconaServerMySQLBackupStatus{ + Destination: s3Bcp.Status.Destination, + Storage: &apiv1alpha1.BackupStorageSpec{ + S3: s3Bcp.Status.Storage.S3, + Type: apiv1alpha1.BackupStorageS3, + }, + } + cr.Spec.BackupSource.Storage.S3.Bucket = "" + }, + ), + cluster: cluster.DeepCopy(), + objects: []runtime.Object{ + s3Secret, + }, + }, + { + name: "s3 with empty bucket", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: s3Bcp.DeepCopy(), + expectedErr: "failed to validate storage: backup not found", + objects: []runtime.Object{ + s3Secret, + }, + fakeStorageClientFunc: func(_ context.Context, opts storage.Options) (storage.Storage, error) { + return &fakeStorageClient{emptyListObjects: true}, nil + }, + }, + { + name: "gcs", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: gcsBcp.DeepCopy(), + objects: []runtime.Object{ + gcsSecret, + }, + }, + { + name: "gcs without secrets", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: gcsBcp.DeepCopy(), + expectedErr: "failed to validate job: secrets my-cluster-name-backup-gcs not found", + }, + { + name: "gcs with failing storage client", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: gcsBcp.DeepCopy(), + expectedErr: "failed to validate storage: failed to list objects: failListObjects", + objects: []runtime.Object{ + gcsSecret, + }, + fakeStorageClientFunc: func(_ context.Context, opts storage.Options) (storage.Storage, error) { + return &fakeStorageClient{failListObjects: true}, nil + }, + }, + { + name: "gcs without provided bucket", + cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLRestore) { + cr.Spec.BackupName = "" + cr.Spec.BackupSource = &apiv1alpha1.PerconaServerMySQLBackupStatus{ + Destination: gcsBcp.Status.Destination, + Storage: &apiv1alpha1.BackupStorageSpec{ + GCS: gcsBcp.Status.Storage.GCS, + Type: apiv1alpha1.BackupStorageGCS, + }, + } + cr.Spec.BackupSource.Storage.GCS.Bucket = "" + }, + ), + cluster: cluster.DeepCopy(), + objects: []runtime.Object{ + gcsSecret, + }, + }, + { + name: "gcs with empty bucket", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: gcsBcp.DeepCopy(), + expectedErr: "failed to validate storage: backup not found", + objects: []runtime.Object{ + gcsSecret, + }, + fakeStorageClientFunc: func(_ context.Context, opts storage.Options) (storage.Storage, error) { + return &fakeStorageClient{emptyListObjects: true}, nil + }, + }, + { + name: "azure", + bcp: azureBcp, + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + objects: []runtime.Object{ + azureSecret, + }, + }, + { + name: "azure without secrets", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: azureBcp, + expectedErr: "failed to validate job: secrets azure-secret not found", + }, + { + name: "azure with failing storage client", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: azureBcp, + expectedErr: "failed to validate storage: failed to list objects: failListObjects", + objects: []runtime.Object{ + azureSecret, + }, + fakeStorageClientFunc: func(_ context.Context, opts storage.Options) (storage.Storage, error) { + return &fakeStorageClient{failListObjects: true}, nil + }, + }, + { + name: "azure without provided bucket", + cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLRestore) { + cr.Spec.BackupName = "" + cr.Spec.BackupSource = &apiv1alpha1.PerconaServerMySQLBackupStatus{ + Destination: azureBcp.Status.Destination, + Storage: &apiv1alpha1.BackupStorageSpec{ + Azure: azureBcp.Status.Storage.Azure, + Type: apiv1alpha1.BackupStorageAzure, + }, + } + cr.Spec.BackupSource.Storage.Azure.ContainerName = "" + }, + ), + cluster: cluster.DeepCopy(), + objects: []runtime.Object{ + azureSecret, + }, + }, + { + name: "azure with empty bucket", + cr: cr.DeepCopy(), + cluster: cluster.DeepCopy(), + bcp: azureBcp, + expectedErr: "failed to validate storage: backup not found", + objects: []runtime.Object{ + azureSecret, + }, + fakeStorageClientFunc: func(_ context.Context, opts storage.Options) (storage.Storage, error) { + return &fakeStorageClient{emptyListObjects: true}, nil + }, + }, } - cr := &apiv1alpha1.PerconaServerMySQLRestore{} + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if tt.fakeStorageClientFunc == nil { + tt.fakeStorageClientFunc = func(ctx context.Context, opts storage.Options) (storage.Storage, error) { + defaultFakeClient, err := fakestorage.NewFakeClient(ctx, opts) + if err != nil { + return nil, err + } + return &fakeStorageClient{defaultFakeClient, false, false}, nil + } + } + + if err := tt.cluster.CheckNSetDefaults(ctx, new(platform.ServerVersion)); err != nil { + t.Fatal(err) + } + if tt.bcp != nil { + tt.objects = append(tt.objects, tt.bcp) + } + tt.objects = append(tt.objects, tt.cr, tt.cluster) + + cl := buildFakeClient(t, tt.objects...) + r := reconciler(cl) + r.NewStorageClient = tt.fakeStorageClientFunc - if err := yaml.Unmarshal(data, cr); err != nil { - return nil, err + restorer, err := r.getRestorer(ctx, tt.cr, tt.cluster) + if err != nil { + t.Fatal(err) + } + err = restorer.Validate(ctx) + errStr := "" + if err != nil { + errStr = err.Error() + } + if errStr != tt.expectedErr { + t.Fatal("expected err:", tt.expectedErr, "; got:", errStr) + } + }) } +} - cr.Name = name - cr.Namespace = namespace - return cr, nil +type fakeStorageClient struct { + storage.Storage + failListObjects bool + emptyListObjects bool } -func updateResource[T any](cr *T, updateFuncs ...func(cr *T)) *T { - for _, f := range updateFuncs { - f(cr) +func (c *fakeStorageClient) ListObjects(_ context.Context, _ string) ([]string, error) { + switch { + case c.emptyListObjects: + return nil, nil + case c.failListObjects: + return nil, errors.New("failListObjects") } - return cr + return []string{"some-dest/backup1", "some-dest/backup2"}, nil } diff --git a/pkg/controller/psrestore/helpers_test.go b/pkg/controller/psrestore/helpers_test.go new file mode 100644 index 000000000..706299acc --- /dev/null +++ b/pkg/controller/psrestore/helpers_test.go @@ -0,0 +1,153 @@ +package psrestore + +import ( + "os" + "path/filepath" + "testing" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/yaml" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + fakestorage "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage/fake" +) + +func readDefaultCluster(t *testing.T, name, namespace string) *apiv1alpha1.PerconaServerMySQL { + t.Helper() + + cr := &apiv1alpha1.PerconaServerMySQL{} + readDefaultFile(t, "cr.yaml", cr) + + cr.Name = name + cr.Namespace = namespace + cr.Spec.InitImage = "init-image" + return cr +} + +func readDefaultBackup(t *testing.T, name, namespace string) *apiv1alpha1.PerconaServerMySQLBackup { + t.Helper() + + cr := &apiv1alpha1.PerconaServerMySQLBackup{} + readDefaultFile(t, "backup.yaml", cr) + + cr.Status.Storage = new(apiv1alpha1.BackupStorageSpec) + cr.Name = name + cr.Namespace = namespace + return cr +} + +func readDefaultRestore(t *testing.T, name, namespace string) *apiv1alpha1.PerconaServerMySQLRestore { + t.Helper() + + cr := &apiv1alpha1.PerconaServerMySQLRestore{} + readDefaultFile(t, "restore.yaml", cr) + + cr.Name = name + cr.Namespace = namespace + return cr +} + +func readDefaultS3Secret(t *testing.T, name, namespace string) *corev1.Secret { + t.Helper() + + secret := new(corev1.Secret) + readDefaultFile(t, "backup-s3.yaml", secret) + + secret.Name = name + secret.Namespace = namespace + return secret +} + +func readDefaultAzureSecret(t *testing.T, name, namespace string) *corev1.Secret { + t.Helper() + + return &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + }, + Data: map[string][]byte{ + "AZURE_STORAGE_ACCOUNT_NAME": []byte("accountName"), + "AZURE_STORAGE_ACCOUNT_KEY": []byte("accountKey"), + }, + } +} + +func readDefaultGCSSecret(t *testing.T, name, namespace string) *corev1.Secret { + t.Helper() + + return &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + }, + Data: map[string][]byte{ + "ACCESS_KEY_ID": []byte("accountName"), + "SECRET_ACCESS_KEY": []byte("accountKey"), + }, + } +} + +func readDefaultFile[T any](t *testing.T, filename string, obj *T) { + t.Helper() + + data, err := os.ReadFile(filepath.Join("..", "..", "..", "deploy", filename)) + if err != nil { + t.Fatal(err) + } + + if err := yaml.Unmarshal(data, obj); err != nil { + t.Fatal(err) + } +} + +func updateResource[T any](cr *T, updateFuncs ...func(cr *T)) *T { + for _, f := range updateFuncs { + f(cr) + } + return cr +} + +func buildFakeClient(t *testing.T, objs ...runtime.Object) client.Client { + t.Helper() + + scheme := runtime.NewScheme() + if err := clientgoscheme.AddToScheme(scheme); err != nil { + t.Fatal(err, "failed to add client-go scheme") + } + if err := apiv1alpha1.AddToScheme(scheme); err != nil { + t.Fatal(err, "failed to add apis scheme") + } + + toClientObj := func(objs []runtime.Object) []client.Object { + cliObjs := make([]client.Object, 0, len(objs)) + for _, obj := range objs { + cliObj, ok := obj.(client.Object) + if ok { + cliObjs = append(cliObjs, cliObj) + } + } + return cliObjs + } + + cl := fake.NewClientBuilder(). + WithScheme(scheme). + WithRuntimeObjects(objs...). + WithStatusSubresource(toClientObj(objs)...). + Build() + + return cl +} + +func reconciler(cl client.Client) *PerconaServerMySQLRestoreReconciler { + return &PerconaServerMySQLRestoreReconciler{ + Client: cl, + Scheme: cl.Scheme(), + NewStorageClient: fakestorage.NewFakeClient, + } +} diff --git a/pkg/controller/psrestore/restorer.go b/pkg/controller/psrestore/restorer.go new file mode 100644 index 000000000..8e6d89c1d --- /dev/null +++ b/pkg/controller/psrestore/restorer.go @@ -0,0 +1,299 @@ +package psrestore + +import ( + "context" + "fmt" + "sort" + "strings" + + "github.com/pkg/errors" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/k8s" + "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage" +) + +type Restorer interface { + Job() (*batchv1.Job, error) + Validate(ctx context.Context) error +} + +type s3 struct { + *restorerOptions +} + +func (s *s3) Validate(ctx context.Context) error { + if storage := s.bcp.Status.Storage; storage != nil && storage.S3 != nil && storage.S3.CredentialsSecret == "" { + // Skip validation if the credentials secret isn't set. + // This allows authentication via IAM roles. + // More info: https://github.com/percona/k8spxc-docs/blob/87f98e6ddae8114474836c0610155d05d3531e03/docs/backups-storage.md?plain=1#L116-L126 + return nil + } + + job, err := s.Job() + if err != nil { + return errors.Wrap(err, "get job") + } + if err := s.validateJob(ctx, job); err != nil { + return errors.Wrap(err, "failed to validate job") + } + if err := s.validateStorage(ctx); err != nil { + return errors.Wrap(err, "failed to validate storage") + } + + return nil +} + +func (s *s3) Job() (*batchv1.Job, error) { + job, err := s.job() + if err != nil { + return nil, err + } + + storage := s.bcp.Status.Storage + if storage == nil || storage.S3 == nil { + return nil, errors.New("s3 storage is not set") + } + if err := xtrabackup.SetStorageS3(job, storage.S3); err != nil { + return nil, errors.Wrap(err, "set storage s3") + } + + return job, nil +} + +var _ Restorer = new(s3) + +type gcs struct { + *restorerOptions +} + +func (g *gcs) Validate(ctx context.Context) error { + job, err := g.Job() + if err != nil { + return errors.Wrap(err, "get job") + } + if err := g.validateJob(ctx, job); err != nil { + return errors.Wrap(err, "failed to validate job") + } + if err := g.validateStorage(ctx); err != nil { + return errors.Wrap(err, "failed to validate storage") + } + return nil +} + +func (g *gcs) Job() (*batchv1.Job, error) { + job, err := g.job() + if err != nil { + return nil, err + } + + storage := g.bcp.Status.Storage + if storage == nil || storage.GCS == nil { + return nil, errors.New("gcs storage is not set") + } + if err := xtrabackup.SetStorageGCS(job, storage.GCS); err != nil { + return nil, errors.Wrap(err, "set storage GCS") + } + + return job, nil +} + +var _ Restorer = new(gcs) + +type azure struct { + *restorerOptions +} + +func (a *azure) Validate(ctx context.Context) error { + job, err := a.Job() + if err != nil { + return errors.Wrap(err, "get job") + } + if err := a.validateJob(ctx, job); err != nil { + return errors.Wrap(err, "failed to validate job") + } + if err := a.validateStorage(ctx); err != nil { + return errors.Wrap(err, "failed to validate storage") + } + return nil +} + +func (a *azure) Job() (*batchv1.Job, error) { + job, err := a.job() + if err != nil { + return nil, err + } + + storage := a.bcp.Status.Storage + if storage == nil || storage.Azure == nil { + return nil, errors.New("azure storage is not set") + } + if err := xtrabackup.SetStorageAzure(job, storage.Azure); err != nil { + return nil, errors.Wrap(err, "set storage Azure") + } + + return job, nil +} + +var _ Restorer = new(azure) + +type restorerOptions struct { + cluster *apiv1alpha1.PerconaServerMySQL + bcp *apiv1alpha1.PerconaServerMySQLBackup + cr *apiv1alpha1.PerconaServerMySQLRestore + scheme *runtime.Scheme + k8sClient client.Client + newStorageClient storage.NewClientFunc + initImage string +} + +func (r *PerconaServerMySQLRestoreReconciler) getRestorer( + ctx context.Context, + cr *apiv1alpha1.PerconaServerMySQLRestore, + cluster *apiv1alpha1.PerconaServerMySQL, +) (Restorer, error) { + initImage, err := k8s.InitImage(ctx, r.Client, cluster, cluster.Spec.Backup) + if err != nil { + return nil, errors.Wrap(err, "get operator image") + } + bcp, err := getBackup(ctx, r.Client, cr, cluster) + if err != nil { + return nil, errors.Wrap(err, "get backup") + } + s := restorerOptions{ + cr: cr, + bcp: bcp, + cluster: cluster, + scheme: r.Scheme, + initImage: initImage, + k8sClient: r.Client, + newStorageClient: r.NewStorageClient, + } + switch bcp.Status.Storage.Type { + case apiv1alpha1.BackupStorageGCS: + sr := gcs{&s} + return &sr, nil + case apiv1alpha1.BackupStorageS3: + sr := s3{&s} + return &sr, nil + case apiv1alpha1.BackupStorageAzure: + sr := azure{&s} + return &sr, nil + } + return nil, errors.Errorf("unknown backup storage type") +} + +func (s *restorerOptions) job() (*batchv1.Job, error) { + pvcName := fmt.Sprintf("%s-%s-mysql-0", mysql.DataVolumeName, s.cluster.Name) + storage := s.bcp.Status.Storage + job := xtrabackup.RestoreJob(s.cluster, s.bcp.Status.Destination, s.cr, storage, s.initImage, pvcName) + if err := controllerutil.SetControllerReference(s.cr, job, s.scheme); err != nil { + return nil, errors.Wrapf(err, "set controller reference to Job %s/%s", job.Namespace, job.Name) + } + return job, nil +} + +func (opts *restorerOptions) validateStorage(ctx context.Context) error { + storageOpts, err := storage.GetOptionsFromBackup(ctx, opts.k8sClient, opts.cluster, opts.bcp) + if err != nil { + return errors.Wrap(err, "failed to get storage options") + } + + storageClient, err := opts.newStorageClient(ctx, storageOpts) + if err != nil { + return errors.Wrap(err, "failed to create s3 client") + } + backupName := opts.bcp.Status.Destination.BackupName() + "/" + objs, err := storageClient.ListObjects(ctx, backupName) + if err != nil { + return errors.Wrap(err, "failed to list objects") + } + if len(objs) == 0 { + return errors.New("backup not found") + } + + return nil +} + +func (opts *restorerOptions) validateJob(ctx context.Context, job *batchv1.Job) error { + cl := opts.k8sClient + + secrets := []string{} + for _, container := range job.Spec.Template.Spec.Containers { + for _, env := range container.Env { + if env.ValueFrom != nil && env.ValueFrom.SecretKeyRef != nil && env.ValueFrom.SecretKeyRef.Name != "" { + secrets = append(secrets, env.ValueFrom.SecretKeyRef.Name) + } + } + } + + notExistingSecrets := make(map[string]struct{}) + for _, secret := range secrets { + err := cl.Get(ctx, types.NamespacedName{ + Name: secret, + Namespace: job.Namespace, + }, new(corev1.Secret)) + if err != nil { + if k8serrors.IsNotFound(err) { + notExistingSecrets[secret] = struct{}{} + continue + } + return err + } + } + if len(notExistingSecrets) > 0 { + secrets := make([]string, 0, len(notExistingSecrets)) + for k := range notExistingSecrets { + secrets = append(secrets, k) + } + sort.StringSlice(secrets).Sort() + return errors.Errorf("secrets %s not found", strings.Join(secrets, ", ")) + } + + return nil +} + +func getBackup(ctx context.Context, cl client.Client, cr *apiv1alpha1.PerconaServerMySQLRestore, cluster *apiv1alpha1.PerconaServerMySQL) (*apiv1alpha1.PerconaServerMySQLBackup, error) { + if cr.Spec.BackupSource != nil { + status := cr.Spec.BackupSource.DeepCopy() + status.State = apiv1alpha1.BackupSucceeded + status.CompletedAt = nil + return &apiv1alpha1.PerconaServerMySQLBackup{ + ObjectMeta: metav1.ObjectMeta{ + Name: cr.Name, + Namespace: cr.Namespace, + }, + Spec: apiv1alpha1.PerconaServerMySQLBackupSpec{ + ClusterName: cr.Spec.ClusterName, + }, + Status: *status, + }, nil + } + if cr.Spec.BackupName == "" { + return nil, errors.New("backupName and backupSource are empty") + } + + backup := &apiv1alpha1.PerconaServerMySQLBackup{} + nn := types.NamespacedName{Name: cr.Spec.BackupName, Namespace: cr.Namespace} + if err := cl.Get(ctx, nn, backup); err != nil { + if k8serrors.IsNotFound(err) { + return nil, errors.Errorf("PerconaServerMySQLBackup %s in namespace %s is not found", nn.Name, nn.Namespace) + } + return nil, errors.Wrapf(err, "get backup %s", nn) + } + storage, ok := cluster.Spec.Backup.Storages[backup.Spec.StorageName] + if ok { + backup.Status.Storage = storage + } + return backup, nil +} diff --git a/pkg/xtrabackup/storage/fake/storage.go b/pkg/xtrabackup/storage/fake/storage.go new file mode 100644 index 000000000..de530651f --- /dev/null +++ b/pkg/xtrabackup/storage/fake/storage.go @@ -0,0 +1,44 @@ +package fake + +import ( + "context" + "errors" + "io" + + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup/storage" +) + +func NewFakeClient(ctx context.Context, opts storage.Options) (storage.Storage, error) { + switch opts := opts.(type) { + case *storage.S3Options: + if opts.BucketName == "" { + return nil, errors.New("bucket name is empty") + } + case *storage.AzureOptions: + if opts.Container == "" { + return nil, errors.New("container name is empty") + } + case *storage.GCSOptions: + if opts.BucketName == "" { + return nil, errors.New("bucket name is empty") + } + } + return &FakeStorageClient{}, nil +} + +type FakeStorageClient struct{} + +func (c *FakeStorageClient) GetObject(ctx context.Context, objectName string) (io.ReadCloser, error) { + return nil, nil +} + +func (c *FakeStorageClient) PutObject(ctx context.Context, name string, data io.Reader, size int64) error { + return nil +} + +func (c *FakeStorageClient) ListObjects(ctx context.Context, prefix string) ([]string, error) { + return nil, nil +} +func (c *FakeStorageClient) DeleteObject(ctx context.Context, objectName string) error { return nil } +func (c *FakeStorageClient) SetPrefix(prefix string) {} +func (c *FakeStorageClient) GetPrefix() string { return "" } diff --git a/pkg/xtrabackup/storage/options.go b/pkg/xtrabackup/storage/options.go new file mode 100644 index 000000000..504c469bd --- /dev/null +++ b/pkg/xtrabackup/storage/options.go @@ -0,0 +1,228 @@ +package storage + +import ( + "context" + + "github.com/pkg/errors" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" +) + +type Options interface { + Type() apiv1alpha1.BackupStorageType +} + +func GetOptionsFromBackupConfig(cfg *xtrabackup.BackupConfig) (Options, error) { + switch cfg.Type { + case apiv1alpha1.BackupStorageAzure: + a := cfg.Azure + return &AzureOptions{ + StorageAccount: a.StorageAccount, + AccessKey: a.AccessKey, + Endpoint: a.EndpointURL, + Container: a.ContainerName, + }, nil + case apiv1alpha1.BackupStorageGCS: + g := cfg.GCS + return &GCSOptions{ + Endpoint: g.EndpointURL, + AccessKeyID: g.AccessKey, + SecretAccessKey: g.SecretKey, + BucketName: g.Bucket, + VerifyTLS: cfg.VerifyTLS, + }, nil + case apiv1alpha1.BackupStorageS3: + s3 := cfg.S3 + return &S3Options{ + Endpoint: s3.EndpointURL, + AccessKeyID: s3.AccessKey, + SecretAccessKey: s3.SecretKey, + BucketName: s3.Bucket, + Region: s3.Region, + VerifyTLS: cfg.VerifyTLS, + }, nil + } + return nil, errors.Errorf("storage type %s is not supported", cfg.Type) +} + +func GetOptionsFromBackup(ctx context.Context, cl client.Client, cluster *apiv1alpha1.PerconaServerMySQL, backup *apiv1alpha1.PerconaServerMySQLBackup) (Options, error) { + switch { + case backup.Status.Storage.S3 != nil: + return getS3Options(ctx, cl, cluster, backup) + case backup.Status.Storage.GCS != nil: + return getGCSOptions(ctx, cl, cluster, backup) + case backup.Status.Storage.Azure != nil: + return getAzureOptions(ctx, cl, backup) + default: + return nil, errors.Errorf("unknown storage type %s", backup.Status.Storage.Type) + } +} + +func getGCSOptions(ctx context.Context, cl client.Client, cluster *apiv1alpha1.PerconaServerMySQL, backup *apiv1alpha1.PerconaServerMySQLBackup) (Options, error) { + secret := new(corev1.Secret) + err := cl.Get(ctx, types.NamespacedName{ + Name: backup.Status.Storage.GCS.CredentialsSecret, + Namespace: backup.Namespace, + }, secret) + if client.IgnoreNotFound(err) != nil { + return nil, errors.Wrap(err, "failed to get secret") + } + accessKeyID := string(secret.Data["AWS_ACCESS_KEY_ID"]) + secretAccessKey := string(secret.Data["AWS_SECRET_ACCESS_KEY"]) + + bucket, prefix := backup.Status.Storage.GCS.BucketAndPrefix() + if bucket == "" { + bucket, prefix = backup.Status.Destination.BucketAndPrefix() + } + + if bucket == "" { + return nil, errors.New("bucket name is not set") + } + + verifyTLS := true + if backup.Status.Storage.VerifyTLS != nil && !*backup.Status.Storage.VerifyTLS { + verifyTLS = false + } + if cluster != nil && cluster.Spec.Backup != nil && len(cluster.Spec.Backup.Storages) > 0 { + storage, ok := cluster.Spec.Backup.Storages[backup.Spec.StorageName] + if ok && storage.VerifyTLS != nil { + verifyTLS = *storage.VerifyTLS + } + } + + return &GCSOptions{ + Endpoint: backup.Status.Storage.GCS.EndpointURL, + AccessKeyID: accessKeyID, + SecretAccessKey: secretAccessKey, + BucketName: bucket, + Prefix: prefix, + VerifyTLS: verifyTLS, + }, nil +} + +func getAzureOptions(ctx context.Context, cl client.Client, backup *apiv1alpha1.PerconaServerMySQLBackup) (*AzureOptions, error) { + secret := new(corev1.Secret) + err := cl.Get(ctx, types.NamespacedName{ + Name: backup.Status.Storage.Azure.CredentialsSecret, + Namespace: backup.Namespace, + }, secret) + if err != nil { + return nil, errors.Wrap(err, "failed to get secret") + } + accountName := string(secret.Data["AZURE_STORAGE_ACCOUNT_NAME"]) + accountKey := string(secret.Data["AZURE_STORAGE_ACCOUNT_KEY"]) + + container, prefix := backup.Status.Storage.Azure.ContainerAndPrefix() + if container == "" { + container, prefix = backup.Status.Destination.BucketAndPrefix() + } + + if container == "" { + return nil, errors.New("container name is not set") + } + + return &AzureOptions{ + StorageAccount: accountName, + AccessKey: accountKey, + Endpoint: backup.Status.Storage.Azure.EndpointURL, + Container: container, + Prefix: prefix, + }, nil +} + +func getS3Options(ctx context.Context, cl client.Client, cluster *apiv1alpha1.PerconaServerMySQL, backup *apiv1alpha1.PerconaServerMySQLBackup) (*S3Options, error) { + secret := new(corev1.Secret) + err := cl.Get(ctx, types.NamespacedName{ + Name: backup.Status.Storage.S3.CredentialsSecret, + Namespace: backup.Namespace, + }, secret) + if client.IgnoreNotFound(err) != nil { + return nil, errors.Wrap(err, "failed to get secret") + } + accessKeyID := string(secret.Data["AWS_ACCESS_KEY_ID"]) + secretAccessKey := string(secret.Data["AWS_SECRET_ACCESS_KEY"]) + + bucket, prefix := backup.Status.Storage.S3.BucketAndPrefix() + if bucket == "" { + bucket, prefix = backup.Status.Destination.BucketAndPrefix() + } + + if bucket == "" { + return nil, errors.New("bucket name is not set") + } + + region := backup.Status.Storage.S3.Region + if region == "" { + region = "us-east-1" + } + + verifyTLS := true + if backup.Status.Storage.VerifyTLS != nil && !*backup.Status.Storage.VerifyTLS { + verifyTLS = false + } + if cluster != nil && cluster.Spec.Backup != nil && len(cluster.Spec.Backup.Storages) > 0 { + storage, ok := cluster.Spec.Backup.Storages[backup.Spec.StorageName] + if ok && storage.VerifyTLS != nil { + verifyTLS = *storage.VerifyTLS + } + } + + return &S3Options{ + Endpoint: backup.Status.Storage.S3.EndpointURL, + AccessKeyID: accessKeyID, + SecretAccessKey: secretAccessKey, + BucketName: bucket, + Prefix: prefix, + Region: region, + VerifyTLS: verifyTLS, + }, nil +} + +var _ = Options(new(S3Options)) + +type S3Options struct { + Endpoint string + AccessKeyID string + SecretAccessKey string + BucketName string + Prefix string + Region string + VerifyTLS bool +} + +func (o *S3Options) Type() apiv1alpha1.BackupStorageType { + return apiv1alpha1.BackupStorageS3 +} + +var _ = Options(new(GCSOptions)) + +type GCSOptions struct { + Endpoint string + AccessKeyID string + SecretAccessKey string + BucketName string + Prefix string + VerifyTLS bool +} + +func (o *GCSOptions) Type() apiv1alpha1.BackupStorageType { + return apiv1alpha1.BackupStorageGCS +} + +var _ = Options(new(AzureOptions)) + +type AzureOptions struct { + StorageAccount string + AccessKey string + Endpoint string + Container string + Prefix string +} + +func (o *AzureOptions) Type() apiv1alpha1.BackupStorageType { + return apiv1alpha1.BackupStorageAzure +} diff --git a/pkg/xtrabackup/storage/storage.go b/pkg/xtrabackup/storage/storage.go new file mode 100644 index 000000000..29e6c199a --- /dev/null +++ b/pkg/xtrabackup/storage/storage.go @@ -0,0 +1,293 @@ +package storage + +import ( + "context" + "crypto/tls" + "fmt" + "io" + "net/http" + "path" + "strings" + + "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" + "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror" + "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container" + "github.com/minio/minio-go/v7" + "github.com/minio/minio-go/v7/pkg/credentials" + "github.com/pkg/errors" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" +) + +var ErrObjectNotFound = errors.New("object not found") + +type Storage interface { + GetObject(ctx context.Context, objectName string) (io.ReadCloser, error) + PutObject(ctx context.Context, name string, data io.Reader, size int64) error + ListObjects(ctx context.Context, prefix string) ([]string, error) + DeleteObject(ctx context.Context, objectName string) error + SetPrefix(prefix string) + GetPrefix() string +} + +type NewClientFunc func(context.Context, Options) (Storage, error) + +func NewClient(ctx context.Context, opts Options) (Storage, error) { + switch opts.Type() { + case apiv1alpha1.BackupStorageS3: + opts, ok := opts.(*S3Options) + if !ok { + return nil, errors.New("invalid options type") + } + return NewS3(ctx, opts.Endpoint, opts.AccessKeyID, opts.SecretAccessKey, opts.BucketName, opts.Prefix, opts.Region, opts.VerifyTLS) + case apiv1alpha1.BackupStorageGCS: + opts, ok := opts.(*GCSOptions) + if !ok { + return nil, errors.New("invalid options type") + } + return NewGCS(ctx, opts.Endpoint, opts.AccessKeyID, opts.SecretAccessKey, opts.BucketName, opts.Prefix, opts.VerifyTLS) + case apiv1alpha1.BackupStorageAzure: + opts, ok := opts.(*AzureOptions) + if !ok { + return nil, errors.New("invalid options type") + } + return NewAzure(opts.StorageAccount, opts.AccessKey, opts.Endpoint, opts.Container, opts.Prefix) + } + return nil, errors.New("invalid storage type") +} + +// S3 is a type for working with S3 storages +type S3 struct { + client *minio.Client // minio client for work with storage + bucketName string // S3 bucket name where binlogs will be stored + prefix string // prefix for S3 requests +} + +// NewGCS return new Manager, useSSL using ssl for connection with storage +func NewGCS(ctx context.Context, endpoint, accessKeyID, secretAccessKey, bucketName, prefix string, verifyTLS bool) (Storage, error) { + if endpoint == "" { + endpoint = "https://storage.googleapis.com" + } + region := "" + return NewS3(ctx, endpoint, accessKeyID, secretAccessKey, bucketName, prefix, region, verifyTLS) +} + +// NewS3 return new Manager, useSSL using ssl for connection with storage +func NewS3(ctx context.Context, endpoint, accessKeyID, secretAccessKey, bucketName, prefix, region string, verifyTLS bool) (Storage, error) { + if endpoint == "" { + endpoint = "https://s3.amazonaws.com" + // We can't use default endpoint if region is not us-east-1 + // More info: https://docs.aws.amazon.com/general/latest/gr/s3.html + if region != "" && region != "us-east-1" { + endpoint = fmt.Sprintf("https://s3.%s.amazonaws.com", region) + } + } + useSSL := strings.Contains(endpoint, "https") + endpoint = strings.TrimPrefix(strings.TrimPrefix(endpoint, "https://"), "http://") + transport := http.DefaultTransport + transport.(*http.Transport).TLSClientConfig = &tls.Config{ + InsecureSkipVerify: !verifyTLS, + } + minioClient, err := minio.New(strings.TrimRight(endpoint, "/"), &minio.Options{ + Creds: credentials.NewStaticV4(accessKeyID, secretAccessKey, ""), + Secure: useSSL, + Region: region, + Transport: transport, + }) + if err != nil { + return nil, errors.Wrap(err, "new minio client") + } + + bucketExists, err := minioClient.BucketExists(ctx, bucketName) + if err != nil { + if merr, ok := err.(minio.ErrorResponse); ok && merr.Code == "301 Moved Permanently" { + return nil, errors.Errorf("%s region: %s bucket: %s", merr.Code, merr.Region, merr.BucketName) + } + return nil, errors.Wrap(err, "failed to check if bucket exists") + } + if !bucketExists { + return nil, errors.Errorf("bucket %s does not exist", bucketName) + } + + return &S3{ + client: minioClient, + bucketName: bucketName, + prefix: prefix, + }, nil +} + +// GetObject return content by given object name +func (s *S3) GetObject(ctx context.Context, objectName string) (io.ReadCloser, error) { + objPath := path.Join(s.prefix, objectName) + oldObj, err := s.client.GetObject(ctx, s.bucketName, objPath, minio.GetObjectOptions{}) + if err != nil { + return nil, errors.Wrapf(err, "get object %s", objPath) + } + + // minio client returns error only on Read() method, so we need to call it to see if object exists + _, err = oldObj.Read([]byte{}) + if err != nil { + if minio.ToErrorResponse(errors.Cause(err)).Code == "NoSuchKey" { + return nil, ErrObjectNotFound + } + return nil, errors.Wrapf(err, "read object %s", objPath) + } + + _, err = oldObj.Seek(0, 0) + if err != nil { + return nil, errors.Wrapf(err, "seek object %s", objPath) + } + + return oldObj, nil +} + +// PutObject puts new object to storage with given name and content +func (s *S3) PutObject(ctx context.Context, name string, data io.Reader, size int64) error { + objPath := path.Join(s.prefix, name) + _, err := s.client.PutObject(ctx, s.bucketName, objPath, data, size, minio.PutObjectOptions{}) + if err != nil { + return errors.Wrapf(err, "put object %s", objPath) + } + + return nil +} + +func (s *S3) ListObjects(ctx context.Context, prefix string) ([]string, error) { + opts := minio.ListObjectsOptions{ + UseV1: true, + Recursive: true, + Prefix: s.prefix + prefix, + } + list := []string{} + + var err error + for object := range s.client.ListObjects(ctx, s.bucketName, opts) { + // From `(c *Client) ListObjects` method docs: + // `caller must drain the channel entirely and wait until channel is closed before proceeding, + // without waiting on the channel to be closed completely you might leak goroutines` + // So we should save the error and drain the channel. + if err != nil { + continue + } + if object.Err != nil { + err = errors.Wrapf(object.Err, "list object %s", object.Key) + } + list = append(list, strings.TrimPrefix(object.Key, s.prefix)) + } + if err != nil { + return nil, err + } + + return list, nil +} + +func (s *S3) SetPrefix(prefix string) { + s.prefix = prefix +} + +func (s *S3) GetPrefix() string { + return s.prefix +} + +func (s *S3) DeleteObject(ctx context.Context, objectName string) error { + objPath := path.Join(s.prefix, objectName) + err := s.client.RemoveObject(ctx, s.bucketName, objPath, minio.RemoveObjectOptions{}) + if err != nil { + if minio.ToErrorResponse(errors.Cause(err)).Code == "NoSuchKey" { + return ErrObjectNotFound + } + return errors.Wrapf(err, "failed to remove object %s", objectName) + } + return nil +} + +// Azure is a type for working with Azure Blob storages +type Azure struct { + client *azblob.Client // azure client for work with storage + container string + prefix string +} + +func NewAzure(storageAccount, accessKey, endpoint, container, prefix string) (Storage, error) { + credential, err := azblob.NewSharedKeyCredential(storageAccount, accessKey) + if err != nil { + return nil, errors.Wrap(err, "new credentials") + } + if endpoint == "" { + endpoint = fmt.Sprintf("https://%s.blob.core.windows.net/", storageAccount) + } + cli, err := azblob.NewClientWithSharedKeyCredential(endpoint, credential, nil) + if err != nil { + return nil, errors.Wrap(err, "new client") + } + + return &Azure{ + client: cli, + container: container, + prefix: prefix, + }, nil +} + +func (a *Azure) GetObject(ctx context.Context, name string) (io.ReadCloser, error) { + objPath := path.Join(a.prefix, name) + resp, err := a.client.DownloadStream(ctx, a.container, objPath, &azblob.DownloadStreamOptions{}) + if err != nil { + if bloberror.HasCode(errors.Cause(err), bloberror.BlobNotFound) { + return nil, ErrObjectNotFound + } + return nil, errors.Wrapf(err, "download stream: %s", objPath) + } + return resp.Body, nil +} + +func (a *Azure) PutObject(ctx context.Context, name string, data io.Reader, _ int64) error { + objPath := path.Join(a.prefix, name) + _, err := a.client.UploadStream(ctx, a.container, objPath, data, nil) + if err != nil { + return errors.Wrapf(err, "upload stream: %s", objPath) + } + return nil +} + +func (a *Azure) ListObjects(ctx context.Context, prefix string) ([]string, error) { + listPrefix := path.Join(a.prefix, prefix) + "/" + pg := a.client.NewListBlobsFlatPager(a.container, &container.ListBlobsFlatOptions{ + Prefix: &listPrefix, + }) + var blobs []string + for pg.More() { + resp, err := pg.NextPage(ctx) + if err != nil { + return nil, errors.Wrapf(err, "next page: %s", prefix) + } + if resp.Segment != nil { + for _, item := range resp.Segment.BlobItems { + if item != nil && item.Name != nil { + name := strings.TrimPrefix(*item.Name, a.prefix) + blobs = append(blobs, name) + } + } + } + } + return blobs, nil +} + +func (a *Azure) SetPrefix(prefix string) { + a.prefix = prefix +} + +func (a *Azure) GetPrefix() string { + return a.prefix +} + +func (a *Azure) DeleteObject(ctx context.Context, objectName string) error { + objPath := path.Join(a.prefix, objectName) + _, err := a.client.DeleteBlob(ctx, a.container, objPath, nil) + if err != nil { + if bloberror.HasCode(errors.Cause(err), bloberror.BlobNotFound) { + return ErrObjectNotFound + } + return errors.Wrapf(err, "delete blob %s", objPath) + } + return nil +} diff --git a/pkg/xtrabackup/xtrabackup.go b/pkg/xtrabackup/xtrabackup.go index 9b0b758a5..f86c347fd 100644 --- a/pkg/xtrabackup/xtrabackup.go +++ b/pkg/xtrabackup/xtrabackup.go @@ -3,7 +3,6 @@ package xtrabackup import ( "fmt" "strconv" - "strings" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -66,7 +65,7 @@ func MatchLabels(cluster *apiv1alpha1.PerconaServerMySQL) map[string]string { func Job( cluster *apiv1alpha1.PerconaServerMySQL, cr *apiv1alpha1.PerconaServerMySQLBackup, - destination, initImage string, + destination apiv1alpha1.BackupDestination, initImage string, storage *apiv1alpha1.BackupStorageSpec, ) *batchv1.Job { var one int32 = 1 @@ -156,7 +155,7 @@ func Job( } } -func xtrabackupContainer(cluster *apiv1alpha1.PerconaServerMySQL, backupName, destination string, storage *apiv1alpha1.BackupStorageSpec) corev1.Container { +func xtrabackupContainer(cluster *apiv1alpha1.PerconaServerMySQL, backupName string, destination apiv1alpha1.BackupDestination, storage *apiv1alpha1.BackupStorageSpec) corev1.Container { spec := cluster.Spec.Backup verifyTLS := true @@ -175,7 +174,7 @@ func xtrabackupContainer(cluster *apiv1alpha1.PerconaServerMySQL, backupName, de }, { Name: "BACKUP_DEST", - Value: destination, + Value: destination.PathWithoutBucket(), }, { Name: "VERIFY_TLS", @@ -289,7 +288,7 @@ func deleteContainer(image string, conf *BackupConfig, storage *apiv1alpha1.Back func RestoreJob( cluster *apiv1alpha1.PerconaServerMySQL, - destination string, + destination apiv1alpha1.BackupDestination, restore *apiv1alpha1.PerconaServerMySQLRestore, storage *apiv1alpha1.BackupStorageSpec, initImage string, @@ -299,15 +298,6 @@ func RestoreJob( labels := util.SSMapMerge(storage.Labels, MatchLabels(cluster)) - switch storage.Type { - case apiv1alpha1.BackupStorageAzure: - destination = strings.TrimPrefix(destination, string(storage.Azure.ContainerName)+"/") - case apiv1alpha1.BackupStorageS3: - destination = strings.TrimPrefix(destination, "s3://"+string(storage.S3.Bucket)+"/") - case apiv1alpha1.BackupStorageGCS: - destination = strings.TrimPrefix(destination, "gs://"+string(storage.GCS.Bucket)+"/") - } - return &batchv1.Job{ TypeMeta: metav1.TypeMeta{ APIVersion: "batch/v1", @@ -462,7 +452,7 @@ func GetDeleteJob(cr *apiv1alpha1.PerconaServerMySQLBackup, conf *BackupConfig) } } -func restoreContainer(cluster *apiv1alpha1.PerconaServerMySQL, restore *apiv1alpha1.PerconaServerMySQLRestore, destination string, storage *apiv1alpha1.BackupStorageSpec) corev1.Container { +func restoreContainer(cluster *apiv1alpha1.PerconaServerMySQL, restore *apiv1alpha1.PerconaServerMySQLRestore, destination apiv1alpha1.BackupDestination, storage *apiv1alpha1.BackupStorageSpec) corev1.Container { spec := cluster.Spec.Backup verifyTLS := true @@ -481,7 +471,7 @@ func restoreContainer(cluster *apiv1alpha1.PerconaServerMySQL, restore *apiv1alp }, { Name: "BACKUP_DEST", - Value: destination, + Value: destination.PathWithoutBucket(), }, { Name: "VERIFY_TLS", @@ -555,7 +545,7 @@ func SetStoragePVC(job *batchv1.Job, pvc *corev1.PersistentVolumeClaim) error { func SetStorageS3(job *batchv1.Job, s3 *apiv1alpha1.BackupStorageS3Spec) error { spec := &job.Spec.Template.Spec - bucket := s3.Bucket.Bucket() + bucket, _ := s3.BucketAndPrefix() env := []corev1.EnvVar{ { @@ -607,7 +597,7 @@ func SetStorageS3(job *batchv1.Job, s3 *apiv1alpha1.BackupStorageS3Spec) error { func SetStorageGCS(job *batchv1.Job, gcs *apiv1alpha1.BackupStorageGCSSpec) error { spec := &job.Spec.Template.Spec - bucket := gcs.Bucket.Bucket() + bucket, _ := gcs.BucketAndPrefix() env := []corev1.EnvVar{ { @@ -655,7 +645,7 @@ func SetStorageGCS(job *batchv1.Job, gcs *apiv1alpha1.BackupStorageGCSSpec) erro func SetStorageAzure(job *batchv1.Job, azure *apiv1alpha1.BackupStorageAzureSpec) error { spec := &job.Spec.Template.Spec - container := azure.ContainerName.Bucket() + container, _ := azure.ContainerAndPrefix() env := []corev1.EnvVar{ { From ff1a4770d67866e2195ba3a76f16b26a9c2f390d Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Fri, 1 Mar 2024 14:47:10 +0100 Subject: [PATCH 101/192] K8SPS-295: Improve error status (#543) * Add status.messages and append condition on reconcile error. * Remove redundant checks from status update. * Add TestReconcileErrorStatus test. * Minor update. * Update TestReconcileStatusAsync test. * Remove unnecessary comment. * Remove status.messages field and properly add condition for all statuses. * Improve tests. * Revert cr.yaml changes. * Have proper type and reason for conditions. * Update e2e tests and remove error condition if the error is resolved. * Set ready/initializing condition status correctrly. * Fix unit tests. * Refactor * Update CONTRIBUTING.md --------- Co-authored-by: Viacheslav Sarzhan --- CONTRIBUTING.md | 1 + api/v1alpha1/perconaservermysql_types.go | 6 + .../gr-demand-backup-haproxy/02-assert.yaml | 6 + .../tests/gr-demand-backup/02-assert.yaml | 6 + .../gr-ignore-annotations/01-assert.yaml | 6 + .../gr-ignore-annotations/03-assert.yaml | 6 + pkg/controller/ps/controller.go | 8 +- pkg/controller/ps/status.go | 53 ++- pkg/controller/ps/status_test.go | 338 +++++++++++++++--- pkg/controller/ps/tls.go | 1 + pkg/k8s/utils.go | 5 + 11 files changed, 383 insertions(+), 53 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5adaf48eb..08b9ff9f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -176,6 +176,7 @@ Starting from the version 0.6.0 you can run the Operator on your system without When you have kubectl on your system set up and configured to control a Kubernetes cluster, you can run the Operator locally as follows: 1. Export `WATCH_NAMESPACE=` environment variable to let the Operator know which Kubernetes namespace it should work with +1. Export `OPERATOR_NAMESPACE=` environment variable to tell the Operator in which namespace it is running 2. Uncomment the `initImage` key in your `deploy/cr.yaml` 3. Execute `make install` command to have the runnable local version of the Operator 4. Execute `make run` to actually run it diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 687157442..3334a1f2e 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -28,6 +28,8 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/version" + "golang.org/x/text/cases" + "golang.org/x/text/language" "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" @@ -403,6 +405,10 @@ type ServiceExposeTogglable struct { type StatefulAppState string +func (s StatefulAppState) String() string { + return cases.Title(language.English).String(string(s)) +} + const ( StateInitializing StatefulAppState = "initializing" StateStopping StatefulAppState = "stopping" diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml index ccac3e744..0fcefe221 100644 --- a/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup-haproxy/02-assert.yaml @@ -32,6 +32,12 @@ metadata: name: gr-demand-backup-haproxy status: conditions: + - reason: Initializing + status: "False" + type: Initializing + - reason: Ready + status: "True" + type: Ready - message: InnoDB cluster successfully bootstrapped with 3 nodes reason: InnoDBClusterBootstrapped status: "True" diff --git a/e2e-tests/tests/gr-demand-backup/02-assert.yaml b/e2e-tests/tests/gr-demand-backup/02-assert.yaml index 977da5b4b..73a6e7ceb 100644 --- a/e2e-tests/tests/gr-demand-backup/02-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup/02-assert.yaml @@ -34,6 +34,12 @@ spec: backoffLimit: 3 status: conditions: + - reason: Initializing + status: "False" + type: Initializing + - reason: Ready + status: "True" + type: Ready - message: InnoDB cluster successfully bootstrapped with 3 nodes reason: InnoDBClusterBootstrapped status: "True" diff --git a/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml index eae064fbb..e0f2aad0e 100644 --- a/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/01-assert.yaml @@ -30,6 +30,12 @@ metadata: name: gr-ignore-annotations status: conditions: + - reason: Initializing + status: "False" + type: Initializing + - reason: Ready + status: "True" + type: Ready - message: InnoDB cluster successfully bootstrapped with 3 nodes reason: InnoDBClusterBootstrapped status: "True" diff --git a/e2e-tests/tests/gr-ignore-annotations/03-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/03-assert.yaml index 36c737a76..8be2bf5a7 100644 --- a/e2e-tests/tests/gr-ignore-annotations/03-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/03-assert.yaml @@ -15,6 +15,12 @@ spec: - gr-labels-to-ignore-router status: conditions: + - reason: Initializing + status: "False" + type: Initializing + - reason: Ready + status: "True" + type: Ready - message: InnoDB cluster successfully bootstrapped with 3 nodes reason: InnoDBClusterBootstrapped status: "True" diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 7536108c9..21c48c17f 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -97,13 +97,15 @@ func (r *PerconaServerMySQLReconciler) Reconcile( rr := ctrl.Result{RequeueAfter: 5 * time.Second} var cr *apiv1alpha1.PerconaServerMySQL + var err error + defer func() { - if err := r.reconcileCRStatus(ctx, cr); err != nil { + if err := r.reconcileCRStatus(ctx, cr, err); err != nil { log.Error(err, "failed to update status") } }() - cr, err := k8s.GetCRWithDefaults(ctx, r.Client, req.NamespacedName, r.ServerVersion) + cr, err = k8s.GetCRWithDefaults(ctx, r.Client, req.NamespacedName, r.ServerVersion) if err != nil { if k8serrors.IsNotFound(err) { return ctrl.Result{}, nil @@ -116,7 +118,7 @@ func (r *PerconaServerMySQLReconciler) Reconcile( return rr, r.applyFinalizers(ctx, cr) } - if err := r.doReconcile(ctx, cr); err != nil { + if err = r.doReconcile(ctx, cr); err != nil { return rr, errors.Wrap(err, "reconcile") } diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index 82db138a1..d4b5054d7 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -9,6 +9,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" @@ -26,17 +27,38 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/router" ) -func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { - if cr == nil || cr.ObjectMeta.DeletionTimestamp != nil { - return nil +func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL, reconcileErr error) error { + clusterCondition := metav1.Condition{ + Status: metav1.ConditionTrue, + Type: apiv1alpha1.StateInitializing.String(), + LastTransitionTime: metav1.Now(), } - if err := cr.CheckNSetDefaults(ctx, r.ServerVersion); err != nil { - cr.Status.State = apiv1alpha1.StateError + + if reconcileErr != nil { + if cr.Status.State != apiv1alpha1.StateError { + clusterCondition.Type = apiv1alpha1.StateError.String() + clusterCondition.Reason = "ErrorReconcile" + clusterCondition.Message = reconcileErr.Error() + + meta.SetStatusCondition(&cr.Status.Conditions, clusterCondition) + + cr.Status.State = apiv1alpha1.StateError + } + nn := types.NamespacedName{Name: cr.Name, Namespace: cr.Namespace} return writeStatus(ctx, r.Client, nn, cr.Status) } + + if cr.Status.Conditions != nil { + meta.RemoveStatusCondition(&cr.Status.Conditions, apiv1alpha1.StateError.String()) + } + log := logf.FromContext(ctx).WithName("reconcileCRStatus") + if cr == nil || cr.ObjectMeta.DeletionTimestamp != nil { + return nil + } + mysqlStatus, err := r.appStatus(ctx, cr, mysql.Name(cr), cr.MySQLSpec().Size, mysql.MatchLabels(cr), cr.Status.MySQL.Version) if err != nil { return errors.Wrap(err, "get MySQL status") @@ -128,7 +150,14 @@ func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr } if fullClusterCrash { + clusterCondition.Type = apiv1alpha1.StateError.String() + clusterCondition.Reason = "FullClusterCrashDetected" + clusterCondition.Message = "Full cluster crash detected" + + meta.SetStatusCondition(&cr.Status.Conditions, clusterCondition) + cr.Status.State = apiv1alpha1.StateError + r.Recorder.Event(cr, "Warning", "FullClusterCrashDetected", "Full cluster crash detected") } } @@ -147,8 +176,18 @@ func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr cr.Status.State = apiv1alpha1.StateInitializing } - if err := r.checkTLSIssuer(ctx, cr); err != nil { - cr.Status.State = apiv1alpha1.StateError + switch cr.Status.State { + case apiv1alpha1.StateInitializing, apiv1alpha1.StateReady: + for _, appState := range []apiv1alpha1.StatefulAppState{apiv1alpha1.StateInitializing, apiv1alpha1.StateReady} { + clusterCondition.Type = appState.String() + clusterCondition.Reason = appState.String() + if cr.Status.State == appState { + clusterCondition.Status = metav1.ConditionTrue + } else { + clusterCondition.Status = metav1.ConditionFalse + } + meta.SetStatusCondition(&cr.Status.Conditions, clusterCondition) + } } log.V(1).Info( diff --git a/pkg/controller/ps/status_test.go b/pkg/controller/ps/status_test.go index 6ab78ab00..b604f631f 100644 --- a/pkg/controller/ps/status_test.go +++ b/pkg/controller/ps/status_test.go @@ -10,8 +10,9 @@ import ( "reflect" "testing" - cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" "github.com/gocarina/gocsv" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -81,6 +82,18 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -103,6 +116,18 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -131,40 +156,18 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateReady, Host: cr.Name + "-haproxy." + cr.Namespace, - }, - }, - { - name: "with all ready pods and invalid issuer", - cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQL) { - cr.Spec.TLS = &apiv1alpha1.TLSSpec{ - IssuerConf: &cmmeta.ObjectReference{ - Name: "invalid-issuer", + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateReady.String(), }, - } - }), - objects: appendSlices( - makeFakeReadyPods(cr, 3, "mysql"), - makeFakeReadyPods(cr, 3, "haproxy"), - makeFakeReadyPods(cr, 3, "orchestrator"), - ), - expected: apiv1alpha1.PerconaServerMySQLStatus{ - MySQL: apiv1alpha1.StatefulAppStatus{ - Size: 3, - Ready: 3, - State: apiv1alpha1.StateReady, - }, - Orchestrator: apiv1alpha1.StatefulAppStatus{ - Size: 3, - Ready: 3, - State: apiv1alpha1.StateReady, - }, - HAProxy: apiv1alpha1.StatefulAppStatus{ - Size: 3, - Ready: 3, - State: apiv1alpha1.StateReady, }, - State: apiv1alpha1.StateError, - Host: cr.Name + "-haproxy." + cr.Namespace, }, }, { @@ -211,6 +214,18 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -251,6 +266,18 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateReady, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -279,6 +306,18 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateReady, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -305,9 +344,22 @@ func TestReconcileStatusAsync(t *testing.T) { }, State: apiv1alpha1.StateReady, Host: cr.Name + "-mysql." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, } + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cr := tt.cr.DeepCopy() @@ -320,15 +372,17 @@ func TestReconcileStatusAsync(t *testing.T) { Platform: platform.PlatformKubernetes, }, } - err := r.reconcileCRStatus(ctx, cr) + err := r.reconcileCRStatus(ctx, cr, nil) if err != nil { t.Fatal(err) } if err := r.Get(ctx, types.NamespacedName{Namespace: cr.Namespace, Name: cr.Name}, cr); err != nil { t.Fatal(err) } - if !reflect.DeepEqual(cr.Status, tt.expected) { - t.Errorf("expected status %v, got %v", tt.expected, cr.Status) + + opt := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime", "Message") + if diff := cmp.Diff(cr.Status, tt.expected, opt); diff != "" { + t.Errorf("expected status %v, got %v, diff: %s", tt.expected, cr.Status, diff) } }) } @@ -388,6 +442,18 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -411,6 +477,18 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { }, State: apiv1alpha1.StateReady, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOnline, @@ -439,6 +517,18 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOnline, @@ -468,6 +558,18 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOffline, @@ -496,6 +598,18 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-haproxy." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOnline, @@ -522,15 +636,17 @@ func TestReconcileStatusHAProxyGR(t *testing.T) { Recorder: new(record.FakeRecorder), } - err = r.reconcileCRStatus(ctx, cr) + err = r.reconcileCRStatus(ctx, cr, nil) if err != nil { t.Fatal(err) } if err := r.Get(ctx, types.NamespacedName{Namespace: cr.Namespace, Name: cr.Name}, cr); err != nil { t.Fatal(err) } - if !reflect.DeepEqual(cr.Status, tt.expected) { - t.Errorf("expected status %v, got %v", tt.expected, cr.Status) + + opt := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime", "Message") + if diff := cmp.Diff(cr.Status, tt.expected, opt); diff != "" { + t.Errorf("expected status %v, got %v, diff: %s", tt.expected, cr.Status, diff) } }) } @@ -590,6 +706,18 @@ func TestReconcileStatusRouterGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-router." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, }, { @@ -613,6 +741,18 @@ func TestReconcileStatusRouterGR(t *testing.T) { }, State: apiv1alpha1.StateReady, Host: cr.Name + "-router." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOnline, @@ -640,7 +780,19 @@ func TestReconcileStatusRouterGR(t *testing.T) { State: apiv1alpha1.StateReady, }, State: apiv1alpha1.StateInitializing, - Host: cr.Name + "-router." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, + Host: cr.Name + "-router." + cr.Namespace, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOnline, @@ -670,6 +822,18 @@ func TestReconcileStatusRouterGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-router." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOffline, @@ -698,6 +862,18 @@ func TestReconcileStatusRouterGR(t *testing.T) { }, State: apiv1alpha1.StateInitializing, Host: cr.Name + "-router." + cr.Namespace, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateInitializing.String(), + Status: metav1.ConditionTrue, + Reason: apiv1alpha1.StateInitializing.String(), + }, + { + Type: apiv1alpha1.StateReady.String(), + Status: metav1.ConditionFalse, + Reason: apiv1alpha1.StateReady.String(), + }, + }, }, mysqlMemberStates: []innodbcluster.MemberState{ innodbcluster.MemberStateOnline, @@ -724,20 +900,96 @@ func TestReconcileStatusRouterGR(t *testing.T) { Recorder: new(record.FakeRecorder), } - err = r.reconcileCRStatus(ctx, cr) + err = r.reconcileCRStatus(ctx, cr, nil) if err != nil { t.Fatal(err) } if err := r.Get(ctx, types.NamespacedName{Namespace: cr.Namespace, Name: cr.Name}, cr); err != nil { t.Fatal(err) } - if !reflect.DeepEqual(cr.Status, tt.expected) { - t.Errorf("expected status %v, got %v", tt.expected, cr.Status) + + opt := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime", "Message") + if diff := cmp.Diff(cr.Status, tt.expected, opt); diff != "" { + t.Errorf("expected status %v, got %v, diff: %s", tt.expected, cr.Status, diff) } }) } } +func TestReconcileErrorStatus(t *testing.T) { + ctx := context.Background() + + cr, err := readDefaultCR("cluster1", "status-err") + if err != nil { + t.Fatal(err) + } + cr.Spec.MySQL.ClusterType = apiv1alpha1.ClusterTypeAsync + cr.Spec.UpdateStrategy = appsv1.OnDeleteStatefulSetStrategyType + + scheme := runtime.NewScheme() + err = clientgoscheme.AddToScheme(scheme) + if err != nil { + t.Fatal(err) + } + err = apiv1alpha1.AddToScheme(scheme) + if err != nil { + t.Fatal(err) + } + + objects := appendSlices( + makeFakeReadyPods(cr, 3, "mysql"), + makeFakeReadyPods(cr, 3, "haproxy"), + makeFakeReadyPods(cr, 3, "orchestrator"), + ) + + cb := fake.NewClientBuilder(). + WithScheme(scheme). + WithObjects(cr). + WithStatusSubresource(cr). + WithObjects(objects...). + WithStatusSubresource(objects...) + + r := &PerconaServerMySQLReconciler{ + Client: cb.Build(), + Scheme: scheme, + ServerVersion: &platform.ServerVersion{ + Platform: platform.PlatformKubernetes, + }, + } + + reconcileErr := errors.New("reconcile error") + + err = r.reconcileCRStatus(ctx, cr, reconcileErr) + if err != nil { + t.Fatal(err) + } + + if err := r.Get(ctx, types.NamespacedName{Namespace: cr.Namespace, Name: cr.Name}, cr); err != nil { + t.Fatal(err) + } + + expected := apiv1alpha1.PerconaServerMySQLStatus{ + State: apiv1alpha1.StateError, + Conditions: []metav1.Condition{ + { + Type: apiv1alpha1.StateError.String(), + Status: metav1.ConditionTrue, + Reason: "ErrorReconcile", + Message: reconcileErr.Error(), + }, + }, + } + + opt := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime") + if diff := cmp.Diff(cr.Status.Conditions, expected.Conditions, opt); diff != "" { + t.Errorf("unexpected conditions (-want +got):\n%s", diff) + } + + if diff := cmp.Diff(cr.Status.State, expected.State); diff != "" { + t.Errorf("unexpected state (-want +got):\n%s", diff) + } +} + type fakeClient struct { scripts []fakeClientScript execCount int diff --git a/pkg/controller/ps/tls.go b/pkg/controller/ps/tls.go index 4dd9e7841..55a972cc0 100644 --- a/pkg/controller/ps/tls.go +++ b/pkg/controller/ps/tls.go @@ -40,6 +40,7 @@ func (r *PerconaServerMySQLReconciler) ensureTLSSecret(ctx context.Context, cr * return nil } + func (r *PerconaServerMySQLReconciler) checkTLSIssuer(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { if cr.Spec.TLS == nil || cr.Spec.TLS.IssuerConf == nil { return nil diff --git a/pkg/k8s/utils.go b/pkg/k8s/utils.go index 6a08188dd..45f8fc5cb 100644 --- a/pkg/k8s/utils.go +++ b/pkg/k8s/utils.go @@ -40,6 +40,11 @@ func GetWatchNamespace() (string, error) { // GetOperatorNamespace returns the namespace of the operator pod func GetOperatorNamespace() (string, error) { + ns, found := os.LookupEnv("OPERATOR_NAMESPACE") + if found { + return ns, nil + } + nsBytes, err := os.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace") if err != nil { return "", err From 89e33bbf703941c7dea710f4a0d03a770a41ca3e Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Tue, 5 Mar 2024 10:28:11 +0200 Subject: [PATCH 102/192] K8SPS-332 add multi architecture build support (#578) * K8SPS-332 add multi architecture build support * Update e2e-tests/build Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix gr-init-deploy test --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/scan.yml | 45 +++++++++++++++++++++++++++++++---- Jenkinsfile | 4 ++-- build/Dockerfile | 22 +---------------- e2e-tests/build | 48 +++++++++++++++++++++++++------------- e2e-tests/functions | 5 +++- 5 files changed, 79 insertions(+), 45 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 487b97931..4f22bfc4c 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -1,5 +1,13 @@ name: Scan docker on: [pull_request] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: docker.io + + # github.repository as / + IMAGE_NAME: perconalab/percona-server-mysql-operator + jobs: build: name: Build @@ -7,16 +15,43 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Build an image from Dockerfile + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build an image from Dockerfile (linux/arm64) run: | - export IMAGE=perconalab/percona-server-mysql-operator:${{ github.sha }} + export IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64 export DOCKER_PUSH=0 export DOCKER_SQUASH=0 + export DOCKER_DEFAULT_PLATFORM='linux/arm64' ./e2e-tests/build - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.18.0 + + - name: Run Trivy vulnerability scanner image (linux/arm64) + uses: aquasecurity/trivy-action@0.16.1 with: - image-ref: 'docker.io/perconalab/percona-server-mysql-operator:${{ github.sha }}' + image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64' + format: 'table' + exit-code: '1' + ignore-unfixed: true + vuln-type: 'os,library' + severity: 'CRITICAL,HIGH' + + - name: Build an image from Dockerfile (linux/amd64) + run: | + export IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64 + export DOCKER_PUSH=0 + export DOCKER_SQUASH=0 + export DOCKER_DEFAULT_PLATFORM='linux/amd64' + ./e2e-tests/build + + - name: Run Trivy vulnerability scanner image (linux/amd64) + uses: aquasecurity/trivy-action@0.16.1 + with: + image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64' format: 'table' exit-code: '1' ignore-unfixed: true diff --git a/Jenkinsfile b/Jenkinsfile index 9b82b2dfa..b6b6aa5f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -372,7 +372,7 @@ pipeline { -w /go/src/github.com/percona/percona-server-mysql-operator \ -e GOFLAGS='-buildvcs=false' \ -e GO111MODULE=on \ - golang:1.20 sh -c ' + golang:1.21 sh -c ' go install github.com/google/go-licenses@latest; /go/bin/go-licenses csv github.com/percona/percona-server-mysql-operator/cmd/manager \ | cut -d , -f 3 \ @@ -396,7 +396,7 @@ pipeline { -w /go/src/github.com/percona/percona-server-mysql-operator \ -e GOFLAGS='-buildvcs=false' \ -e GO111MODULE=on \ - golang:1.20 sh -c 'go build -v -o percona-server-mysql-operator github.com/percona/percona-server-mysql-operator/cmd/manager' + golang:1.21 sh -c 'go build -v -o percona-server-mysql-operator github.com/percona/percona-server-mysql-operator/cmd/manager' " ''' diff --git a/build/Dockerfile b/build/Dockerfile index 928824ab7..ee5c23fa6 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -47,28 +47,8 @@ RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ && cp -r build/_output/bin/orc-handler /usr/local/bin/orc-handler FROM redhat/ubi9-minimal AS ubi9 +RUN microdnf -y update && microdnf clean all -# check repository package signature in secure way -RUN export GNUPGHOME="$(mktemp -d)" \ - && microdnf install -y findutils \ - && gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \ - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona \ - && curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/percona-release.rpm \ - && rpm -i /tmp/percona-release.rpm \ - && rm -rf "$GNUPGHOME" /tmp/percona-release.rpm \ - && rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY \ - && percona-release setup pdps-8.0 - -RUN set -ex; \ - microdnf -y update; \ - microdnf install -y glibc-langpack-en percona-mysql-shell; \ - microdnf clean all; \ - rm -rf /var/cache; \ - rm -rf /usr/lib/debug/usr/bin; - -RUN mkdir /sbin/.mysqlsh && chown 2:2 /sbin/.mysqlsh RUN mkdir /opt/percona-server-mysql-operator LABEL name="Percona Distribution for MySQL Operator" \ diff --git a/e2e-tests/build b/e2e-tests/build index 8bad2fb75..de4b733b6 100755 --- a/e2e-tests/build +++ b/e2e-tests/build @@ -11,12 +11,14 @@ source "${ROOT_REPO}/e2e-tests/vars.sh" BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") GIT_COMMIT=$(git rev-parse HEAD) IMAGE=${IMAGE/#percona\//perconalab/} +DOCKER_DEFAULT_PLATFORM=${DOCKER_DEFAULT_PLATFORM:-"linux/amd64"} -if [[ ${DOCKER_NOCACHE:-0} == 1 ]]; then - no_cache="--no-cache" +build_options='--squash' +if [[ ${DOCKER_SQUASH} == 0 ]]; then + build_options='' fi -if [[ ${DOCKER_SQUASH:-1} == 1 ]]; then - squash="--squash" +if [[ ${DOCKER_NOCACHE:-0} == 1 ]]; then + build_options="$build_options --no-cache" fi build_operator() { @@ -24,22 +26,36 @@ build_operator() { GO_LDFLAGS="-race" fi - export DOCKER_DEFAULT_PLATFORM=${DOCKER_DEFAULT_PLATFORM:-linux/amd64} - export GO_LDFLAGS="-w -s -trimpath ${GO_LDFLAGS}" + export IMAGE + export DOCKER_DEFAULT_PLATFORM + export GO_LDFLAGS="-w -s -trimpath $GO_LDFLAGS" pushd "${ROOT_REPO}" || exit - docker build \ - --build-arg GIT_COMMIT="${GIT_COMMIT}" \ - --build-arg GIT_BRANCH="${GIT_BRANCH}" \ - --build-arg BUILD_TIME="${BUILD_TIME}" \ - --build-arg GO_LDFLAGS="${GO_LDFLAGS}" \ - $squash \ - $no_cache \ + + build_command='build' + if echo "$DOCKER_DEFAULT_PLATFORM" | grep -q ','; then + build_command='buildx build' + if [[ ${DOCKER_PUSH:-1} == 1 ]]; then + build_options="$build_options --push=true" + else + build_options="$build_options --load" + fi + fi + + docker $build_command \ + --platform $DOCKER_DEFAULT_PLATFORM \ + --build-arg GIT_COMMIT=$GIT_COMMIT \ + --build-arg GIT_BRANCH=$GIT_BRANCH \ + --build-arg BUILD_TIME=$BUILD_TIME \ + --build-arg GO_LDFLAGS="$GO_LDFLAGS" \ + --progress plain \ + $build_options \ -t "${IMAGE}" -f build/Dockerfile . - popd || exit + popd - if [ "${DOCKER_PUSH:-1}" = 1 ]; then - docker push "${IMAGE}" + if [ "${DOCKER_PUSH:-1}" = 1 ] && [[ $build_command == 'build' ]]; then + docker push ${IMAGE} fi + } if [[ $BUILD == "0" ]]; then diff --git a/e2e-tests/functions b/e2e-tests/functions index 16f5c99bb..4f83c4095 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -218,8 +218,11 @@ get_mysqlsh_uri() { get_gr_status() { local uri="$1" + local pod="$2" - kubectl -n "${NAMESPACE}" exec $(get_operator_pod) -- mysqlsh --uri $uri --cluster --result-format json -- cluster status \ + client_pod=$(get_client_pod) + + kubectl -n "${NAMESPACE}" exec "${pod:-mysql-client}" -- mysqlsh --uri $uri --cluster --result-format json -- cluster status \ | sed -e 's/mysql: //' \ | (grep -v 'Using a password on the command line interface can be insecure.' || :) } From d896ce6a41b57c1836d36d5bef2a14d433fab4ad Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Wed, 6 Mar 2024 22:22:07 +0200 Subject: [PATCH 103/192] K8SPS-312: restart pods on tls certificate update (#548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * K8SPS-312: restart pods on tls certificate update https://perconadev.atlassian.net/browse/K8SPS-312 * do not update manual tls certificate every reconcile * remove redundant sleeps * fix manual tls * update ci go version * update go version to 1.21 everywhere * fix manifests ci * fix tests * update `controller-gen` to `v0.14.0` * increase sleep * fix orchestrator * fix gr-users and users tests --------- Co-authored-by: Viacheslav Sarzhan Co-authored-by: Ege Güneş --- .github/linters/go.mod | 2 +- .github/workflows/reviewdog.yml | 7 +- .github/workflows/tests.yml | 2 +- Makefile | 2 +- api/v1alpha1/perconaservermysql_types.go | 3 +- api/v1alpha1/zz_generated.deepcopy.go | 4 +- build/ps-entrypoint.sh | 1 + ...percona.com_perconaservermysqlbackups.yaml | 3 +- ...ercona.com_perconaservermysqlrestores.yaml | 3 +- .../ps.percona.com_perconaservermysqls.yaml | 3 +- config/rbac/role.yaml | 1 - deploy/bundle.yaml | 10 +- deploy/crd.yaml | 9 +- deploy/rbac.yaml | 1 - e2e-tests/conf/cmctl.yml | 27 +++ e2e-tests/functions | 33 +++- .../00-deploy-cert-manager.yaml | 2 + .../gr-tls-cert-manager/06-renew-certs.yaml | 29 ++++ e2e-tests/tests/gr-users/02-assert.yaml | 1 + .../00-deploy-cert-manager.yaml | 2 + .../tls-cert-manager/06-renew-certs.yaml | 36 ++++ e2e-tests/tests/users/02-assert.yaml | 1 + pkg/controller/ps/controller.go | 36 +++- pkg/controller/ps/tls.go | 60 ++++++- pkg/haproxy/haproxy.go | 7 +- pkg/mysql/mysql.go | 7 +- pkg/orchestrator/orchestrator.go | 10 +- pkg/router/router.go | 7 +- pkg/secret/secret.go | 132 +-------------- pkg/tls/tls.go | 157 ++++++++++++++++++ 30 files changed, 418 insertions(+), 180 deletions(-) create mode 100644 e2e-tests/conf/cmctl.yml create mode 100644 e2e-tests/tests/gr-tls-cert-manager/06-renew-certs.yaml create mode 100644 e2e-tests/tests/tls-cert-manager/06-renew-certs.yaml create mode 100644 pkg/tls/tls.go diff --git a/.github/linters/go.mod b/.github/linters/go.mod index 02f74ef4c..a164acc54 100644 --- a/.github/linters/go.mod +++ b/.github/linters/go.mod @@ -1,3 +1,3 @@ module linters -go 1.17 +go 1.21 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index f08ceabc6..b58f9a86a 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '^1.20' + go-version: '^1.21' - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v4 @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '^1.17' + go-version: '^1.21' - run: go install mvdan.cc/sh/v3/cmd/shfmt@latest - run: $(go env GOPATH)/bin/shfmt -f . | grep -v 'vendor' | xargs $(go env GOPATH)/bin/shfmt -bn -ci -s -w - name: suggester / shfmt @@ -83,6 +83,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '^1.21' - run: | make generate manifests VERSION=main git diff --exit-code diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58e0e0bfb..73054384a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,6 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "^1.21" - name: Perform the test run: make test diff --git a/Makefile b/Makefile index 4c3e92a78..b591eb1d2 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,7 @@ undeploy: manifests ## Undeploy operator CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: ## Download controller-gen locally if necessary. - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0) + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0) KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 3334a1f2e..d181c2f37 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -881,7 +881,8 @@ type AnnotationKey string const ( AnnotationSpecHash AnnotationKey = "percona.com/last-applied-spec" AnnotationSecretHash AnnotationKey = "percona.com/last-applied-secret" - AnnotationConfigHash AnnotationKey = "percona.com/last-applied-config" + AnnotationConfigHash AnnotationKey = "percona.com/configuration-hash" + AnnotationTLSHash AnnotationKey = "percona.com/last-applied-tls" ) const ( diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 88ddcb5ce..3031a01af 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021 Percona, LLC @@ -51,7 +50,8 @@ func (in *BackupSpec) DeepCopyInto(out *BackupSpec) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = new(BackupStorageSpec) (*in).DeepCopyInto(*out) } diff --git a/build/ps-entrypoint.sh b/build/ps-entrypoint.sh index 78a6053b1..63dada1c5 100755 --- a/build/ps-entrypoint.sh +++ b/build/ps-entrypoint.sh @@ -331,6 +331,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then CREATE USER 'orchestrator'@'%' IDENTIFIED BY '${ORC_TOPOLOGY_PASSWORD}' PASSWORD EXPIRE NEVER; GRANT SYSTEM_USER, SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT, RELOAD ON *.* TO 'orchestrator'@'%'; + GRANT SELECT ON performance_schema.replication_group_members TO 'orchestrator'@'%'; GRANT SELECT ON mysql.slave_master_info TO 'orchestrator'@'%'; GRANT SELECT ON sys_operator.* TO 'orchestrator'@'%'; diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml index 8350cba8e..e8b0cca77 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqlbackups.ps.percona.com spec: group: ps.percona.com diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml index b717a8a7f..ba1b17625 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqlrestores.ps.percona.com spec: group: ps.percona.com diff --git a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml index 5289cd5b9..3a9dc4c90 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqls.ps.percona.com spec: group: ps.percona.com diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8c9e21f94..7fc722978 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: percona-server-mysql-operator rules: - apiGroups: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 24cb14586..29260ce47 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqlbackups.ps.percona.com spec: group: ps.percona.com @@ -891,8 +890,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqlrestores.ps.percona.com spec: group: ps.percona.com @@ -1779,8 +1777,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqls.ps.percona.com spec: group: ps.percona.com @@ -9526,7 +9523,6 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - creationTimestamp: null name: percona-server-mysql-operator rules: - apiGroups: diff --git a/deploy/crd.yaml b/deploy/crd.yaml index cb1b45bc3..c7cf24ede 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqlbackups.ps.percona.com spec: group: ps.percona.com @@ -891,8 +890,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqlrestores.ps.percona.com spec: group: ps.percona.com @@ -1779,8 +1777,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: perconaservermysqls.ps.percona.com spec: group: ps.percona.com diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index f45d300c6..8b1e687e1 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -48,7 +48,6 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - creationTimestamp: null name: percona-server-mysql-operator rules: - apiGroups: diff --git a/e2e-tests/conf/cmctl.yml b/e2e-tests/conf/cmctl.yml new file mode 100644 index 000000000..681496014 --- /dev/null +++ b/e2e-tests/conf/cmctl.yml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmctl +spec: + replicas: 1 + selector: + matchLabels: + name: cmctl + template: + metadata: + labels: + name: cmctl + spec: + serviceAccountName: cmctl + containers: + - name: cmctl + image: curlimages/curl + imagePullPolicy: Always + command: + - /bin/sh + - -c + - | + curl -fsSL -o /tmp/cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/latest/download/cmctl-linux-amd64.tar.gz \ + && tar -C /tmp -xzf /tmp/cmctl.tar.gz \ + && sleep 100500 + restartPolicy: Always diff --git a/e2e-tests/functions b/e2e-tests/functions index 4f83c4095..73ff4470a 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -131,7 +131,7 @@ retry() { until "$@"; do if [[ $n -ge $max ]]; then - echo "The command '$@' has failed after $n attempts." + echo "The command ${*} has failed after $n attempts." exit 1 fi ((n++)) @@ -664,3 +664,34 @@ network_loss() { | kubectl apply --namespace ${ns} -f - sleep 5 } + +renew_certificate() { + certificate="$1" + + local pod_name + pod_name=$(kubectl get -n "${NAMESPACE}" pods --selector=name=cmctl -o 'jsonpath={.items[].metadata.name}') + + local revision + revision=$(kubectl get -n "${NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') + + kubectl exec -n "${NAMESPACE}" "$pod_name" -- /tmp/cmctl renew "$certificate" + + # wait for new revision + for i in {1..10}; do + local new_revision + new_revision=$(kubectl get -n "${NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') + if [ "$((revision + 1))" == "$new_revision" ]; then + break + fi + sleep 1 + done +} + +deploy_cmctl() { + local service_account="cmctl" + + sed -e "s/percona-server-mysql-operator/$service_account/g" "${DEPLOY_DIR}/rbac.yaml" \ + | yq '(select(.rules).rules[] | select(contains({"apiGroups": ["cert-manager.io"]}))).resources += "certificates/status"' \ + | kubectl apply -n "${NAMESPACE}" -f - + kubectl apply -n "${NAMESPACE}" -f "${TESTS_CONFIG_DIR}/cmctl.yml" +} diff --git a/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml b/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml index fc26fff09..ed0f55714 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/00-deploy-cert-manager.yaml @@ -9,4 +9,6 @@ commands: init_temp_dir # do this only in the first TestStep deploy_cert_manager + deploy_cmctl + diff --git a/e2e-tests/tests/gr-tls-cert-manager/06-renew-certs.yaml b/e2e-tests/tests/gr-tls-cert-manager/06-renew-certs.yaml new file mode 100644 index 000000000..8779d55f0 --- /dev/null +++ b/e2e-tests/tests/gr-tls-cert-manager/06-renew-certs.yaml @@ -0,0 +1,29 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + current_generation_mysql=$(kubectl -n ${NAMESPACE} get sts gr-tls-cert-manager-mysql -o jsonpath='{.metadata.generation}') + current_generation_router=$(kubectl -n ${NAMESPACE} get deployment gr-tls-cert-manager-router -o jsonpath='{.metadata.generation}') + + renew_certificate "gr-tls-cert-manager-ssl" + + sleep 20 + + new_generation_mysql=$(kubectl -n ${NAMESPACE} get sts gr-tls-cert-manager-mysql -o jsonpath='{.metadata.generation}') + new_generation_router=$(kubectl -n ${NAMESPACE} get deployment gr-tls-cert-manager-router -o jsonpath='{.metadata.generation}') + + if [[ "${current_generation_mysql}" == "${new_generation_mysql}" ]]; then + echo "Certificate renewal failed for mysql" + exit 1 + fi + + if [[ "${current_generation_router}" == "${new_generation_router}" ]]; then + echo "Certificate renewal failed for router" + exit 1 + fi diff --git a/e2e-tests/tests/gr-users/02-assert.yaml b/e2e-tests/tests/gr-users/02-assert.yaml index ce5604e3f..269a3b291 100644 --- a/e2e-tests/tests/gr-users/02-assert.yaml +++ b/e2e-tests/tests/gr-users/02-assert.yaml @@ -23,6 +23,7 @@ data: GRANT SYSTEM_USER ON *.* TO `orchestrator`@`%` GRANT SELECT ON `sys_operator`.* TO `orchestrator`@`%` GRANT SELECT ON `mysql`.`slave_master_info` TO `orchestrator`@`%` + GRANT SELECT ON `performance_schema`.`replication_group_members` TO `orchestrator`@`%` xtrabackup: | GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON *.* TO `xtrabackup`@`localhost` GRANT BACKUP_ADMIN,GROUP_REPLICATION_ADMIN,REPLICATION_SLAVE_ADMIN,SYSTEM_USER ON *.* TO `xtrabackup`@`localhost` diff --git a/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml b/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml index fc26fff09..ed0f55714 100644 --- a/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml +++ b/e2e-tests/tests/tls-cert-manager/00-deploy-cert-manager.yaml @@ -9,4 +9,6 @@ commands: init_temp_dir # do this only in the first TestStep deploy_cert_manager + deploy_cmctl + diff --git a/e2e-tests/tests/tls-cert-manager/06-renew-certs.yaml b/e2e-tests/tests/tls-cert-manager/06-renew-certs.yaml new file mode 100644 index 000000000..e6ae9075a --- /dev/null +++ b/e2e-tests/tests/tls-cert-manager/06-renew-certs.yaml @@ -0,0 +1,36 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + current_generation_mysql=$(kubectl -n ${NAMESPACE} get sts tls-cert-manager-mysql -o jsonpath='{.metadata.generation}') + current_generation_haproxy=$(kubectl -n ${NAMESPACE} get sts tls-cert-manager-haproxy -o jsonpath='{.metadata.generation}') + current_generation_orc=$(kubectl -n ${NAMESPACE} get sts tls-cert-manager-orc -o jsonpath='{.metadata.generation}') + + renew_certificate "tls-cert-manager-ssl" + + sleep 10 + + new_generation_mysql=$(kubectl -n ${NAMESPACE} get sts tls-cert-manager-mysql -o jsonpath='{.metadata.generation}') + new_generation_haproxy=$(kubectl -n ${NAMESPACE} get sts tls-cert-manager-haproxy -o jsonpath='{.metadata.generation}') + new_generation_orc=$(kubectl -n ${NAMESPACE} get sts tls-cert-manager-orc -o jsonpath='{.metadata.generation}') + + if [[ "${current_generation_mysql}" == "${new_generation_mysql}" ]]; then + echo "Certificate renewal failed for mysql" + exit 1 + fi + + if [[ "${current_generation_haproxy}" == "${new_generation_haproxy}" ]]; then + echo "Certificate renewal failed for haproxy" + exit 1 + fi + + if [[ "${current_generation_orc}" == "${new_generation_orc}" ]]; then + echo "Certificate renewal failed for orchestrator" + exit 1 + fi diff --git a/e2e-tests/tests/users/02-assert.yaml b/e2e-tests/tests/users/02-assert.yaml index b2f906276..49bc657b2 100644 --- a/e2e-tests/tests/users/02-assert.yaml +++ b/e2e-tests/tests/users/02-assert.yaml @@ -23,6 +23,7 @@ data: GRANT SYSTEM_USER ON *.* TO `orchestrator`@`%` GRANT SELECT ON `sys_operator`.* TO `orchestrator`@`%` GRANT SELECT ON `mysql`.`slave_master_info` TO `orchestrator`@`%` + GRANT SELECT ON `performance_schema`.`replication_group_members` TO `orchestrator`@`%` replication: | GRANT SELECT, RELOAD, SHUTDOWN, PROCESS, FILE, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE USER ON *.* TO `replication`@`%` WITH GRANT OPTION GRANT BACKUP_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,ROLE_ADMIN,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN ON *.* TO `replication`@`%` WITH GRANT OPTION diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 21c48c17f..275cd6041 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -387,6 +387,11 @@ func (r *PerconaServerMySQLReconciler) reconcileDatabase( return errors.Wrap(err, "reconcile MySQL config") } + tlsHash, err := getTLSHash(ctx, r.Client, cr) + if err != nil { + return errors.Wrap(err, "failed to get tls hash") + } + if err = r.reconcileMySQLAutoConfig(ctx, cr); err != nil { return errors.Wrap(err, "reconcile MySQL auto-config") } @@ -403,7 +408,7 @@ func (r *PerconaServerMySQLReconciler) reconcileDatabase( return errors.Wrapf(err, "get Secret/%s", nn.Name) } - sts := mysql.StatefulSet(cr, initImage, configHash, internalSecret) + sts := mysql.StatefulSet(cr, initImage, configHash, tlsHash, internalSecret) if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, sts, r.Scheme); err != nil { return errors.Wrap(err, "reconcile sts") @@ -596,7 +601,12 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context return errors.Wrap(err, "get init image") } - if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, orchestrator.StatefulSet(cr, initImage), r.Scheme); err != nil { + tlsHash, err := getTLSHash(ctx, r.Client, cr) + if err != nil { + return errors.Wrap(err, "failed to get tls hash") + } + + if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, orchestrator.StatefulSet(cr, initImage, tlsHash), r.Scheme); err != nil { return errors.Wrap(err, "reconcile StatefulSet") } @@ -664,6 +674,11 @@ func (r *PerconaServerMySQLReconciler) reconcileHAProxy(ctx context.Context, cr return errors.Wrap(err, "reconcile HAProxy config") } + tlsHash, err := getTLSHash(ctx, r.Client, cr) + if err != nil { + return errors.Wrap(err, "failed to get tls hash") + } + nn := types.NamespacedName{Namespace: cr.Namespace, Name: mysql.PodName(cr, 0)} firstMySQLPodReady, err := k8s.IsPodWithNameReady(ctx, r.Client, nn) if err != nil { @@ -687,7 +702,7 @@ func (r *PerconaServerMySQLReconciler) reconcileHAProxy(ctx context.Context, cr return errors.Wrapf(err, "get Secret/%s", nn.Name) } - if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, haproxy.StatefulSet(cr, initImage, configHash, internalSecret), r.Scheme); err != nil { + if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, haproxy.StatefulSet(cr, initImage, configHash, tlsHash, internalSecret), r.Scheme); err != nil { return errors.Wrap(err, "reconcile StatefulSet") } @@ -742,7 +757,7 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, sts := &appsv1.StatefulSet{} // no need to set init image since we're just getting obj from API - if err := r.Get(ctx, client.ObjectKeyFromObject(orchestrator.StatefulSet(cr, "")), sts); err != nil { + if err := r.Get(ctx, client.ObjectKeyFromObject(orchestrator.StatefulSet(cr, "", "")), sts); err != nil { return client.IgnoreNotFound(err) } @@ -885,7 +900,7 @@ func (r *PerconaServerMySQLReconciler) cleanupMysql(ctx context.Context, cr *api func (r *PerconaServerMySQLReconciler) cleanupOrchestrator(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { if !cr.OrchestratorEnabled() { - if err := r.Delete(ctx, orchestrator.StatefulSet(cr, "")); err != nil && !k8serrors.IsNotFound(err) { + if err := r.Delete(ctx, orchestrator.StatefulSet(cr, "", "")); err != nil && !k8serrors.IsNotFound(err) { return errors.Wrap(err, "failed to delete orchestrator statefulset") } @@ -899,7 +914,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOrchestrator(ctx context.Context, func (r *PerconaServerMySQLReconciler) cleanupProxies(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { if !cr.RouterEnabled() { - if err := r.Delete(ctx, router.Deployment(cr, "", "")); err != nil && !k8serrors.IsNotFound(err) { + if err := r.Delete(ctx, router.Deployment(cr, "", "", "")); err != nil && !k8serrors.IsNotFound(err) { return errors.Wrap(err, "failed to delete router deployment") } @@ -909,7 +924,7 @@ func (r *PerconaServerMySQLReconciler) cleanupProxies(ctx context.Context, cr *a } if !cr.HAProxyEnabled() { - if err := r.Delete(ctx, haproxy.StatefulSet(cr, "", "", nil)); err != nil && !k8serrors.IsNotFound(err) { + if err := r.Delete(ctx, haproxy.StatefulSet(cr, "", "", "", nil)); err != nil && !k8serrors.IsNotFound(err) { return errors.Wrap(err, "failed to delete haproxy statefulset") } @@ -934,6 +949,11 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, return errors.Wrap(err, "reconcile Router config") } + tlsHash, err := getTLSHash(ctx, r.Client, cr) + if err != nil { + return errors.Wrap(err, "failed to get tls hash") + } + if cr.Spec.Proxy.Router.Size > 0 { if cr.Status.MySQL.Ready != cr.Spec.MySQL.Size { log.V(1).Info("Waiting for MySQL pods to be ready") @@ -964,7 +984,7 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, return errors.Wrap(err, "get init image") } - if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, router.Deployment(cr, initImage, configHash), r.Scheme); err != nil { + if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, router.Deployment(cr, initImage, configHash, tlsHash), r.Scheme); err != nil { return errors.Wrap(err, "reconcile Deployment") } diff --git a/pkg/controller/ps/tls.go b/pkg/controller/ps/tls.go index 55a972cc0..696e09d28 100644 --- a/pkg/controller/ps/tls.go +++ b/pkg/controller/ps/tls.go @@ -3,6 +3,7 @@ package ps import ( "context" "fmt" + "slices" "time" cm "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" @@ -12,11 +13,13 @@ import ( k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" logf "sigs.k8s.io/controller-runtime/pkg/log" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/secret" + "github.com/percona/percona-server-mysql-operator/pkg/tls" ) func (r *PerconaServerMySQLReconciler) ensureTLSSecret(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { @@ -28,19 +31,68 @@ func (r *PerconaServerMySQLReconciler) ensureTLSSecret(ctx context.Context, cr * log.Error(err, fmt.Sprintf("Failed to ensure certificate by cert-manager. Check `.spec.tls.issuerConf` in PerconaServerMySQL %s/%s", cr.Namespace, cr.Name)) return errors.Wrap(err, "create ssl with cert manager") } - secret, err := secret.GenerateCertsSecret(ctx, cr) + if err := r.ensureManualTLS(ctx, cr); err != nil { + return errors.Wrap(err, "ensure manual TLS") + } + } + + return nil +} + +func (r *PerconaServerMySQLReconciler) ensureManualTLS(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { + secret, err := secret.GenerateCertsSecret(ctx, cr) + if err != nil { + return errors.Wrap(err, "create SSL manually") + } + + newDNSNames, err := tls.DNSNamesFromCert(secret.Data["tls.crt"]) + if err != nil { + return errors.Wrap(err, "get DNS names from new certificate") + } + + currentSecret := new(corev1.Secret) + if err = r.Get(ctx, client.ObjectKeyFromObject(secret), currentSecret); client.IgnoreNotFound(err) != nil { + return errors.Wrap(err, "get secret") + } + var currentDNSNames []string + if len(currentSecret.Data["tls.crt"]) > 0 { + var err error + currentDNSNames, err = tls.DNSNamesFromCert(currentSecret.Data["tls.crt"]) if err != nil { - return errors.Wrap(err, "create SSL manually") + return errors.Wrap(err, "get DNS names from current certificate") } + } + // We should update the secret only if the DNS names have changed + if k8serrors.IsNotFound(err) || !slices.Equal(currentDNSNames, newDNSNames) { if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, secret, r.Scheme); err != nil { return errors.Wrap(err, "create secret") } } - return nil } +func getTLSHash(ctx context.Context, cl client.Client, cr *apiv1alpha1.PerconaServerMySQL) (string, error) { + secret := new(corev1.Secret) + err := cl.Get(ctx, types.NamespacedName{ + Name: cr.Spec.SSLSecretName, + Namespace: cr.Namespace, + }, secret) + if err != nil { + if k8serrors.IsNotFound(err) { + return "", nil + } + return "", errors.Wrap(err, "get secret") + } + + hash, err := k8s.ObjectHash(secret) + if err != nil { + return "", errors.Wrap(err, "get secret hash") + } + + return hash, nil +} + func (r *PerconaServerMySQLReconciler) checkTLSIssuer(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { if cr.Spec.TLS == nil || cr.Spec.TLS.IssuerConf == nil { return nil @@ -128,7 +180,7 @@ func (r *PerconaServerMySQLReconciler) ensureSSLByCertManager(ctx context.Contex }, Spec: cm.CertificateSpec{ SecretName: cr.Spec.SSLSecretName, - DNSNames: secret.DNSNames(cr), + DNSNames: tls.DNSNames(cr), IsCA: false, IssuerRef: cmmeta.ObjectReference{ Name: issuerName, diff --git a/pkg/haproxy/haproxy.go b/pkg/haproxy/haproxy.go index 700fb267e..bb178efa5 100644 --- a/pkg/haproxy/haproxy.go +++ b/pkg/haproxy/haproxy.go @@ -128,12 +128,15 @@ func Service(cr *apiv1alpha1.PerconaServerMySQL, secret *corev1.Secret) *corev1. } } -func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash string, secret *corev1.Secret) *appsv1.StatefulSet { +func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsHash string, secret *corev1.Secret) *appsv1.StatefulSet { labels := MatchLabels(cr) annotations := make(map[string]string) if configHash != "" { - annotations["percona.com/configuration-hash"] = configHash + annotations[string(apiv1alpha1.AnnotationConfigHash)] = configHash + } + if tlsHash != "" { + annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash } t := true diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index 5a9d77d19..76bd34d54 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -114,7 +114,7 @@ func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { cr.Labels()) } -func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash string, secret *corev1.Secret) *appsv1.StatefulSet { +func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsHash string, secret *corev1.Secret) *appsv1.StatefulSet { labels := MatchLabels(cr) spec := cr.MySQLSpec() replicas := spec.Size @@ -122,7 +122,10 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash strin annotations := make(map[string]string) if configHash != "" { - annotations["percona.com/configuration-hash"] = configHash + annotations[string(apiv1alpha1.AnnotationConfigHash)] = configHash + } + if tlsHash != "" { + annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash } return &appsv1.StatefulSet{ diff --git a/pkg/orchestrator/orchestrator.go b/pkg/orchestrator/orchestrator.go index ff04b4664..67e9b0e4c 100644 --- a/pkg/orchestrator/orchestrator.go +++ b/pkg/orchestrator/orchestrator.go @@ -104,11 +104,16 @@ func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { cr.Labels()) } -func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage string) *appsv1.StatefulSet { +func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, tlsHash string) *appsv1.StatefulSet { labels := MatchLabels(cr) spec := cr.OrchestratorSpec() Replicas := spec.Size + annotations := make(map[string]string, 0) + if tlsHash != "" { + annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash + } + return &appsv1.StatefulSet{ TypeMeta: metav1.TypeMeta{ APIVersion: "apps/v1", @@ -128,7 +133,8 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage string) *appsv1.S UpdateStrategy: updateStrategy(cr), Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ - Labels: labels, + Labels: labels, + Annotations: annotations, }, Spec: corev1.PodSpec{ InitContainers: []corev1.Container{ diff --git a/pkg/router/router.go b/pkg/router/router.go index 2a3650b86..a8c331af5 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -132,7 +132,7 @@ func Service(cr *apiv1alpha1.PerconaServerMySQL) *corev1.Service { } } -func Deployment(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash string) *appsv1.Deployment { +func Deployment(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsHash string) *appsv1.Deployment { labels := MatchLabels(cr) spec := cr.Spec.Proxy.Router replicas := spec.Size @@ -140,7 +140,10 @@ func Deployment(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash string annotations := make(map[string]string) if configHash != "" { - annotations["percona.com/configuration-hash"] = configHash + annotations[string(apiv1alpha1.AnnotationConfigHash)] = configHash + } + if tlsHash != "" { + annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash } zero := intstr.FromInt(0) diff --git a/pkg/secret/secret.go b/pkg/secret/secret.go index eab5c9b41..5cc8691fe 100644 --- a/pkg/secret/secret.go +++ b/pkg/secret/secret.go @@ -1,14 +1,8 @@ package secret import ( - "bytes" "context" "crypto/rand" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "fmt" "math/big" mrand "math/rand" "time" @@ -18,12 +12,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/tls" ) var validityNotAfter = time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC) func GenerateCertsSecret(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) (*corev1.Secret, error) { - ca, cert, key, err := issueCerts(DNSNames(cr)) + ca, cert, key, err := tls.IssueCerts(tls.DNSNames(cr)) if err != nil { return nil, errors.Wrap(err, "issue TLS certificates") } @@ -43,129 +38,6 @@ func GenerateCertsSecret(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL return secret, nil } -func DNSNames(cr *apiv1alpha1.PerconaServerMySQL) []string { - hosts := []string{ - fmt.Sprintf("*.%s-mysql", cr.Name), - fmt.Sprintf("*.%s-mysql.%s", cr.Name, cr.Namespace), - fmt.Sprintf("*.%s-mysql.%s.svc", cr.Name, cr.Namespace), - fmt.Sprintf("*.%s-orchestrator", cr.Name), - fmt.Sprintf("*.%s-orchestrator.%s", cr.Name, cr.Namespace), - fmt.Sprintf("*.%s-orchestrator.%s.svc", cr.Name, cr.Namespace), - fmt.Sprintf("*.%s-router", cr.Name), - fmt.Sprintf("*.%s-router.%s", cr.Name, cr.Namespace), - fmt.Sprintf("*.%s-router.%s.svc", cr.Name, cr.Namespace), - } - if cr.Spec.TLS != nil { - hosts = append(hosts, cr.Spec.TLS.SANs...) - } - return hosts -} - -// issueCerts returns CA certificate, TLS certificate and TLS private key -func issueCerts(hosts []string) (caCert, tlsCert, tlsKey []byte, err error) { - privateKey, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "generate rsa key") - } - - serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) - serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "generate serial number for root") - } - - caTemplate := x509.Certificate{ - SerialNumber: serialNumber, - Subject: pkix.Name{ - Organization: []string{"Root CA"}, - }, - NotBefore: time.Now(), - NotAfter: validityNotAfter, - KeyUsage: x509.KeyUsageCertSign, - ExtKeyUsage: []x509.ExtKeyUsage{ - x509.ExtKeyUsageServerAuth, - x509.ExtKeyUsageClientAuth, - }, - BasicConstraintsValid: true, - IsCA: true, - } - - derBytes, err := x509.CreateCertificate(rand.Reader, - &caTemplate, - &caTemplate, - &privateKey.PublicKey, - privateKey) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "generate CA certificate") - } - - certOut := &bytes.Buffer{} - err = pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "encode CA certificate") - } - caCert = certOut.Bytes() - - serialNumber, err = rand.Int(rand.Reader, serialNumberLimit) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "generate serial number for client") - } - - tlsTemplate := x509.Certificate{ - SerialNumber: serialNumber, - Subject: pkix.Name{ - Organization: []string{"PS"}, - }, - Issuer: pkix.Name{ - Organization: []string{"Root CA"}, - }, - NotBefore: time.Now(), - NotAfter: validityNotAfter, - DNSNames: hosts, - KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment, - ExtKeyUsage: []x509.ExtKeyUsage{ - x509.ExtKeyUsageServerAuth, - x509.ExtKeyUsageClientAuth, - }, - BasicConstraintsValid: true, - IsCA: false, - } - - clientKey, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "generate client key") - } - - tlsDerBytes, err := x509.CreateCertificate(rand.Reader, - &tlsTemplate, - &caTemplate, - &clientKey.PublicKey, - privateKey) - if err != nil { - return nil, nil, nil, err - } - - tlsCertOut := &bytes.Buffer{} - err = pem.Encode(tlsCertOut, &pem.Block{Type: "CERTIFICATE", Bytes: tlsDerBytes}) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "encode TLS certificate") - } - tlsCert = tlsCertOut.Bytes() - - keyOut := &bytes.Buffer{} - block := &pem.Block{ - Type: "RSA PRIVATE KEY", - Bytes: x509.MarshalPKCS1PrivateKey(clientKey), - } - err = pem.Encode(keyOut, block) - if err != nil { - return nil, nil, nil, errors.Wrap(err, "encode RSA private key") - } - tlsKey = keyOut.Bytes() - - return -} - const ( passwordMaxLen = 20 passwordMinLen = 16 diff --git a/pkg/tls/tls.go b/pkg/tls/tls.go new file mode 100644 index 000000000..99c41f43a --- /dev/null +++ b/pkg/tls/tls.go @@ -0,0 +1,157 @@ +package tls + +import ( + "bytes" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "fmt" + "math/big" + "sort" + "time" + + "github.com/pkg/errors" + + apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" +) + +func DNSNames(cr *apiv1alpha1.PerconaServerMySQL) []string { + hosts := []string{ + fmt.Sprintf("*.%s-mysql", cr.Name), + fmt.Sprintf("*.%s-mysql.%s", cr.Name, cr.Namespace), + fmt.Sprintf("*.%s-mysql.%s.svc", cr.Name, cr.Namespace), + fmt.Sprintf("*.%s-orchestrator", cr.Name), + fmt.Sprintf("*.%s-orchestrator.%s", cr.Name, cr.Namespace), + fmt.Sprintf("*.%s-orchestrator.%s.svc", cr.Name, cr.Namespace), + fmt.Sprintf("*.%s-router", cr.Name), + fmt.Sprintf("*.%s-router.%s", cr.Name, cr.Namespace), + fmt.Sprintf("*.%s-router.%s.svc", cr.Name, cr.Namespace), + } + if cr.Spec.TLS != nil { + hosts = append(hosts, cr.Spec.TLS.SANs...) + } + return hosts +} + +var validityNotAfter = time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC) + +// IssueCerts returns CA certificate, TLS certificate and TLS private key +func IssueCerts(hosts []string) (caCert, tlsCert, tlsKey []byte, err error) { + privateKey, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "generate rsa key") + } + + serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) + serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "generate serial number for root") + } + + caTemplate := x509.Certificate{ + SerialNumber: serialNumber, + Subject: pkix.Name{ + Organization: []string{"Root CA"}, + }, + NotBefore: time.Now(), + NotAfter: validityNotAfter, + KeyUsage: x509.KeyUsageCertSign, + ExtKeyUsage: []x509.ExtKeyUsage{ + x509.ExtKeyUsageServerAuth, + x509.ExtKeyUsageClientAuth, + }, + BasicConstraintsValid: true, + IsCA: true, + } + + derBytes, err := x509.CreateCertificate(rand.Reader, + &caTemplate, + &caTemplate, + &privateKey.PublicKey, + privateKey) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "generate CA certificate") + } + + certOut := &bytes.Buffer{} + err = pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "encode CA certificate") + } + caCert = certOut.Bytes() + + serialNumber, err = rand.Int(rand.Reader, serialNumberLimit) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "generate serial number for client") + } + + tlsTemplate := x509.Certificate{ + SerialNumber: serialNumber, + Subject: pkix.Name{ + Organization: []string{"PS"}, + }, + Issuer: pkix.Name{ + Organization: []string{"Root CA"}, + }, + NotBefore: time.Now(), + NotAfter: validityNotAfter, + DNSNames: hosts, + KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment, + ExtKeyUsage: []x509.ExtKeyUsage{ + x509.ExtKeyUsageServerAuth, + x509.ExtKeyUsageClientAuth, + }, + BasicConstraintsValid: true, + IsCA: false, + } + + clientKey, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "generate client key") + } + + tlsDerBytes, err := x509.CreateCertificate(rand.Reader, + &tlsTemplate, + &caTemplate, + &clientKey.PublicKey, + privateKey) + if err != nil { + return nil, nil, nil, err + } + + tlsCertOut := &bytes.Buffer{} + err = pem.Encode(tlsCertOut, &pem.Block{Type: "CERTIFICATE", Bytes: tlsDerBytes}) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "encode TLS certificate") + } + tlsCert = tlsCertOut.Bytes() + + keyOut := &bytes.Buffer{} + block := &pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: x509.MarshalPKCS1PrivateKey(clientKey), + } + err = pem.Encode(keyOut, block) + if err != nil { + return nil, nil, nil, errors.Wrap(err, "encode RSA private key") + } + tlsKey = keyOut.Bytes() + + return +} + +func DNSNamesFromCert(data []byte) ([]string, error) { + block, _ := pem.Decode(data) + if block == nil { + return nil, errors.New("PEM data is not found") + } + cert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return nil, errors.New("failed to parse certificate") + } + names := cert.DNSNames + sort.Strings(names) + return names, nil +} From cb376370fbaf345f5eb72ac1a82a8b4d20e5a55b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:17:04 +0200 Subject: [PATCH 104/192] CLOUD-727: Bump github.com/go-openapi/strfmt from 0.22.1 to 0.22.2 (#580) Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.22.1 to 0.22.2. - [Commits](https://github.com/go-openapi/strfmt/compare/v0.22.1...v0.22.2) --- updated-dependencies: - dependency-name: github.com/go-openapi/strfmt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 7490cf9eb..f7e0c7bdd 100644 --- a/go.mod +++ b/go.mod @@ -7,9 +7,9 @@ require ( github.com/cert-manager/cert-manager v1.14.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 - github.com/go-openapi/errors v0.21.0 + github.com/go-openapi/errors v0.21.1 github.com/go-openapi/runtime v0.27.1 - github.com/go-openapi/strfmt v0.22.1 + github.com/go-openapi/strfmt v0.22.2 github.com/go-openapi/swag v0.22.9 github.com/go-openapi/validate v0.23.0 github.com/go-sql-driver/mysql v1.7.1 @@ -67,7 +67,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.6.0 // indirect @@ -98,7 +98,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.4 // indirect + github.com/stretchr/testify v1.9.0 // indirect github.com/swaggest/assertjson v1.9.0 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect @@ -113,7 +113,7 @@ require ( golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.16.1 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index a86944d7c..7578884b1 100644 --- a/go.sum +++ b/go.sum @@ -69,8 +69,8 @@ github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= -github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= -github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= +github.com/go-openapi/errors v0.21.1 h1:rVisxQPdETctjlYntm0Ek4dKf68nAQocCloCT50vWuI= +github.com/go-openapi/errors v0.21.1/go.mod h1:LyiY9bgc7AVVh6wtVvMYEyoj3KJYNoRw92mmvnMWgj8= github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= @@ -81,8 +81,8 @@ github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqv github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/strfmt v0.22.1 h1:5Ky8cybT4576C6Ffc+8gYji/wRXCo6Ozm8RaWjPI6jc= -github.com/go-openapi/strfmt v0.22.1/go.mod h1:OfVoytIXJasDkkGvkb1Cceb3BPyMOwk1FgmyyEw7NYg= +github.com/go-openapi/strfmt v0.22.2 h1:DPYOrm6gexCfZZfXUaXFS4+Jw6HAaIIG0SZ5630f8yw= +github.com/go-openapi/strfmt v0.22.2/go.mod h1:HB/b7TCm91rno75Dembc1dFW/0FPLk5CEXsoF9ReNc4= github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-openapi/validate v0.23.0 h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw= @@ -231,15 +231,15 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= -github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= From dc9e361e46080fd966b2c81d2fbbcbbcec7a7a67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:39:09 +0200 Subject: [PATCH 105/192] CLOUD-727: Bump github.com/go-openapi/validate from 0.23.0 to 0.23.2 (#588) Bumps [github.com/go-openapi/validate](https://github.com/go-openapi/validate) from 0.23.0 to 0.23.2. - [Commits](https://github.com/go-openapi/validate/compare/v0.23.0...v0.23.2) --- updated-dependencies: - dependency-name: github.com/go-openapi/validate dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index f7e0c7bdd..697933736 100644 --- a/go.mod +++ b/go.mod @@ -10,8 +10,8 @@ require ( github.com/go-openapi/errors v0.21.1 github.com/go-openapi/runtime v0.27.1 github.com/go-openapi/strfmt v0.22.2 - github.com/go-openapi/swag v0.22.9 - github.com/go-openapi/validate v0.23.0 + github.com/go-openapi/swag v0.22.10 + github.com/go-openapi/validate v0.23.2 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.67 @@ -58,11 +58,11 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/analysis v0.22.2 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/loads v0.21.5 // indirect - github.com/go-openapi/spec v0.20.14 // indirect + github.com/go-openapi/analysis v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.20.3 // indirect + github.com/go-openapi/jsonreference v0.20.5 // indirect + github.com/go-openapi/loads v0.21.6 // indirect + github.com/go-openapi/spec v0.20.15 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect diff --git a/go.sum b/go.sum index 7578884b1..75d9292b7 100644 --- a/go.sum +++ b/go.sum @@ -67,26 +67,26 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= -github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= +github.com/go-openapi/analysis v0.22.3 h1:JfHesJsGyiNUlcDuuE1wg9QVQmXd6iB/TKCmHz9+P2U= +github.com/go-openapi/analysis v0.22.3/go.mod h1:y2vjQNdRVOg0gG88n7gBGKWm3yjNOlaTVkxBLHaNlts= github.com/go-openapi/errors v0.21.1 h1:rVisxQPdETctjlYntm0Ek4dKf68nAQocCloCT50vWuI= github.com/go-openapi/errors v0.21.1/go.mod h1:LyiY9bgc7AVVh6wtVvMYEyoj3KJYNoRw92mmvnMWgj8= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= -github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= +github.com/go-openapi/jsonpointer v0.20.3 h1:jykzYWS/kyGtsHfRt6aV8JTB9pcQAXPIA7qlZ5aRlyk= +github.com/go-openapi/jsonpointer v0.20.3/go.mod h1:c7l0rjoouAuIxCm8v/JWKRgMjDG/+/7UBWsXMrv6PsM= +github.com/go-openapi/jsonreference v0.20.5 h1:hutI+cQI+HbSQaIGSfsBsYI0pHk+CATf8Fk5gCSj0yI= +github.com/go-openapi/jsonreference v0.20.5/go.mod h1:thAqAp31UABtI+FQGKAQfmv7DbFpKNUlva2UPCxKu2Y= +github.com/go-openapi/loads v0.21.6 h1:qo9Ow4mbOe+epbJcFxPSYKVvPgHT+vvZRNC2BRatEeE= +github.com/go-openapi/loads v0.21.6/go.mod h1:eEquguZx+S9eigxJ7QhrzfhW1Me47n54wlHX9RK8to4= github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto= github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= -github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= -github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/spec v0.20.15 h1:8bDcVxF607pTh9NpPwgsH4J5Uhh5mV5XoWnkurdiY+U= +github.com/go-openapi/spec v0.20.15/go.mod h1:o0upgqg5uYFG7O5mADrDVmSG3Wa6y6OLhwiCqQ+sTv4= github.com/go-openapi/strfmt v0.22.2 h1:DPYOrm6gexCfZZfXUaXFS4+Jw6HAaIIG0SZ5630f8yw= github.com/go-openapi/strfmt v0.22.2/go.mod h1:HB/b7TCm91rno75Dembc1dFW/0FPLk5CEXsoF9ReNc4= -github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= -github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= -github.com/go-openapi/validate v0.23.0 h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw= -github.com/go-openapi/validate v0.23.0/go.mod h1:EeiAZ5bmpSIOJV1WLfyYF9qp/B1ZgSaEpHTJHtN5cbE= +github.com/go-openapi/swag v0.22.10 h1:4y86NVn7Z2yYd6pfS4Z+Nyh3aAUL3Nul+LMbhFKy0gA= +github.com/go-openapi/swag v0.22.10/go.mod h1:Cnn8BYtRlx6BNE3DPN86f/xkapGIcLWzh3CLEb4C1jI= +github.com/go-openapi/validate v0.23.2 h1:dSV8fmCwFwTE6TYGVmWtpWN9aOTsidzcBsB2qPohZYI= +github.com/go-openapi/validate v0.23.2/go.mod h1:FencnMQqop3HPZk+wIkLsQHgOKP1EDAgF2LZDW7fWr8= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= From 43430231fad4170d8233833264877ad3ea50d2ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:42:12 +0200 Subject: [PATCH 106/192] CLOUD-727: Bump github.com/go-openapi/runtime from 0.27.1 to 0.27.2 (#586) Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.27.1 to 0.27.2. - [Release notes](https://github.com/go-openapi/runtime/releases) - [Commits](https://github.com/go-openapi/runtime/compare/v0.27.1...v0.27.2) --- updated-dependencies: - dependency-name: github.com/go-openapi/runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 697933736..62f814549 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.21.1 - github.com/go-openapi/runtime v0.27.1 + github.com/go-openapi/runtime v0.27.2 github.com/go-openapi/strfmt v0.22.2 github.com/go-openapi/swag v0.22.10 github.com/go-openapi/validate v0.23.2 diff --git a/go.sum b/go.sum index 75d9292b7..92e1b75db 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,8 @@ github.com/go-openapi/jsonreference v0.20.5 h1:hutI+cQI+HbSQaIGSfsBsYI0pHk+CATf8 github.com/go-openapi/jsonreference v0.20.5/go.mod h1:thAqAp31UABtI+FQGKAQfmv7DbFpKNUlva2UPCxKu2Y= github.com/go-openapi/loads v0.21.6 h1:qo9Ow4mbOe+epbJcFxPSYKVvPgHT+vvZRNC2BRatEeE= github.com/go-openapi/loads v0.21.6/go.mod h1:eEquguZx+S9eigxJ7QhrzfhW1Me47n54wlHX9RK8to4= -github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto= -github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= +github.com/go-openapi/runtime v0.27.2 h1:AOvytl8s9DzL7B27r6dZ4sqjVOJT6/3LzKeZoDIAh+g= +github.com/go-openapi/runtime v0.27.2/go.mod h1:a5AkfzISU/Iwq51ZiQLM+oNRDwqC9RtlSt57xUSyZhg= github.com/go-openapi/spec v0.20.15 h1:8bDcVxF607pTh9NpPwgsH4J5Uhh5mV5XoWnkurdiY+U= github.com/go-openapi/spec v0.20.15/go.mod h1:o0upgqg5uYFG7O5mADrDVmSG3Wa6y6OLhwiCqQ+sTv4= github.com/go-openapi/strfmt v0.22.2 h1:DPYOrm6gexCfZZfXUaXFS4+Jw6HAaIIG0SZ5630f8yw= From 33785741a6831b1ca6754ce7aa381f790973f198 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Fri, 8 Mar 2024 11:48:44 +0200 Subject: [PATCH 107/192] K8SPS-332 improve build script (#579) * K8SPS-332 improve e2e-tests/build * fix message --- e2e-tests/build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e-tests/build b/e2e-tests/build index de4b733b6..0251a7bf4 100755 --- a/e2e-tests/build +++ b/e2e-tests/build @@ -34,10 +34,10 @@ build_operator() { build_command='build' if echo "$DOCKER_DEFAULT_PLATFORM" | grep -q ','; then build_command='buildx build' - if [[ ${DOCKER_PUSH:-1} == 1 ]]; then - build_options="$build_options --push=true" - else - build_options="$build_options --load" + build_options="$build_options --push=true" + if [ "${DOCKER_PUSH:-1}" = 0 ]; then + echo "'docker $build_command' doesn't support DOCKER_PUSH=0 option in case of multi-arch builds, please use DOCKER_PUSH=1" + exit 1 fi fi From 595218f1225e7db49009b992f656aee65bf7a175 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:49:23 +0200 Subject: [PATCH 108/192] CLOUD-727: Bump google.golang.org/grpc from 1.62.0 to 1.62.1 (#587) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.0 to 1.62.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.62.0...v1.62.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 62f814549..904878dc9 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.6.0 - google.golang.org/grpc v1.62.0 + google.golang.org/grpc v1.62.1 k8s.io/api v0.29.2 k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 diff --git a/go.sum b/go.sum index 92e1b75db..d9f03b1eb 100644 --- a/go.sum +++ b/go.sum @@ -381,8 +381,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= From d4da58364bb60548384435e0bfdfca636936b657 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:03:22 +0200 Subject: [PATCH 109/192] CLOUD-727: Bump github.com/Azure/azure-sdk-for-go/sdk/storage/azblob (#583) Bumps [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.3.0...sdk/azcore/v1.3.1) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 904878dc9..864260fa5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/percona/percona-server-mysql-operator go 1.21 require ( - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 github.com/cert-manager/cert-manager v1.14.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 diff --git a/go.sum b/go.sum index d9f03b1eb..a033d7b71 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aM github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0 h1:IfFdxTUDiV58iZqPKgyWiz4X4fCxZeQ1pTQPImLYXpY= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.0/go.mod h1:SUZc9YRRHfx2+FAQKNDGrssXehqLpxmwRv2mC/5ntj4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 h1:fXPMAmuh0gDuRDey0atC8cXBuKIlqCzCkL8sm1n9Ov0= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1/go.mod h1:SUZc9YRRHfx2+FAQKNDGrssXehqLpxmwRv2mC/5ntj4= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= From 8edfbab7bc303f368c62e64c968539507ae94b38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:49:45 +0200 Subject: [PATCH 110/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.67 to 7.0.69 (#591) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.67 to 7.0.69. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.67...v7.0.69) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 13 ++++++------- go.sum | 27 ++++++++++++--------------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 864260fa5..96fd9984b 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/go-openapi/validate v0.23.2 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d - github.com/minio/minio-go/v7 v7.0.67 + github.com/minio/minio-go/v7 v7.0.69 github.com/onsi/ginkgo/v2 v2.15.0 github.com/onsi/gomega v1.31.1 github.com/pkg/errors v0.9.1 @@ -77,7 +77,7 @@ require ( github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/minio/md5-simd v1.1.2 // indirect @@ -95,7 +95,6 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.9.0 // indirect @@ -108,11 +107,11 @@ require ( go.opentelemetry.io/otel v1.21.0 // indirect go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/net v0.20.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.16.1 // indirect diff --git a/go.sum b/go.sum index a033d7b71..88254e653 100644 --- a/go.sum +++ b/go.sum @@ -141,8 +141,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= +github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -166,8 +166,8 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvls github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.67 h1:BeBvZWAS+kRJm1vGTMJYVjKUNoo0FoEt/wUWdUtfmh8= -github.com/minio/minio-go/v7 v7.0.67/go.mod h1:+UXocnUeZ3wHvVh5s95gcrA4YjMIbccT6ubB+1m054A= +github.com/minio/minio-go/v7 v7.0.69 h1:l8AnsQFyY1xiwa/DaQskY4NXSLA2yrGsW5iD9nRPVS0= +github.com/minio/minio-go/v7 v7.0.69/go.mod h1:XAvOPJQ5Xlzk5o3o/ArO2NMbhSGkimC+bpW/ngRKDmQ= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -221,8 +221,6 @@ github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sjmudd/stopwatch v0.1.1 h1:x45OvxFB5OtCkjvYtzRF5fWB857Jzjjk84Oyd5C5ebw= github.com/sjmudd/stopwatch v0.1.1/go.mod h1:BLw0oIQJ1YLXBO/q9ufK/SgnKBVIkC2qrm6uy78Zw6U= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= @@ -283,8 +281,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= @@ -305,8 +303,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= @@ -328,15 +326,14 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= From 066af8a3c6f2f1c0d8fe6e2f1b289776242e5ce7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 11:00:59 +0200 Subject: [PATCH 111/192] CLOUD-727: Bump github.com/onsi/ginkgo/v2 from 2.15.0 to 2.16.0 (#582) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.15.0 to 2.16.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.15.0...v2.16.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 96fd9984b..a9dded7c3 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 - github.com/onsi/ginkgo/v2 v2.15.0 + github.com/onsi/ginkgo/v2 v2.16.0 github.com/onsi/gomega v1.31.1 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 @@ -114,7 +114,7 @@ require ( golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/tools v0.17.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect diff --git a/go.sum b/go.sum index 88254e653..59f530fa5 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= +github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -352,8 +352,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 833a7f41ce7ed315021305af9a6b2daa1a5bea95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:58:29 +0200 Subject: [PATCH 112/192] CLOUD-727: Bump github.com/go-openapi/runtime from 0.27.2 to 0.28.0 (#593) Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.27.2 to 0.28.0. - [Release notes](https://github.com/go-openapi/runtime/releases) - [Commits](https://github.com/go-openapi/runtime/compare/v0.27.2...v0.28.0) --- updated-dependencies: - dependency-name: github.com/go-openapi/runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 26 +++++++++++++------------- go.sum | 56 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/go.mod b/go.mod index a9dded7c3..67ffb85d8 100644 --- a/go.mod +++ b/go.mod @@ -7,11 +7,11 @@ require ( github.com/cert-manager/cert-manager v1.14.3 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 - github.com/go-openapi/errors v0.21.1 - github.com/go-openapi/runtime v0.27.2 - github.com/go-openapi/strfmt v0.22.2 - github.com/go-openapi/swag v0.22.10 - github.com/go-openapi/validate v0.23.2 + github.com/go-openapi/errors v0.22.0 + github.com/go-openapi/runtime v0.28.0 + github.com/go-openapi/strfmt v0.23.0 + github.com/go-openapi/swag v0.23.0 + github.com/go-openapi/validate v0.24.0 github.com/go-sql-driver/mysql v1.7.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 @@ -36,7 +36,7 @@ require ( github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect @@ -58,11 +58,11 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/analysis v0.22.3 // indirect - github.com/go-openapi/jsonpointer v0.20.3 // indirect - github.com/go-openapi/jsonreference v0.20.5 // indirect - github.com/go-openapi/loads v0.21.6 // indirect - github.com/go-openapi/spec v0.20.15 // indirect + github.com/go-openapi/analysis v0.23.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/loads v0.22.0 // indirect + github.com/go-openapi/spec v0.21.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -104,8 +104,8 @@ require ( go.mongodb.org/mongo-driver v1.14.0 // indirect go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect - go.opentelemetry.io/otel v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.19.0 // indirect golang.org/x/net v0.21.0 // indirect diff --git a/go.sum b/go.sum index 59f530fa5..7ef91e443 100644 --- a/go.sum +++ b/go.sum @@ -67,26 +67,26 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/analysis v0.22.3 h1:JfHesJsGyiNUlcDuuE1wg9QVQmXd6iB/TKCmHz9+P2U= -github.com/go-openapi/analysis v0.22.3/go.mod h1:y2vjQNdRVOg0gG88n7gBGKWm3yjNOlaTVkxBLHaNlts= -github.com/go-openapi/errors v0.21.1 h1:rVisxQPdETctjlYntm0Ek4dKf68nAQocCloCT50vWuI= -github.com/go-openapi/errors v0.21.1/go.mod h1:LyiY9bgc7AVVh6wtVvMYEyoj3KJYNoRw92mmvnMWgj8= -github.com/go-openapi/jsonpointer v0.20.3 h1:jykzYWS/kyGtsHfRt6aV8JTB9pcQAXPIA7qlZ5aRlyk= -github.com/go-openapi/jsonpointer v0.20.3/go.mod h1:c7l0rjoouAuIxCm8v/JWKRgMjDG/+/7UBWsXMrv6PsM= -github.com/go-openapi/jsonreference v0.20.5 h1:hutI+cQI+HbSQaIGSfsBsYI0pHk+CATf8Fk5gCSj0yI= -github.com/go-openapi/jsonreference v0.20.5/go.mod h1:thAqAp31UABtI+FQGKAQfmv7DbFpKNUlva2UPCxKu2Y= -github.com/go-openapi/loads v0.21.6 h1:qo9Ow4mbOe+epbJcFxPSYKVvPgHT+vvZRNC2BRatEeE= -github.com/go-openapi/loads v0.21.6/go.mod h1:eEquguZx+S9eigxJ7QhrzfhW1Me47n54wlHX9RK8to4= -github.com/go-openapi/runtime v0.27.2 h1:AOvytl8s9DzL7B27r6dZ4sqjVOJT6/3LzKeZoDIAh+g= -github.com/go-openapi/runtime v0.27.2/go.mod h1:a5AkfzISU/Iwq51ZiQLM+oNRDwqC9RtlSt57xUSyZhg= -github.com/go-openapi/spec v0.20.15 h1:8bDcVxF607pTh9NpPwgsH4J5Uhh5mV5XoWnkurdiY+U= -github.com/go-openapi/spec v0.20.15/go.mod h1:o0upgqg5uYFG7O5mADrDVmSG3Wa6y6OLhwiCqQ+sTv4= -github.com/go-openapi/strfmt v0.22.2 h1:DPYOrm6gexCfZZfXUaXFS4+Jw6HAaIIG0SZ5630f8yw= -github.com/go-openapi/strfmt v0.22.2/go.mod h1:HB/b7TCm91rno75Dembc1dFW/0FPLk5CEXsoF9ReNc4= -github.com/go-openapi/swag v0.22.10 h1:4y86NVn7Z2yYd6pfS4Z+Nyh3aAUL3Nul+LMbhFKy0gA= -github.com/go-openapi/swag v0.22.10/go.mod h1:Cnn8BYtRlx6BNE3DPN86f/xkapGIcLWzh3CLEb4C1jI= -github.com/go-openapi/validate v0.23.2 h1:dSV8fmCwFwTE6TYGVmWtpWN9aOTsidzcBsB2qPohZYI= -github.com/go-openapi/validate v0.23.2/go.mod h1:FencnMQqop3HPZk+wIkLsQHgOKP1EDAgF2LZDW7fWr8= +github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= +github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= +github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= +github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= +github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= +github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= +github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= +github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= +github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= +github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= +github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= +github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -259,14 +259,14 @@ go.nhat.io/matcher/v2 v2.0.0 h1:W+rbHi0hKuZHtOQH4U5g+KwyKyfVioIxrxjoGRcUETE= go.nhat.io/matcher/v2 v2.0.0/go.mod h1:cL5oYp0M9A4L8jEGqjmUfy+k7AXVDddoVt6aYIL1r5g= go.nhat.io/wait v0.1.0 h1:aQ4YDzaOgFbypiJ9c/eAfOIB1G25VOv7Gd2QS8uz1gw= go.nhat.io/wait v0.1.0/go.mod h1:+ijMghc9/9zXi+HDcs49HNReprvXOZha2Q3jTOtqJrE= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= From 957265f99566bae49cea444c79c6b380b66e627a Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Wed, 13 Mar 2024 11:14:13 +0100 Subject: [PATCH 113/192] K8SPS-256: Remove SQL command from logs (#592) * Remove command from logs. * Fix panic when deleting the cluster with finalizers. --------- Co-authored-by: Viacheslav Sarzhan --- pkg/controller/ps/controller.go | 12 ++++++------ pkg/mysqlsh/mysqlshexec.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 275cd6041..519d070e5 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -99,12 +99,6 @@ func (r *PerconaServerMySQLReconciler) Reconcile( var cr *apiv1alpha1.PerconaServerMySQL var err error - defer func() { - if err := r.reconcileCRStatus(ctx, cr, err); err != nil { - log.Error(err, "failed to update status") - } - }() - cr, err = k8s.GetCRWithDefaults(ctx, r.Client, req.NamespacedName, r.ServerVersion) if err != nil { if k8serrors.IsNotFound(err) { @@ -118,6 +112,12 @@ func (r *PerconaServerMySQLReconciler) Reconcile( return rr, r.applyFinalizers(ctx, cr) } + defer func() { + if err := r.reconcileCRStatus(ctx, cr, err); err != nil { + log.Error(err, "failed to update status") + } + }() + if err = r.doReconcile(ctx, cr); err != nil { return rr, errors.Wrap(err, "reconcile") } diff --git a/pkg/mysqlsh/mysqlshexec.go b/pkg/mysqlsh/mysqlshexec.go index cd3543adb..ded36a07c 100644 --- a/pkg/mysqlsh/mysqlshexec.go +++ b/pkg/mysqlsh/mysqlshexec.go @@ -33,7 +33,7 @@ func (m *mysqlshExec) runWithExec(ctx context.Context, cmd string) error { if err != nil { sout := sensitiveRegexp.ReplaceAllString(outb.String(), ":*****@") serr := sensitiveRegexp.ReplaceAllString(errb.String(), ":*****@") - return errors.Wrapf(err, "run %s, stdout: %s, stderr: %s", cmd, sout, serr) + return errors.Wrapf(err, "stdout: %s, stderr: %s", sout, serr) } return nil @@ -73,7 +73,7 @@ func (m *mysqlshExec) ClusterStatusWithExec(ctx context.Context, clusterName str if err != nil { sout := sensitiveRegexp.ReplaceAllString(stdoutBuffer.String(), ":*****@") serr := sensitiveRegexp.ReplaceAllString(stderrBuffer.String(), ":*****@") - return status, errors.Wrapf(err, "run %s, stdout: %s, stderr: %s", c, sout, serr) + return status, errors.Wrapf(err, "stdout: %s, stderr: %s", sout, serr) } if err := json.Unmarshal(stdoutBuffer.Bytes(), &status); err != nil { From a3a760f9befbdecfdd680f86f3601068e896f291 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 18:04:57 +0200 Subject: [PATCH 114/192] CLOUD-727: Bump github.com/go-sql-driver/mysql from 1.7.1 to 1.8.0 (#596) Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/go-sql-driver/mysql/releases) - [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-sql-driver/mysql/compare/v1.7.1...v1.8.0) --- updated-dependencies: - dependency-name: github.com/go-sql-driver/mysql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 3 ++- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 67ffb85d8..e51beab36 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/go-openapi/strfmt v0.23.0 github.com/go-openapi/swag v0.23.0 github.com/go-openapi/validate v0.24.0 - github.com/go-sql-driver/mysql v1.7.1 + github.com/go-sql-driver/mysql v1.8.0 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 github.com/onsi/ginkgo/v2 v2.16.0 @@ -31,6 +31,7 @@ require ( ) require ( + filippo.io/edwards25519 v1.1.0 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index 7ef91e443..5ab133bf4 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= @@ -87,8 +89,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.0 h1:UtktXaU2Nb64z/pLiGIxY4431SJ4/dR5cjMmlVHgnT4= +github.com/go-sql-driver/mysql v1.8.0/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= From 32f03357a9ad8fe606763e377a659eb3051552d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:33:29 +0200 Subject: [PATCH 115/192] CLOUD-727: Bump github.com/cert-manager/cert-manager (#597) Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.14.3 to 1.14.4. - [Release notes](https://github.com/cert-manager/cert-manager/releases) - [Commits](https://github.com/cert-manager/cert-manager/compare/v1.14.3...v1.14.4) --- updated-dependencies: - dependency-name: github.com/cert-manager/cert-manager dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e51beab36..0341f725b 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 - github.com/cert-manager/cert-manager v1.14.3 + github.com/cert-manager/cert-manager v1.14.4 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.22.0 @@ -119,7 +119,7 @@ require ( gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 5ab133bf4..f3f1076a9 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8 github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cert-manager/cert-manager v1.14.3 h1:u1TVd/bD4NnAFjttzOyZYV0iOcoMGGoNfrLvSdx7a70= -github.com/cert-manager/cert-manager v1.14.3/go.mod h1:pik7K6jXfgh++lfVJ/i1HzEnDluSUtTVLXSHikj8Lho= +github.com/cert-manager/cert-manager v1.14.4 h1:DLXIZHx3jhkViYfobXo+N7/od/oj4YgG6AJw4ORJnYs= +github.com/cert-manager/cert-manager v1.14.4/go.mod h1:d+CBeRu5MbpHTfXkkiiamUhnfdvhbThoOPwilU4UM98= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -384,8 +384,8 @@ google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From c79c5987185aadf4f3827af0579c2094eadeb477 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Tue, 19 Mar 2024 13:48:53 +0100 Subject: [PATCH 116/192] K8SPS-73 - Add gr-security-context test (#590) --- deploy/cr.yaml | 11 ++ e2e-tests/run-distro.csv | 1 + e2e-tests/run-pr.csv | 1 + e2e-tests/run-release.csv | 1 + .../tests/gr-security-context/00-assert.yaml | 9 ++ .../gr-security-context/00-minio-secret.yaml | 7 ++ .../tests/gr-security-context/01-assert.yaml | 29 +++++ .../01-deploy-operator.yaml | 17 +++ .../tests/gr-security-context/02-assert.yaml | 111 ++++++++++++++++++ .../02-create-cluster.yaml | 30 +++++ .../gr-security-context/03-write-data.yaml | 17 +++ .../tests/gr-security-context/04-assert.yaml | 25 ++++ .../04-create-backup-minio.yaml | 7 ++ .../tests/gr-security-context/05-assert.yaml | 24 ++++ .../gr-security-context/05-delete-data.yaml | 18 +++ .../tests/gr-security-context/06-assert.yaml | 25 ++++ .../06-restore-from-minio.yaml | 7 ++ .../tests/gr-security-context/07-assert.yaml | 24 ++++ .../gr-security-context/07-read-data.yaml | 15 +++ .../99-drop-finalizer.yaml | 5 + 20 files changed, 384 insertions(+) create mode 100644 e2e-tests/tests/gr-security-context/00-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/00-minio-secret.yaml create mode 100644 e2e-tests/tests/gr-security-context/01-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/01-deploy-operator.yaml create mode 100644 e2e-tests/tests/gr-security-context/02-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/02-create-cluster.yaml create mode 100644 e2e-tests/tests/gr-security-context/03-write-data.yaml create mode 100644 e2e-tests/tests/gr-security-context/04-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/04-create-backup-minio.yaml create mode 100644 e2e-tests/tests/gr-security-context/05-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/05-delete-data.yaml create mode 100644 e2e-tests/tests/gr-security-context/06-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/06-restore-from-minio.yaml create mode 100644 e2e-tests/tests/gr-security-context/07-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/07-read-data.yaml create mode 100644 e2e-tests/tests/gr-security-context/99-drop-finalizer.yaml diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 6ff1c8c16..7836a2dcb 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -127,6 +127,11 @@ spec: # resources: # requests: # storage: 1G +# containerSecurityContext: +# privileged: true +# podSecurityContext: +# fsGroup: 1001 +# supplementalGroups: [1001, 1002, 1003] proxy: haproxy: @@ -233,6 +238,12 @@ spec: # loadBalancerIP: 127.0.0.1 # loadBalancerSourceRanges: # - 10.0.0.0/8 +# containerSecurityContext: +# privileged: true +# podSecurityContext: +# fsGroup: 1001 +# supplementalGroups: [1001, 1002, 1003] + router: enabled: false image: perconalab/percona-server-mysql-operator:main-router diff --git a/e2e-tests/run-distro.csv b/e2e-tests/run-distro.csv index 6d244cee2..06142e3bb 100644 --- a/e2e-tests/run-distro.csv +++ b/e2e-tests/run-distro.csv @@ -9,6 +9,7 @@ gr-init-deploy gr-one-pod gr-recreate gr-scaling +gr-security-context gr-self-healing gr-tls-cert-manager gr-users diff --git a/e2e-tests/run-pr.csv b/e2e-tests/run-pr.csv index d9ea3cf60..cdd85364c 100644 --- a/e2e-tests/run-pr.csv +++ b/e2e-tests/run-pr.csv @@ -11,6 +11,7 @@ gr-init-deploy gr-one-pod gr-recreate gr-scaling +gr-security-context gr-self-healing gr-tls-cert-manager gr-users diff --git a/e2e-tests/run-release.csv b/e2e-tests/run-release.csv index d9ea3cf60..cdd85364c 100644 --- a/e2e-tests/run-release.csv +++ b/e2e-tests/run-release.csv @@ -11,6 +11,7 @@ gr-init-deploy gr-one-pod gr-recreate gr-scaling +gr-security-context gr-self-healing gr-tls-cert-manager gr-users diff --git a/e2e-tests/tests/gr-security-context/00-assert.yaml b/e2e-tests/tests/gr-security-context/00-assert.yaml new file mode 100644 index 000000000..fecdb222e --- /dev/null +++ b/e2e-tests/tests/gr-security-context/00-assert.yaml @@ -0,0 +1,9 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- +apiVersion: v1 +kind: Secret +metadata: + name: minio-secret +type: Opaque diff --git a/e2e-tests/tests/gr-security-context/00-minio-secret.yaml b/e2e-tests/tests/gr-security-context/00-minio-secret.yaml new file mode 100644 index 000000000..3c797f054 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/00-minio-secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: minio-secret +stringData: + AWS_ACCESS_KEY_ID: some-access$\n"-key + AWS_SECRET_ACCESS_KEY: some-$\n"secret-key diff --git a/e2e-tests/tests/gr-security-context/01-assert.yaml b/e2e-tests/tests/gr-security-context/01-assert.yaml new file mode 100644 index 000000000..30e8e19de --- /dev/null +++ b/e2e-tests/tests/gr-security-context/01-assert.yaml @@ -0,0 +1,29 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +status: + availableReplicas: 1 + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updatedReplicas: 1 diff --git a/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml b/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml new file mode 100644 index 000000000..cb9e3c5ab --- /dev/null +++ b/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + init_temp_dir # do this only in the first TestStep + + kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + deploy_operator + deploy_non_tls_cluster_secrets + deploy_tls_cluster_secrets + deploy_client + deploy_minio + timeout: 300 diff --git a/e2e-tests/tests/gr-security-context/02-assert.yaml b/e2e-tests/tests/gr-security-context/02-assert.yaml new file mode 100644 index 000000000..9d3cf097c --- /dev/null +++ b/e2e-tests/tests/gr-security-context/02-assert.yaml @@ -0,0 +1,111 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-security-context-mysql +spec: + template: + spec: + containers: + - args: + - mysqld + command: + - /opt/percona/ps-entrypoint.sh + name: mysql + securityContext: + privileged: true + - command: + - /opt/percona/sidecar + name: xtrabackup + initContainers: + - command: + - /opt/percona-server-mysql-operator/ps-init-entrypoint.sh + name: mysql-init + securityContext: + privileged: true + securityContext: + fsGroup: 1001 + supplementalGroups: + - 1001 + - 1002 + - 1003 +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-security-context-haproxy +spec: + template: + spec: + containers: + - args: + - haproxy + command: + - /opt/percona/haproxy-entrypoint.sh + name: haproxy + securityContext: + privileged: true + - args: + - /opt/percona/peer-list + - -on-change=/opt/percona/haproxy_add_mysql_nodes.sh + - -service=$(MYSQL_SERVICE) + name: mysql-monit + securityContext: + privileged: true + initContainers: + - command: + - /opt/percona-server-mysql-operator/ps-init-entrypoint.sh + name: haproxy-init + securityContext: + privileged: true + securityContext: + fsGroup: 1001 + supplementalGroups: + - 1001 + - 1002 + - 1003 +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + currentReplicas: 3 + updatedReplicas: 3 + collisionCount: 0 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-security-context +spec: + allowUnsafeConfigurations: false +status: + conditions: + - reason: Initializing + status: "False" + type: Initializing + - reason: Ready + status: "True" + type: Ready + - message: InnoDB cluster successfully bootstrapped with 3 nodes + reason: InnoDBClusterBootstrapped + status: "True" + type: InnoDBClusterBootstrapped + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/gr-security-context/02-create-cluster.yaml b/e2e-tests/tests/gr-security-context/02-create-cluster.yaml new file mode 100644 index 000000000..0bb63cf11 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/02-create-cluster.yaml @@ -0,0 +1,30 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.backup.storages.minio.type="s3"' - \ + | yq eval '.spec.backup.storages.minio.type="s3"' - \ + | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ + | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ + | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ + | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ + | yq eval '.spec.backup.storages.minio.containerSecurityContext.privileged=true' - \ + | yq eval '.spec.backup.storages.minio.podSecurityContext.fsGroup=1001' - \ + | yq eval '.spec.backup.storages.minio.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ + | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.mysql.containerSecurityContext.privileged=true' - \ + | yq eval '.spec.mysql.podSecurityContext.fsGroup=1001' - \ + | yq eval '.spec.mysql.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ + | yq eval '.spec.proxy.router.enabled=false' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.spec.proxy.haproxy.containerSecurityContext.privileged=true' - \ + | yq eval '.spec.proxy.haproxy.podSecurityContext.fsGroup=1001' - \ + | yq eval '.spec.proxy.haproxy.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-security-context/03-write-data.yaml b/e2e-tests/tests/gr-security-context/03-write-data.yaml new file mode 100644 index 000000000..c7ae38cbf --- /dev/null +++ b/e2e-tests/tests/gr-security-context/03-write-data.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o pipefail + set -o xtrace + + source ../../functions + + run_mysql \ + "CREATE DATABASE IF NOT EXISTS myDB; CREATE TABLE IF NOT EXISTS myDB.myTable (id int PRIMARY KEY)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + run_mysql \ + "INSERT myDB.myTable (id) VALUES (100500)" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" diff --git a/e2e-tests/tests/gr-security-context/04-assert.yaml b/e2e-tests/tests/gr-security-context/04-assert.yaml new file mode 100644 index 000000000..54c1d9065 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/04-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 300 +--- +kind: PerconaServerMySQLBackup +apiVersion: ps.percona.com/v1alpha1 +metadata: + name: gr-security-context-minio +status: + state: Succeeded + storage: + containerSecurityContext: + privileged: true + podSecurityContext: + fsGroup: 1001 + supplementalGroups: + - 1001 + - 1002 + - 1003 + s3: + bucket: operator-testing + credentialsSecret: minio-secret + endpointUrl: http://minio-service:9000 + region: us-east-1 + type: s3 diff --git a/e2e-tests/tests/gr-security-context/04-create-backup-minio.yaml b/e2e-tests/tests/gr-security-context/04-create-backup-minio.yaml new file mode 100644 index 000000000..f8f429a3e --- /dev/null +++ b/e2e-tests/tests/gr-security-context/04-create-backup-minio.yaml @@ -0,0 +1,7 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQLBackup +metadata: + name: gr-security-context-minio +spec: + clusterName: gr-security-context + storageName: minio diff --git a/e2e-tests/tests/gr-security-context/05-assert.yaml b/e2e-tests/tests/gr-security-context/05-assert.yaml new file mode 100644 index 000000000..b9141ada3 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/05-assert.yaml @@ -0,0 +1,24 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-0 +data: + data: "" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-1 +data: + data: "" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-2 +data: + data: "" diff --git a/e2e-tests/tests/gr-security-context/05-delete-data.yaml b/e2e-tests/tests/gr-security-context/05-delete-data.yaml new file mode 100644 index 000000000..7857b208e --- /dev/null +++ b/e2e-tests/tests/gr-security-context/05-delete-data.yaml @@ -0,0 +1,18 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + run_mysql \ + "TRUNCATE TABLE myDB.myTable" \ + "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + cluster_name=$(get_cluster_name) + for i in 0 1 2; do + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${cluster_name}-mysql-${i}.${cluster_name}-mysql -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 04-delete-data-minio-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-security-context/06-assert.yaml b/e2e-tests/tests/gr-security-context/06-assert.yaml new file mode 100644 index 000000000..f49e9b323 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/06-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 500 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-security-context +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + state: ready +--- +kind: PerconaServerMySQLRestore +apiVersion: ps.percona.com/v1alpha1 +metadata: + name: gr-security-context-restore-minio +status: + state: Succeeded diff --git a/e2e-tests/tests/gr-security-context/06-restore-from-minio.yaml b/e2e-tests/tests/gr-security-context/06-restore-from-minio.yaml new file mode 100644 index 000000000..9b2a13cf9 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/06-restore-from-minio.yaml @@ -0,0 +1,7 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQLRestore +metadata: + name: gr-security-context-restore-minio +spec: + clusterName: gr-security-context + backupName: gr-security-context-minio diff --git a/e2e-tests/tests/gr-security-context/07-assert.yaml b/e2e-tests/tests/gr-security-context/07-assert.yaml new file mode 100644 index 000000000..17deff5a9 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/07-assert.yaml @@ -0,0 +1,24 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-0 +data: + data: "100500" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-1 +data: + data: "100500" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-2 +data: + data: "100500" diff --git a/e2e-tests/tests/gr-security-context/07-read-data.yaml b/e2e-tests/tests/gr-security-context/07-read-data.yaml new file mode 100644 index 000000000..7e6c5df6e --- /dev/null +++ b/e2e-tests/tests/gr-security-context/07-read-data.yaml @@ -0,0 +1,15 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + cluster_name=$(get_cluster_name) + for i in 0 1 2; do + data=$(run_mysql "SELECT * FROM myDB.myTable" "-h ${cluster_name}-mysql-${i}.${cluster_name}-mysql -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 06-read-data-minio-${i} --from-literal=data="${data}" + done diff --git a/e2e-tests/tests/gr-security-context/99-drop-finalizer.yaml b/e2e-tests/tests/gr-security-context/99-drop-finalizer.yaml new file mode 100644 index 000000000..c728762f4 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/99-drop-finalizer.yaml @@ -0,0 +1,5 @@ +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-security-context + finalizers: [] From b908f57aa30b63bc4e610ef24ae602ae84ffbc1b Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Tue, 19 Mar 2024 14:11:56 +0100 Subject: [PATCH 117/192] K8SPS-314 - Lower backoffLimit from 10 to 6 as in cr.yaml example (#601) --- pkg/xtrabackup/xtrabackup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/xtrabackup/xtrabackup.go b/pkg/xtrabackup/xtrabackup.go index f86c347fd..5a2ed4434 100644 --- a/pkg/xtrabackup/xtrabackup.go +++ b/pkg/xtrabackup/xtrabackup.go @@ -72,7 +72,7 @@ func Job( t := true labels := util.SSMapMerge(storage.Labels, MatchLabels(cluster)) - backoffLimit := int32(10) + backoffLimit := int32(6) if cluster.Spec.Backup.BackoffLimit != nil { backoffLimit = *cluster.Spec.Backup.BackoffLimit } From e1148ce82b2a902f1b20472c54a431be54dda05e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:49:35 +0200 Subject: [PATCH 118/192] CLOUD-727: Bump k8s.io/client-go from 0.29.2 to 0.29.3 (#603) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.2 to 0.29.3. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.29.2...v0.29.3) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 0341f725b..3f510048b 100644 --- a/go.mod +++ b/go.mod @@ -23,9 +23,9 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/sync v0.6.0 google.golang.org/grpc v1.62.1 - k8s.io/api v0.29.2 - k8s.io/apimachinery v0.29.2 - k8s.io/client-go v0.29.2 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 k8s.io/utils v0.0.0-20240102154912-e7106e64919e sigs.k8s.io/controller-runtime v0.17.2 ) @@ -67,7 +67,7 @@ require ( github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect diff --git a/go.sum b/go.sum index f3f1076a9..e1e5a1214 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,8 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -408,14 +408,14 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A= -k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= -k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8= -k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= -k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= -k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= From d24394dfb3c5f858833a8b548c174f2e231759c9 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:52:06 +0200 Subject: [PATCH 119/192] K8SPS-314 Update images and versions for 0.7.0 release (#602) * K8SPS-314 Update images and versions for 0.7.0 release * Update MySQL and related images * we have an official docker image for toolkit, so we will use it --- deploy/bundle.yaml | 2 +- deploy/cr.yaml | 14 +++++++------- deploy/operator.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 29260ce47..63c266178 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -9747,7 +9747,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.7.0 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 7836a2dcb..645afcb7b 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -33,7 +33,7 @@ spec: mysql: clusterType: group-replication autoRecovery: true - image: perconalab/percona-server-mysql-operator:main-psmysql + image: percona/percona-server:8.0.36-28 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.7.0 @@ -139,7 +139,7 @@ spec: size: 3 - image: perconalab/percona-server-mysql-operator:main-haproxy + image: percona/haproxy:2.8.5 imagePullPolicy: Always resources: @@ -246,7 +246,7 @@ spec: router: enabled: false - image: perconalab/percona-server-mysql-operator:main-router + image: percona/percona-mysql-router:8.0.36 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.7.0 @@ -299,7 +299,7 @@ spec: orchestrator: enabled: false - image: perconalab/percona-server-mysql-operator:main-orchestrator + image: percona/percona-orchestrator:3.2.6-12 imagePullPolicy: Always # serviceAccountName: percona-server-mysql-operator-orchestrator # initImage: percona/percona-server-mysql-operator:0.7.0 @@ -352,7 +352,7 @@ spec: pmm: enabled: false - image: percona/pmm-client:2.39.0 + image: percona/pmm-client:2.41.1 imagePullPolicy: Always resources: @@ -368,7 +368,7 @@ spec: backup: enabled: true - image: perconalab/percona-server-mysql-operator:main-backup + image: percona/percona-xtrabackup:8.0.35-30 # backoffLimit: 6 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.7.0 @@ -422,7 +422,7 @@ spec: # prefix: "" toolkit: - image: perconalab/percona-server-mysql-operator:main-toolkit + image: percona/percona-toolkit:3.5.7 imagePullPolicy: Always # resources: # requests: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index a8de16608..b31048304 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -47,7 +47,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.7.0 imagePullPolicy: Always livenessProbe: httpGet: From c867913b4d3a2d7db2c36ce7100539b51f5b62af Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:21:10 +0200 Subject: [PATCH 120/192] Update cert-manager version to v1.14.4 (#608) --- e2e-tests/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 73ff4470a..e3e53bffd 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -508,7 +508,7 @@ deploy_version_service() { deploy_cert_manager() { kubectl create namespace cert-manager || : kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true || : - kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.3/cert-manager.yaml --validate=false || : 2>/dev/null + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yaml --validate=false || : 2>/dev/null } get_primary_from_label() { From b1ffa6d8f27f7405383d665f352040f04aefdb5f Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Thu, 21 Mar 2024 12:10:39 +0100 Subject: [PATCH 121/192] K8SPS-182 - Improve checks in tls-cert-manager tests (#610) --- .../tests/gr-demand-backup/02-assert.yaml | 1 - .../tests/gr-tls-cert-manager/02-assert.yaml | 35 +++++++ .../tests/gr-tls-cert-manager/04-assert.yaml | 24 +++++ .../tests/gr-tls-cert-manager/06-assert.yaml | 94 +++++++++++++++++++ .../tests/tls-cert-manager/02-assert.yaml | 30 ++++++ .../tests/tls-cert-manager/04-assert.yaml | 30 ++++++ .../tests/tls-cert-manager/06-assert.yaml | 93 ++++++++++++++++++ 7 files changed, 306 insertions(+), 1 deletion(-) create mode 100644 e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml create mode 100644 e2e-tests/tests/tls-cert-manager/06-assert.yaml diff --git a/e2e-tests/tests/gr-demand-backup/02-assert.yaml b/e2e-tests/tests/gr-demand-backup/02-assert.yaml index 73a6e7ceb..e4f9be085 100644 --- a/e2e-tests/tests/gr-demand-backup/02-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup/02-assert.yaml @@ -53,4 +53,3 @@ status: size: 3 state: ready state: ready - diff --git a/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml index a8633a920..fad60c296 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml @@ -68,3 +68,38 @@ status: updatedReplicas: 3 readyReplicas: 3 availableReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-tls-cert-manager + generation: 1 +spec: + mysql: + clusterType: group-replication + proxy: + haproxy: + enabled: false + router: + enabled: true +status: + conditions: + - reason: Initializing + status: "False" + type: Initializing + - reason: Ready + status: "True" + type: Ready + - message: InnoDB cluster successfully bootstrapped with 3 nodes + reason: InnoDBClusterBootstrapped + status: "True" + type: InnoDBClusterBootstrapped + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml index 46429cc2e..b5ac60eeb 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml @@ -68,3 +68,27 @@ status: updatedReplicas: 3 readyReplicas: 3 availableReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-tls-cert-manager + generation: 2 +spec: + mysql: + clusterType: group-replication + proxy: + haproxy: + enabled: false + router: + enabled: true +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml new file mode 100644 index 000000000..ea9d87eb8 --- /dev/null +++ b/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml @@ -0,0 +1,94 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 400 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: gr-tls-cert-manager-ca-cert +spec: + commonName: gr-tls-cert-manager-ca + duration: 8760h0m0s + isCA: true + issuerRef: + kind: Issuer + name: gr-tls-cert-manager-pso-ca-issuer + renewBefore: 730h0m0s + secretName: gr-tls-cert-manager-ca-cert +status: + conditions: + - message: Certificate is up to date and has not expired + observedGeneration: 1 + reason: Ready + status: 'True' + type: Ready + revision: 1 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: gr-tls-cert-manager-ssl +spec: + issuerRef: + kind: Issuer + name: gr-tls-cert-manager-pso-issuer + secretName: test-ssl +status: + conditions: + - message: Certificate is up to date and has not expired + observedGeneration: 2 + reason: Ready + status: 'True' + type: Ready + revision: 3 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + generation: 3 + name: gr-tls-cert-manager-mysql +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: gr-tls-cert-manager-router + labels: + app.kubernetes.io/component: router + app.kubernetes.io/instance: gr-tls-cert-manager + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server +status: + observedGeneration: 3 + replicas: 3 + updatedReplicas: 3 + readyReplicas: 3 + availableReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-tls-cert-manager + generation: 2 +spec: + mysql: + clusterType: group-replication + proxy: + haproxy: + enabled: false + router: + enabled: true +status: + mysql: + ready: 3 + size: 3 + state: ready + router: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/tls-cert-manager/02-assert.yaml b/e2e-tests/tests/tls-cert-manager/02-assert.yaml index 9ece08ea6..e256b00de 100644 --- a/e2e-tests/tests/tls-cert-manager/02-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/02-assert.yaml @@ -61,3 +61,33 @@ status: observedGeneration: 1 replicas: 3 readyReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: tls-cert-manager + finalizers: + - delete-mysql-pods-in-order + generation: 1 +spec: + mysql: + clusterType: async + proxy: + haproxy: + enabled: true + orchestrator: + enabled: false +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/tls-cert-manager/04-assert.yaml b/e2e-tests/tests/tls-cert-manager/04-assert.yaml index 8d61a1487..cd9b7e902 100644 --- a/e2e-tests/tests/tls-cert-manager/04-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/04-assert.yaml @@ -61,3 +61,33 @@ status: observedGeneration: 1 replicas: 3 readyReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: tls-cert-manager + finalizers: + - delete-mysql-pods-in-order + generation: 2 +spec: + mysql: + clusterType: async + proxy: + haproxy: + enabled: true + orchestrator: + enabled: false +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready diff --git a/e2e-tests/tests/tls-cert-manager/06-assert.yaml b/e2e-tests/tests/tls-cert-manager/06-assert.yaml new file mode 100644 index 000000000..16ea6bfff --- /dev/null +++ b/e2e-tests/tests/tls-cert-manager/06-assert.yaml @@ -0,0 +1,93 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 400 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: tls-cert-manager-ca-cert +spec: + commonName: tls-cert-manager-ca + duration: 8760h0m0s + isCA: true + issuerRef: + kind: Issuer + name: tls-cert-manager-pso-ca-issuer + renewBefore: 730h0m0s + secretName: tls-cert-manager-ca-cert +status: + conditions: + - message: Certificate is up to date and has not expired + observedGeneration: 1 + reason: Ready + status: 'True' + type: Ready + revision: 1 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: tls-cert-manager-ssl +spec: + issuerRef: + kind: Issuer + name: tls-cert-manager-pso-issuer + secretName: test-ssl +status: + conditions: + - message: Certificate is up to date and has not expired + observedGeneration: 2 + reason: Ready + status: 'True' + type: Ready + revision: 3 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + generation: 3 + name: tls-cert-manager-mysql +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + generation: 3 + name: tls-cert-manager-orc +status: + observedGeneration: 3 + replicas: 3 + readyReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: tls-cert-manager + finalizers: + - delete-mysql-pods-in-order + generation: 2 +spec: + mysql: + clusterType: async + proxy: + haproxy: + enabled: true + orchestrator: + enabled: false +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + orchestrator: + ready: 3 + size: 3 + state: ready + state: ready From 83b9f60ec88d0cd2b5b1a2c2721bd6ae18fc7dc8 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Sat, 23 Mar 2024 09:55:45 +0100 Subject: [PATCH 122/192] K8SPS-314 - Add upgrade strategy to operator.yaml (#611) --- config/manager/kustomization.yaml | 4 ++-- config/manager/manager.yaml | 4 ++++ deploy/bundle.yaml | 4 ++++ deploy/operator.yaml | 4 ++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 43d283c3e..09fc1bfba 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: perconalab/percona-server-mysql-operator - newName: perconalab/percona-server-mysql-operator - newTag: main + newName: percona/percona-server-mysql-operator + newTag: 0.7.0 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 422af587d..dad3a3fbb 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -8,6 +8,10 @@ spec: matchLabels: app.kubernetes.io/name: percona-server-mysql-operator replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 63c266178..a5662a7dd 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -9725,6 +9725,10 @@ spec: selector: matchLabels: app.kubernetes.io/name: percona-server-mysql-operator + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index b31048304..352c2599f 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -25,6 +25,10 @@ spec: selector: matchLabels: app.kubernetes.io/name: percona-server-mysql-operator + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: From 2c982be621219ecb6a63b817bbb7764e5c0580fa Mon Sep 17 00:00:00 2001 From: Dmitriy Kostiuk Date: Mon, 25 Mar 2024 21:05:07 +0300 Subject: [PATCH 123/192] K8SPS-129 add e2e tests readme (#612) * K8SPS-129 add e2e tests readme * addressing comments * address comments * Update README.md --- e2e-tests/README.md | 132 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 e2e-tests/README.md diff --git a/e2e-tests/README.md b/e2e-tests/README.md new file mode 100644 index 000000000..fb8acafb8 --- /dev/null +++ b/e2e-tests/README.md @@ -0,0 +1,132 @@ +# Building and testing the Operator + +## Requirements + +You need to install a number of software packages on your system to satisfy the build dependencies for building the Operator and/or to run its automated tests: + +* [kubectl](https://kubernetes.io/docs/tasks/tools/) - Kubernetes command-line tool +* [docker](https://www.docker.com/) - platform for developing, shipping, and running applications in containers +* [sed](https://www.gnu.org/software/sed/manual/sed.html) - CLI stream editor +* [helm](https://helm.sh/) - the package manager for Kubernetes +* [jq](https://stedolan.github.io/jq/) - command-line JSON processor +* [yq](https://github.com/mikefarah/yq) - command-line YAML processor +* [krew](https://github.com/kubernetes-sigs/krew) - package manager for kubectl plugins +* [assert](https://github.com/morningspace/kubeassert) kubectl plugin +* [kuttl](https://kuttl.dev/) Kubernetes test framework +* [gcloud](https://cloud.google.com/sdk/gcloud) - Google Cloud command-line tool (if the ability to run tests on Google Cloud is needed) + +### CentOS + +Run the following commands to install the required components: + +``` +sudo yum -y install epel-release https://repo.percona.com/yum/percona-release-latest.noarch.rpm +sudo yum -y install coreutils sed jq curl docker percona-xtrabackup-24 +sudo curl -s -L https://github.com/mikefarah/yq/releases/download/4.35.1/yq_linux_amd64 -o /usr/bin/yq +sudo chmod a+x /usr/bin/yq +curl -s -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz \ + | tar -C /usr/bin --strip-components 1 --wildcards -zxvpf - '*/oc' '*/kubectl' +curl -s https://get.helm.sh/helm-v3.12.3-linux-amd64.tar.gz \ + | tar -C /usr/bin --strip-components 1 -zxvpf - '*/helm' +curl https://sdk.cloud.google.com | bash +curl -fsSL https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz \ + | tar -xzf - +./krew-linux_amd64 install krew +export PATH="\${KREW_ROOT:-\$HOME/.krew}/bin:\$PATH" +kubectl krew install assert +kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/a67f31ecb2e62f15149ca66d096357050f07b77d/plugins/kuttl.yaml +sudo tee /etc/yum.repos.d/google-cloud-sdk.repo << EOF +[google-cloud-cli] +name=Google Cloud CLI +baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64 +enabled=1 +gpgcheck=1 +repo_gpgcheck=0 +gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg +EOF +sudo yum install -y google-cloud-cli google-cloud-cli-gke-gcloud-auth-plugin +``` + +### Runtime requirements + +Also, you need a Kubernetes platform of [supported version](https://docs.percona.com/percona-operator-for-mysql/ps/System-Requirements.html#supported-platforms), available via [EKS](https://docs.percona.com/percona-operator-for-mysql/ps/eks.html), [GKE](https://docs.percona.com/percona-operator-for-mysql/ps/gke.html), or [minikube](https://docs.percona.com/percona-operator-for-mysql/ps/minikube.html) to run the Operator. + +**Note:** there is no need to build an image if you are going to test some already-released version. + +## Building and testing the Operator + +There are scripts which build the image and run tests. Both building and testing +needs some repository for the newly created docker images. If nothing is +specified, scripts use Percona's experimental repository `perconalab/percona-server-mysql-operator`, which +requires decent access rights to make a push. + +To specify your own repository for the Operator docker image, you can use IMAGE environment variable: + +``` +export IMAGE=bob/my_repository_for_test_images:K8SPS-129-fix-feature-X +``` +We use linux/amd64 platform by default. To specify another platform, you can use DOCKER_DEFAULT_PLATFORM environment variable + +``` +export DOCKER_DEFAULT_PLATFORM=linux/amd64 +``` + +Use the following script to build the image: + +``` +./e2e-tests/build +``` + +Tests can be run one-by-one as follows: + +``` +kubectl kuttl test --config e2e-tests/kuttl.yaml --test "^test-name\$" +``` + +Test names can be found in subdirectories of `e2e-tests/tests` (their names should be self-explanatory): + +``` +./e2e-tests/tests/async-ignore-annotations +./e2e-tests/tests/gr-demand-backup +./e2e-tests/tests/gr-one-pod +./e2e-tests/tests/gr-users +./e2e-tests/tests/one-pod +./e2e-tests/tests/sidecars +./e2e-tests/tests/auto-config +./e2e-tests/tests/gr-demand-backup-haproxy +./e2e-tests/tests/gr-recreate +./e2e-tests/tests/haproxy +./e2e-tests/tests/operator-self-healing +./e2e-tests/tests/smart-update +./e2e-tests/tests/config +.... +``` + +## Using environment variables to customize the testing process + +### Re-declaring default image names + +You can use environment variables to re-declare all default docker images used for testing. The +full list of variables is the following one: + +* `IMAGE` - the Operator, `perconalab/percona-server-mysql-operator:main` by default, +* `IMAGE_MYSQL` - Percona Distribution for MySQL, `perconalab/percona-server:main` by default, +* `IMAGE_PMM_CLIENT` - Percona Monitoring and Management (PMM) client, `perconalab/pmm-client:dev-latest` by default, +* `IMAGE_PROXY` - ProxySQL, `perconalab/percona-xtradb-cluster-operator:main-proxysql` by default, +* `IMAGE_HAPROXY` - HA Proxy, `perconalab/haproxy:main` by default, +* `IMAGE_BACKUP` - backups, `perconalab/percona-xtrabackup:main` by default, +* `IMAGE_ORCHESTRATOR` - Orchestrator, `perconalab/percona-orchestrator:main` by default, +* `IMAGE_ROUTER` - Router, `perconalab/percona-mysql-router:main` by default, +* `IMAGE_TOOLKIT` - Percona Toolkit, `perconalab/percona-toolkit:main` by default, + +Also, you can set `DEBUG_TESTS` environment variable to `1` for more verbose outout. + +### Using automatic clean-up after testing + +By default, each test creates its own namespace and does full clean up after it finishes. + +You can avoid automatic deletion of such leftovers as follows: + +``` +kubectl kuttl test --config e2e-tests/kuttl.yaml --test "^test-name\$" --skip-delete +``` From 52754f811e283135ee69668ff3d96a3495f66b14 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:40:49 +0200 Subject: [PATCH 124/192] K8SPS-314 Update image tags back to main (related to 0.7.0 release) (#614) * Update image tags back to main * Update crVersion and initImage to 0.8.0 --- config/manager/kustomization.yaml | 4 ++-- deploy/bundle.yaml | 2 +- deploy/cr.yaml | 24 ++++++++++++------------ deploy/operator.yaml | 2 +- pkg/version/version.go | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 09fc1bfba..43d283c3e 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: perconalab/percona-server-mysql-operator - newName: percona/percona-server-mysql-operator - newTag: 0.7.0 + newName: perconalab/percona-server-mysql-operator + newTag: main diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index a5662a7dd..527e1bba6 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -9751,7 +9751,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.7.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 645afcb7b..544dc8426 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -8,7 +8,7 @@ metadata: spec: allowUnsafeConfigurations: false # pause: false - crVersion: 0.7.0 + crVersion: 0.8.0 secretsName: cluster1-secrets sslSecretName: cluster1-ssl updateStrategy: SmartUpdate @@ -33,9 +33,9 @@ spec: mysql: clusterType: group-replication autoRecovery: true - image: percona/percona-server:8.0.36-28 + image: perconalab/percona-server-mysql-operator:main-psmysql imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.7.0 +# initImage: percona/percona-server-mysql-operator:0.8.0 size: 3 @@ -139,7 +139,7 @@ spec: size: 3 - image: percona/haproxy:2.8.5 + image: perconalab/percona-server-mysql-operator:main-haproxy imagePullPolicy: Always resources: @@ -246,9 +246,9 @@ spec: router: enabled: false - image: percona/percona-mysql-router:8.0.36 + image: perconalab/percona-server-mysql-operator:main-router imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.7.0 +# initImage: percona/percona-server-mysql-operator:0.8.0 size: 3 @@ -299,10 +299,10 @@ spec: orchestrator: enabled: false - image: percona/percona-orchestrator:3.2.6-12 + image: perconalab/percona-server-mysql-operator:main-orchestrator imagePullPolicy: Always # serviceAccountName: percona-server-mysql-operator-orchestrator -# initImage: percona/percona-server-mysql-operator:0.7.0 +# initImage: percona/percona-server-mysql-operator:0.8.0 size: 3 @@ -352,7 +352,7 @@ spec: pmm: enabled: false - image: percona/pmm-client:2.41.1 + image: percona/pmm-client:2.41.2 imagePullPolicy: Always resources: @@ -368,10 +368,10 @@ spec: backup: enabled: true - image: percona/percona-xtrabackup:8.0.35-30 + image: perconalab/percona-server-mysql-operator:main-backup # backoffLimit: 6 imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.7.0 +# initImage: percona/percona-server-mysql-operator:0.8.0 storages: s3-us-west: type: s3 @@ -422,7 +422,7 @@ spec: # prefix: "" toolkit: - image: percona/percona-toolkit:3.5.7 + image: perconalab/percona-server-mysql-operator:main-toolkit imagePullPolicy: Always # resources: # requests: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 352c2599f..43f942675 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -51,7 +51,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.7.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/pkg/version/version.go b/pkg/version/version.go index 2c0474fa8..f17ed2ed3 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.7.0" +const Version = "0.8.0" From 191c44198366e6f90dba1106ef6f9a5c2413013d Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 29 Mar 2024 14:02:29 +0100 Subject: [PATCH 125/192] CLOUD-833 - Add release and after-release Makefile targets (#617) * CLOUD-833 - Add release and after-release Makefile targets * Fix initImage example to have same value as others * Replace yq with sed to preserve comment indentation * Add pmm image and specify dockerhub repo for release images * Replace multiple sed commands with just one * Fix sed in Makefile --- Makefile | 31 +++++++++++++++++++++++++++++++ deploy/cr.yaml | 2 +- e2e-tests/functions | 2 +- e2e-tests/vars.sh | 1 + 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b591eb1d2..61de8022e 100644 --- a/Makefile +++ b/Makefile @@ -229,3 +229,34 @@ catalog-build: opm ## Build a catalog image. .PHONY: catalog-push catalog-push: ## Push a catalog image. $(MAKE) docker-push IMG=$(CATALOG_IMG) + +# Prepare release +CERT_MANAGER_VER := $(shell grep -Eo "cert-manager v.*" go.mod|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+") +release: manifests + sed -i "/CERT_MANAGER_VER/s/CERT_MANAGER_VER=\".*/CERT_MANAGER_VER=\"$(CERT_MANAGER_VER)\"/" e2e-tests/vars.sh + sed -i \ + -e "/^ mysql:/,/^ image:/{s/image: .*/image: percona\/percona-server:@@SET_TAG@@/}" \ + -e "/^ haproxy:/,/^ image:/{s/image: .*/image: percona\/haproxy:@@SET_TAG@@/}" \ + -e "/^ router:/,/^ image:/{s/image: .*/image: percona\/percona-mysql-router:@@SET_TAG@@/}" \ + -e "/^ orchestrator:/,/^ image:/{s/image: .*/image: percona\/percona-orchestrator:@@SET_TAG@@/}" \ + -e "/^ backup:/,/^ image:/{s/image: .*/image: percona\/percona-xtrabackup:@@SET_TAG@@/}" \ + -e "/^ toolkit:/,/^ image:/{s/image: .*/image: percona\/percona-toolkit:@@SET_TAG@@/}" \ + -e "/^ pmm:/,/^ image:/{s/image: .*/image: percona\/pmm-client:@@SET_TAG@@/}" deploy/cr.yaml + +# Prepare main branch after release +MAJOR_VER := $(shell grep "Version =" pkg/version/version.go|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f1) +MINOR_VER := $(shell grep "Version =" pkg/version/version.go|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f2) +PATCH_VER := $(shell grep "Version =" pkg/version/version.go|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f3) +NEXT_VER ?= $(MAJOR_VER).$$(($(MINOR_VER) + 1)).$(PATCH_VER) +after-release: manifests + sed -i "/const Version = \"/s/Version = \".*/Version = \"$(NEXT_VER)\"/" pkg/version/version.go + sed -i \ + -e "/^spec:/,/^ crVersion:/{s/crVersion: .*/crVersion: $(NEXT_VER)/}" \ + -e "/^ mysql:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-psmysql/}" \ + -e "/^ haproxy:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-haproxy/}" \ + -e "/^ router:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-router/}" \ + -e "/^ orchestrator:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-orchestrator/}" \ + -e "/^ backup:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-backup/}" \ + -e "/^ toolkit:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-toolkit/}" \ + -e "s/initImage: .*/initImage: perconalab\/percona-server-mysql-operator:$(NEXT_VER)/g" \ + -e "/^ pmm:/,/^ image:/{s/image: .*/image: perconalab\/pmm-client:dev-latest/}" deploy/cr.yaml diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 544dc8426..2e46eb58f 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -15,7 +15,7 @@ spec: upgradeOptions: versionServiceEndpoint: https://check.percona.com apply: disabled -# initImage: perconalab/percona-server-mysql-operator:main +# initImage: percona/percona-server-mysql-operator:0.8.0 # ignoreAnnotations: # - service.beta.kubernetes.io/aws-load-balancer-backend-protocol # ignoreLabels: diff --git a/e2e-tests/functions b/e2e-tests/functions index e3e53bffd..a045b003c 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -508,7 +508,7 @@ deploy_version_service() { deploy_cert_manager() { kubectl create namespace cert-manager || : kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true || : - kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yaml --validate=false || : 2>/dev/null + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v${CERT_MANAGER_VER}/cert-manager.yaml --validate=false || : 2>/dev/null } get_primary_from_label() { diff --git a/e2e-tests/vars.sh b/e2e-tests/vars.sh index 29c404298..4424d66f8 100644 --- a/e2e-tests/vars.sh +++ b/e2e-tests/vars.sh @@ -20,6 +20,7 @@ export IMAGE_HAPROXY=${IMAGE_HAPROXY:-"perconalab/percona-server-mysql-operator: export PMM_SERVER_VERSION=${PMM_SERVER_VERSION:-"9.9.9"} export IMAGE_PMM_CLIENT=${IMAGE_PMM_CLIENT:-"perconalab/pmm-client:dev-latest"} export IMAGE_PMM_SERVER=${IMAGE_PMM_SERVER:-"perconalab/pmm-server:dev-latest"} +export CERT_MANAGER_VER="1.14.4" date=$(which gdate || which date) From e33a93f96b4b7d408fbcfd1aafe0d9f6d64bcfec Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Wed, 3 Apr 2024 09:57:24 +0200 Subject: [PATCH 126/192] CLOUD-833 - Cleanup in release and after-release Makefile targets (#619) --- Makefile | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 61de8022e..d7398d8b0 100644 --- a/Makefile +++ b/Makefile @@ -235,28 +235,27 @@ CERT_MANAGER_VER := $(shell grep -Eo "cert-manager v.*" go.mod|grep -Eo "[0-9]+\ release: manifests sed -i "/CERT_MANAGER_VER/s/CERT_MANAGER_VER=\".*/CERT_MANAGER_VER=\"$(CERT_MANAGER_VER)\"/" e2e-tests/vars.sh sed -i \ - -e "/^ mysql:/,/^ image:/{s/image: .*/image: percona\/percona-server:@@SET_TAG@@/}" \ - -e "/^ haproxy:/,/^ image:/{s/image: .*/image: percona\/haproxy:@@SET_TAG@@/}" \ - -e "/^ router:/,/^ image:/{s/image: .*/image: percona\/percona-mysql-router:@@SET_TAG@@/}" \ - -e "/^ orchestrator:/,/^ image:/{s/image: .*/image: percona\/percona-orchestrator:@@SET_TAG@@/}" \ - -e "/^ backup:/,/^ image:/{s/image: .*/image: percona\/percona-xtrabackup:@@SET_TAG@@/}" \ - -e "/^ toolkit:/,/^ image:/{s/image: .*/image: percona\/percona-toolkit:@@SET_TAG@@/}" \ - -e "/^ pmm:/,/^ image:/{s/image: .*/image: percona\/pmm-client:@@SET_TAG@@/}" deploy/cr.yaml + -e "/^ mysql:/,/^ image:/{s#image: .*#image: percona/percona-server:@@SET_TAG@@#}" \ + -e "/^ haproxy:/,/^ image:/{s#image: .*#image: percona/haproxy:@@SET_TAG@@#}" \ + -e "/^ router:/,/^ image:/{s#image: .*#image: percona/percona-mysql-router:@@SET_TAG@@#}" \ + -e "/^ orchestrator:/,/^ image:/{s#image: .*#image: percona/percona-orchestrator:@@SET_TAG@@#}" \ + -e "/^ backup:/,/^ image:/{s#image: .*#image: percona/percona-xtrabackup:@@SET_TAG@@#}" \ + -e "/^ toolkit:/,/^ image:/{s#image: .*#image: percona/percona-toolkit:@@SET_TAG@@#}" \ + -e "/^ pmm:/,/^ image:/{s#image: .*#image: percona/pmm-client:@@SET_TAG@@#}" deploy/cr.yaml # Prepare main branch after release MAJOR_VER := $(shell grep "Version =" pkg/version/version.go|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f1) MINOR_VER := $(shell grep "Version =" pkg/version/version.go|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f2) -PATCH_VER := $(shell grep "Version =" pkg/version/version.go|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"|cut -d'.' -f3) -NEXT_VER ?= $(MAJOR_VER).$$(($(MINOR_VER) + 1)).$(PATCH_VER) +NEXT_VER ?= $(MAJOR_VER).$$(($(MINOR_VER) + 1)).0 after-release: manifests sed -i "/const Version = \"/s/Version = \".*/Version = \"$(NEXT_VER)\"/" pkg/version/version.go sed -i \ -e "/^spec:/,/^ crVersion:/{s/crVersion: .*/crVersion: $(NEXT_VER)/}" \ - -e "/^ mysql:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-psmysql/}" \ - -e "/^ haproxy:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-haproxy/}" \ - -e "/^ router:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-router/}" \ - -e "/^ orchestrator:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-orchestrator/}" \ - -e "/^ backup:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-backup/}" \ - -e "/^ toolkit:/,/^ image:/{s/image: .*/image: perconalab\/percona-server-mysql-operator:main-toolkit/}" \ - -e "s/initImage: .*/initImage: perconalab\/percona-server-mysql-operator:$(NEXT_VER)/g" \ - -e "/^ pmm:/,/^ image:/{s/image: .*/image: perconalab\/pmm-client:dev-latest/}" deploy/cr.yaml + -e "/^ mysql:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-psmysql#}" \ + -e "/^ haproxy:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-haproxy#}" \ + -e "/^ router:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-router#}" \ + -e "/^ orchestrator:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-orchestrator#}" \ + -e "/^ backup:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-backup#}" \ + -e "/^ toolkit:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-toolkit#}" \ + -e "s#initImage: .*#initImage: perconalab/percona-server-mysql-operator:$(NEXT_VER)#g" \ + -e "/^ pmm:/,/^ image:/{s#image: .*#image: perconalab/pmm-client:dev-latest#}" deploy/cr.yaml From 2235da204141da3a73d1d6002478213fc847186b Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Wed, 3 Apr 2024 16:22:40 +0200 Subject: [PATCH 127/192] CLOUD-833 - Minor update for release and after-release Makefile targets (#620) --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d7398d8b0..c7059a34e 100644 --- a/Makefile +++ b/Makefile @@ -234,13 +234,16 @@ catalog-push: ## Push a catalog image. CERT_MANAGER_VER := $(shell grep -Eo "cert-manager v.*" go.mod|grep -Eo "[0-9]+\.[0-9]+\.[0-9]+") release: manifests sed -i "/CERT_MANAGER_VER/s/CERT_MANAGER_VER=\".*/CERT_MANAGER_VER=\"$(CERT_MANAGER_VER)\"/" e2e-tests/vars.sh + sed -i "/const Version = \"/s/Version = \".*/Version = \"$(VERSION)\"/" pkg/version/version.go sed -i \ + -e "/^spec:/,/^ crVersion:/{s/crVersion: .*/crVersion: $(VERSION)/}" \ -e "/^ mysql:/,/^ image:/{s#image: .*#image: percona/percona-server:@@SET_TAG@@#}" \ -e "/^ haproxy:/,/^ image:/{s#image: .*#image: percona/haproxy:@@SET_TAG@@#}" \ -e "/^ router:/,/^ image:/{s#image: .*#image: percona/percona-mysql-router:@@SET_TAG@@#}" \ -e "/^ orchestrator:/,/^ image:/{s#image: .*#image: percona/percona-orchestrator:@@SET_TAG@@#}" \ -e "/^ backup:/,/^ image:/{s#image: .*#image: percona/percona-xtrabackup:@@SET_TAG@@#}" \ -e "/^ toolkit:/,/^ image:/{s#image: .*#image: percona/percona-toolkit:@@SET_TAG@@#}" \ + -e "s#initImage: .*#initImage: percona/percona-server-mysql-operator:$(VERSION)#g" \ -e "/^ pmm:/,/^ image:/{s#image: .*#image: percona/pmm-client:@@SET_TAG@@#}" deploy/cr.yaml # Prepare main branch after release @@ -257,5 +260,5 @@ after-release: manifests -e "/^ orchestrator:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-orchestrator#}" \ -e "/^ backup:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-backup#}" \ -e "/^ toolkit:/,/^ image:/{s#image: .*#image: perconalab/percona-server-mysql-operator:main-toolkit#}" \ - -e "s#initImage: .*#initImage: perconalab/percona-server-mysql-operator:$(NEXT_VER)#g" \ + -e "s#initImage: .*#initImage: perconalab/percona-server-mysql-operator:main#g" \ -e "/^ pmm:/,/^ image:/{s#image: .*#image: perconalab/pmm-client:dev-latest#}" deploy/cr.yaml From a466d9cd291e0a7b4191a5595609ae45d7011ce9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:19:34 +0300 Subject: [PATCH 128/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.16.1 to 0.19.0 (#618) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.1 to 0.19.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.16.1...0.19.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 4f22bfc4c..6d1f9ae5c 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -31,7 +31,7 @@ jobs: ./e2e-tests/build - name: Run Trivy vulnerability scanner image (linux/arm64) - uses: aquasecurity/trivy-action@0.16.1 + uses: aquasecurity/trivy-action@0.19.0 with: image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64' format: 'table' @@ -49,7 +49,7 @@ jobs: ./e2e-tests/build - name: Run Trivy vulnerability scanner image (linux/amd64) - uses: aquasecurity/trivy-action@0.16.1 + uses: aquasecurity/trivy-action@0.19.0 with: image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64' format: 'table' From aa61fa8137ecea6c8af1baa8da6927df693d3495 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:19:53 +0300 Subject: [PATCH 129/192] CLOUD-727: Bump github.com/onsi/gomega from 1.31.1 to 1.32.0 (#606) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.32.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.31.1...v1.32.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3f510048b..5db89a899 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 github.com/onsi/ginkgo/v2 v2.16.0 - github.com/onsi/gomega v1.31.1 + github.com/onsi/gomega v1.32.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 diff --git a/go.sum b/go.sum index e1e5a1214..421443038 100644 --- a/go.sum +++ b/go.sum @@ -194,8 +194,8 @@ github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= -github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= +github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= +github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= From 1b1dca4e681a793d6d9feadc3e3ce96d92b2c625 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:01:34 +0300 Subject: [PATCH 130/192] CLOUD-727: Bump github.com/go-sql-driver/mysql from 1.8.0 to 1.8.1 (#616) Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/go-sql-driver/mysql/releases) - [Changelog](https://github.com/go-sql-driver/mysql/blob/v1.8.1/CHANGELOG.md) - [Commits](https://github.com/go-sql-driver/mysql/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/go-sql-driver/mysql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5db89a899..eff20eea3 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/go-openapi/strfmt v0.23.0 github.com/go-openapi/swag v0.23.0 github.com/go-openapi/validate v0.24.0 - github.com/go-sql-driver/mysql v1.8.0 + github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 github.com/onsi/ginkgo/v2 v2.16.0 diff --git a/go.sum b/go.sum index 421443038..adbe7b3f5 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= -github.com/go-sql-driver/mysql v1.8.0 h1:UtktXaU2Nb64z/pLiGIxY4431SJ4/dR5cjMmlVHgnT4= -github.com/go-sql-driver/mysql v1.8.0/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= From 285009a956ceb1fc83120f1684c9992c270bedc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:13:38 +0300 Subject: [PATCH 131/192] CLOUD-727: Bump github.com/onsi/ginkgo/v2 from 2.16.0 to 2.17.1 (#615) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.16.0 to 2.17.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.16.0...v2.17.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index eff20eea3..a44fd02da 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 - github.com/onsi/ginkgo/v2 v2.16.0 + github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.32.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 diff --git a/go.sum b/go.sum index adbe7b3f5..7de6d1557 100644 --- a/go.sum +++ b/go.sum @@ -192,8 +192,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= -github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= -github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= From 0b613c874e27eded789545b2eac21d3d57b4f655 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:42:19 +0300 Subject: [PATCH 132/192] CLOUD-727: Bump google.golang.org/grpc from 1.62.1 to 1.63.2 (#625) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.1 to 1.63.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.62.1...v1.63.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index a44fd02da..37493b12f 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.6.0 - google.golang.org/grpc v1.62.1 + google.golang.org/grpc v1.63.2 k8s.io/api v0.29.3 k8s.io/apimachinery v0.29.3 k8s.io/client-go v0.29.3 @@ -39,8 +39,8 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect ) require ( @@ -110,7 +110,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.19.0 // indirect golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 @@ -118,7 +118,7 @@ require ( golang.org/x/tools v0.17.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 7de6d1557..ed74569d7 100644 --- a/go.sum +++ b/go.sum @@ -308,8 +308,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -369,19 +369,19 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= From c1f7d77381bdd397565bac64b02e9762e9470f42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:44:09 +0300 Subject: [PATCH 133/192] CLOUD-727: Bump github.com/Azure/azure-sdk-for-go/sdk/storage/azblob (#624) Bumps [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.3.1...sdk/storage/azblob/v1.3.2) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 37493b12f..3a6f04b90 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/percona/percona-server-mysql-operator go 1.21 require ( - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 github.com/cert-manager/cert-manager v1.14.4 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 @@ -44,7 +44,7 @@ require ( ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect @@ -108,11 +108,11 @@ require ( go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/net v0.22.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.17.0 // indirect diff --git a/go.sum b/go.sum index ed74569d7..adb0c45a6 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2 h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2/go.mod h1:5FDJtLEO/GxwNgUxbwrY3LP0pEoThTQJtk2oysdXHxM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 h1:fXPMAmuh0gDuRDey0atC8cXBuKIlqCzCkL8sm1n9Ov0= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1/go.mod h1:SUZc9YRRHfx2+FAQKNDGrssXehqLpxmwRv2mC/5ntj4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -283,8 +283,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= @@ -305,8 +305,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= @@ -330,12 +330,12 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= From 1e81e1a741caf45f50e156269e957b28da49d667 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:56:22 +0300 Subject: [PATCH 134/192] CLOUD-727: Bump sigs.k8s.io/controller-runtime from 0.17.2 to 0.17.3 (#622) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.17.2 to 0.17.3. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.17.2...v0.17.3) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 3a6f04b90..d8979a97a 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( k8s.io/apimachinery v0.29.3 k8s.io/client-go v0.29.3 k8s.io/utils v0.0.0-20240102154912-e7106e64919e - sigs.k8s.io/controller-runtime v0.17.2 + sigs.k8s.io/controller-runtime v0.17.3 ) require ( @@ -124,8 +124,8 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.0 // indirect - k8s.io/component-base v0.29.0 // indirect + k8s.io/apiextensions-apiserver v0.29.2 // indirect + k8s.io/component-base v0.29.2 // indirect k8s.io/klog/v2 v2.110.1 // indirect k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 // indirect sigs.k8s.io/gateway-api v1.0.0 // indirect diff --git a/go.sum b/go.sum index adb0c45a6..08dfd8f81 100644 --- a/go.sum +++ b/go.sum @@ -410,22 +410,22 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= -k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= -k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= +k8s.io/apiextensions-apiserver v0.29.2 h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg= +k8s.io/apiextensions-apiserver v0.29.2/go.mod h1:aLfYjpA5p3OwtqNXQFkhJ56TB+spV8Gc4wfMhUA3/b8= k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= -k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= -k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= +k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8= +k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 h1:avRdiaB03v88Mfvum2S3BBwkNuTlmuar4LlfO9Hajko= k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022/go.mod h1:sIV51WBTkZrlGOJMCDZDA1IaPBUDTulPpD4y7oe038k= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= -sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= +sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= +sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From 24b82d6ecf5026829f76b3fdb79b3de607448621 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:58:24 +0300 Subject: [PATCH 135/192] CLOUD-727: Bump golang.org/x/sync from 0.6.0 to 0.7.0 (#623) Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.6.0 to 0.7.0. - [Commits](https://github.com/golang/sync/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/sync dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d8979a97a..01a1668c7 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.27.0 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 google.golang.org/grpc v1.63.2 k8s.io/api v0.29.3 k8s.io/apimachinery v0.29.3 diff --git a/go.sum b/go.sum index 08dfd8f81..39c3596d6 100644 --- a/go.sum +++ b/go.sum @@ -316,8 +316,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From 950da17b9fc0a417877a8bd6f8029f2862ae3b02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 19:02:58 +0300 Subject: [PATCH 136/192] CLOUD-727: Bump golang.org/x/net from 0.22.0 to 0.23.0 (#627) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 01a1668c7..47b6c81b1 100644 --- a/go.mod +++ b/go.mod @@ -109,7 +109,7 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.22.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect diff --git a/go.sum b/go.sum index 39c3596d6..4a6cd34fa 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= From fe41b2129da1372625e54a4f99ae602f95eadfa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:44:42 +0300 Subject: [PATCH 137/192] CLOUD-727: Bump github.com/onsi/gomega from 1.32.0 to 1.33.0 (#628) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.32.0 to 1.33.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.32.0...v1.33.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 47b6c81b1..6c09f13f3 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/minio/minio-go/v7 v7.0.69 github.com/onsi/ginkgo/v2 v2.17.1 - github.com/onsi/gomega v1.32.0 + github.com/onsi/gomega v1.33.0 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 diff --git a/go.sum b/go.sum index 4a6cd34fa..f0c18fedd 100644 --- a/go.sum +++ b/go.sum @@ -194,8 +194,8 @@ github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= -github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= +github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= +github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= From de01a95567024f58ce0bbf07a52ede8f910c7de5 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Tue, 4 Jun 2024 13:27:18 +0200 Subject: [PATCH 138/192] CLOUD-849 - Fix reviewdog for manifests on release branches (#651) --- .github/workflows/reviewdog.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index b58f9a86a..be84a6de3 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -86,6 +86,13 @@ jobs: - uses: actions/setup-go@v5 with: go-version: '^1.21' - - run: | + - name: check on release branch + if: ${{ contains(github.head_ref, 'release-') || contains(github.base_ref, 'release-') }} + run: | + make generate manifests VERSION="$(grep "Version" pkg/version/version.go|grep -oE "[0-9]+\.[0-9]+\.[0-9]+")" IMAGE_TAG_BASE="percona/percona-server-mysql-operator" + git diff --exit-code + - name: check on non release branches + if: ${{ ! (contains(github.head_ref, 'release-') || contains(github.base_ref, 'release-')) }} + run: | make generate manifests VERSION=main git diff --exit-code From abeb4fe31eb7aa37ceac96af2e856630fc782c6a Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Thu, 6 Jun 2024 17:30:22 +0200 Subject: [PATCH 139/192] CLOUD-850 - Update kuttl version to 0.16.0 (#653) * CLOUD-850 - Update kuttl version to 0.16.0 * Fix cert manager cmctl download in tests --- Jenkinsfile | 4 ++-- e2e-tests/conf/cmctl.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b6b6aa5f7..0e4037e37 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -252,8 +252,8 @@ void prepareNode() { kubectl krew install assert - # v0.15.0 kuttl version - kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/a67f31ecb2e62f15149ca66d096357050f07b77d/plugins/kuttl.yaml + # v0.16.0 kuttl version + kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/e450fd06ebe9ce200355726b81d13e5e59b9bf47/plugins/kuttl.yaml echo \$(kubectl kuttl --version) is installed curl -fsSL https://github.com/kyverno/chainsaw/releases/download/v0.1.7/chainsaw_linux_amd64.tar.gz | sudo tar -C /usr/local/bin -xzf - chainsaw diff --git a/e2e-tests/conf/cmctl.yml b/e2e-tests/conf/cmctl.yml index 681496014..0afd727a7 100644 --- a/e2e-tests/conf/cmctl.yml +++ b/e2e-tests/conf/cmctl.yml @@ -21,7 +21,7 @@ spec: - /bin/sh - -c - | - curl -fsSL -o /tmp/cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/latest/download/cmctl-linux-amd64.tar.gz \ - && tar -C /tmp -xzf /tmp/cmctl.tar.gz \ + curl -fsSL -o /tmp/cmctl https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_linux_amd64 \ + && chmod +x /tmp/cmctl \ && sleep 100500 restartPolicy: Always From fa2cf26bc3f1a09864e2f98b4dca530f975ea5c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:52:35 +0300 Subject: [PATCH 140/192] CLOUD-727: Bump k8s.io/client-go from 0.29.3 to 0.30.1 (#643) * --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * update go to 1.22 * `make generate` * `make manifests` * update envtest and go versions * fix cmctl --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrii Dema Co-authored-by: Viacheslav Sarzhan --- .github/linters/go.mod | 2 +- .github/workflows/reviewdog.yml | 6 +- .github/workflows/tests.yml | 2 +- Jenkinsfile | 4 +- Makefile | 2 +- build/Dockerfile | 2 +- ...percona.com_perconaservermysqlbackups.yaml | 61 ++ ...ercona.com_perconaservermysqlrestores.yaml | 61 ++ .../ps.percona.com_perconaservermysqls.yaml | 464 ++++++++++++++ deploy/bundle.yaml | 586 ++++++++++++++++++ deploy/crd.yaml | 586 ++++++++++++++++++ go.mod | 48 +- go.sum | 39 +- 13 files changed, 1808 insertions(+), 55 deletions(-) diff --git a/.github/linters/go.mod b/.github/linters/go.mod index a164acc54..570f83f2c 100644 --- a/.github/linters/go.mod +++ b/.github/linters/go.mod @@ -1,3 +1,3 @@ module linters -go 1.21 +go 1.22 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index be84a6de3..a0cb595eb 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.22' - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v4 @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.22' - run: go install mvdan.cc/sh/v3/cmd/shfmt@latest - run: $(go env GOPATH)/bin/shfmt -f . | grep -v 'vendor' | xargs $(go env GOPATH)/bin/shfmt -bn -ci -s -w - name: suggester / shfmt @@ -85,7 +85,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.22' - name: check on release branch if: ${{ contains(github.head_ref, 'release-') || contains(github.base_ref, 'release-') }} run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73054384a..adc6ea23b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,6 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "^1.21" + go-version: "^1.22" - name: Perform the test run: make test diff --git a/Jenkinsfile b/Jenkinsfile index 0e4037e37..307671e20 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -372,7 +372,7 @@ pipeline { -w /go/src/github.com/percona/percona-server-mysql-operator \ -e GOFLAGS='-buildvcs=false' \ -e GO111MODULE=on \ - golang:1.21 sh -c ' + golang:1.22 sh -c ' go install github.com/google/go-licenses@latest; /go/bin/go-licenses csv github.com/percona/percona-server-mysql-operator/cmd/manager \ | cut -d , -f 3 \ @@ -396,7 +396,7 @@ pipeline { -w /go/src/github.com/percona/percona-server-mysql-operator \ -e GOFLAGS='-buildvcs=false' \ -e GO111MODULE=on \ - golang:1.21 sh -c 'go build -v -o percona-server-mysql-operator github.com/percona/percona-server-mysql-operator/cmd/manager' + golang:1.22 sh -c 'go build -v -o percona-server-mysql-operator github.com/percona/percona-server-mysql-operator/cmd/manager' " ''' diff --git a/Makefile b/Makefile index c7059a34e..81a1f128e 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION) IMAGE ?= $(IMAGE_TAG_BASE):$(VERSION) # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.21 +ENVTEST_K8S_VERSION = 1.26 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) diff --git a/build/Dockerfile b/build/Dockerfile index ee5c23fa6..c788e5558 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 AS go_builder +FROM golang:1.22 AS go_builder WORKDIR /go/src/github.com/percona/percona-server-mysql-operator COPY go.mod go.sum ./ diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml index e8b0cca77..e9841d373 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlbackups.yaml @@ -88,11 +88,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -104,11 +106,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -119,6 +123,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -135,11 +140,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -151,14 +158,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -184,11 +194,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -218,11 +230,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -233,6 +247,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -246,6 +261,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -262,11 +278,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -296,11 +314,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -311,12 +331,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -338,11 +360,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -372,11 +396,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -387,6 +413,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -400,6 +427,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -416,11 +444,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -450,11 +480,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -465,12 +497,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -497,16 +531,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -580,6 +625,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -618,6 +672,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -630,6 +685,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -729,11 +785,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -797,6 +855,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -856,11 +915,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml index ba1b17625..706fe47fd 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqlrestores.yaml @@ -72,11 +72,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -88,11 +90,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -103,6 +107,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -119,11 +124,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -135,14 +142,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -168,11 +178,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -202,11 +214,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -217,6 +231,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -230,6 +245,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -246,11 +262,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -280,11 +298,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -295,12 +315,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -322,11 +344,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -356,11 +380,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -371,6 +397,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -384,6 +411,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -400,11 +428,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -434,11 +464,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -449,12 +481,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -481,16 +515,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -564,6 +609,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -602,6 +656,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -614,6 +669,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -713,11 +769,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -781,6 +839,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -840,11 +899,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml index 3a9dc4c90..3c4dc8c4e 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml @@ -64,16 +64,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -131,6 +142,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -193,11 +205,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -209,11 +223,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -224,6 +240,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -240,11 +257,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -256,14 +275,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -289,11 +311,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -323,11 +347,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -338,6 +364,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -351,6 +378,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -367,11 +395,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -401,11 +431,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -416,12 +448,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -443,11 +477,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -477,11 +513,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -492,6 +530,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -505,6 +544,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -521,11 +561,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -555,11 +597,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -570,12 +614,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -602,16 +648,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -685,6 +742,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -723,6 +789,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -735,6 +802,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -834,11 +902,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -902,6 +972,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -961,11 +1032,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1025,11 +1098,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -1041,11 +1116,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -1056,6 +1133,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -1072,11 +1150,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -1088,14 +1168,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -1121,11 +1204,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1155,11 +1240,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1170,6 +1257,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -1183,6 +1271,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -1199,11 +1288,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1233,11 +1324,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1248,12 +1341,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -1275,11 +1370,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1309,11 +1406,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1324,6 +1423,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -1337,6 +1437,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -1353,11 +1454,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1387,11 +1490,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1402,12 +1507,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -1427,16 +1534,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1498,6 +1616,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1536,6 +1655,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1554,6 +1674,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -1564,6 +1685,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -1607,6 +1729,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -1625,6 +1748,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1655,6 +1779,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1701,6 +1826,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -1739,6 +1873,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -1751,6 +1886,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -1773,6 +1909,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1803,6 +1940,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1891,6 +2029,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -1950,11 +2089,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2028,6 +2169,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -2037,6 +2179,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2054,6 +2197,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2082,7 +2226,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -2097,6 +2243,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2152,6 +2299,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -2176,6 +2324,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -2235,11 +2384,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2272,10 +2423,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -2292,6 +2445,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2372,11 +2526,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2453,11 +2609,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2492,7 +2650,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -2538,6 +2698,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -2556,7 +2717,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -2576,6 +2739,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -2607,6 +2771,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -2614,6 +2779,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2636,6 +2802,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2674,6 +2841,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -2688,6 +2856,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -2720,10 +2889,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -2738,6 +2909,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -2776,6 +2948,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -2788,12 +2961,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -2804,6 +2981,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -2811,6 +2989,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -2825,6 +3004,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -2842,6 +3022,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2883,6 +3064,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -2900,6 +3082,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2942,6 +3125,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2972,6 +3156,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3046,6 +3231,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3076,6 +3262,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3166,16 +3353,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -3231,6 +3429,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3261,6 +3460,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3323,6 +3523,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -3334,6 +3537,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -3343,6 +3548,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: @@ -3360,6 +3568,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3390,6 +3599,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3462,11 +3672,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3526,6 +3738,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -3585,11 +3798,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3633,11 +3848,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -3649,11 +3866,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -3664,6 +3883,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -3680,11 +3900,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -3696,14 +3918,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -3729,11 +3954,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3763,11 +3990,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3778,6 +4007,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -3791,6 +4021,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -3807,11 +4038,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3841,11 +4074,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3856,12 +4091,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -3883,11 +4120,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3917,11 +4156,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3932,6 +4173,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -3945,6 +4187,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -3961,11 +4204,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3995,11 +4240,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4010,12 +4257,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -4031,16 +4280,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -4104,6 +4364,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4142,6 +4403,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4160,6 +4422,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -4170,6 +4433,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -4211,6 +4475,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4229,6 +4494,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4259,6 +4525,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4305,6 +4572,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -4343,6 +4619,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -4355,6 +4632,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -4377,6 +4655,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4407,6 +4686,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4495,6 +4775,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4525,6 +4806,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4597,11 +4879,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4661,6 +4945,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -4720,11 +5005,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4752,16 +5039,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -4881,11 +5179,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -4897,11 +5197,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -4912,6 +5214,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -4928,11 +5231,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -4944,14 +5249,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -4977,11 +5285,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5011,11 +5321,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5026,6 +5338,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -5039,6 +5352,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -5055,11 +5369,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5089,11 +5405,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5104,12 +5422,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -5131,11 +5451,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5165,11 +5487,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5180,6 +5504,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -5193,6 +5518,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -5209,11 +5535,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5243,11 +5571,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5258,12 +5588,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -5279,16 +5611,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5352,6 +5695,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5390,6 +5734,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5408,6 +5753,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5418,6 +5764,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5459,6 +5806,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -5477,6 +5825,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5507,6 +5856,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5553,6 +5903,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -5591,6 +5950,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -5603,6 +5963,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -5625,6 +5986,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5655,6 +6017,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5743,6 +6106,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5773,6 +6137,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5845,11 +6210,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5909,6 +6276,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -5968,11 +6336,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6016,11 +6386,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -6032,11 +6404,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -6047,6 +6421,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -6063,11 +6438,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -6079,14 +6456,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -6112,11 +6492,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6146,11 +6528,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6161,6 +6545,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -6174,6 +6559,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -6190,11 +6576,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6224,11 +6612,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6239,12 +6629,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -6266,11 +6658,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6300,11 +6694,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6315,6 +6711,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -6328,6 +6725,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -6344,11 +6742,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6378,11 +6778,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6393,12 +6795,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -6414,16 +6818,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -6487,6 +6902,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -6525,6 +6941,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -6543,6 +6960,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -6553,6 +6971,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -6594,6 +7013,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6612,6 +7032,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6642,6 +7063,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6688,6 +7110,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -6726,6 +7157,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -6738,6 +7170,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -6760,6 +7193,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6790,6 +7224,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6878,6 +7313,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6908,6 +7344,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6980,11 +7417,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7044,6 +7483,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -7103,11 +7543,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7158,16 +7600,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -7229,6 +7682,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -7267,6 +7721,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -7285,6 +7740,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -7295,6 +7751,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -7310,6 +7767,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7322,6 +7780,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7352,6 +7811,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7400,6 +7860,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7430,6 +7891,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7509,6 +7971,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7539,6 +8002,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 527e1bba6..8b22dca22 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -87,11 +87,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -103,11 +105,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -118,6 +122,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -134,11 +139,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -150,14 +157,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -183,11 +193,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -217,11 +229,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -232,6 +246,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -245,6 +260,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -261,11 +277,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -295,11 +313,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -310,12 +330,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -337,11 +359,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -371,11 +395,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -386,6 +412,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -399,6 +426,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -415,11 +443,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -449,11 +479,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -464,12 +496,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -496,16 +530,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -579,6 +624,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -617,6 +671,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -629,6 +684,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -728,11 +784,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -796,6 +854,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -855,11 +914,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -959,11 +1020,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -975,11 +1038,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -990,6 +1055,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -1006,11 +1072,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -1022,14 +1090,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -1055,11 +1126,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1089,11 +1162,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1104,6 +1179,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -1117,6 +1193,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -1133,11 +1210,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1167,11 +1246,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1182,12 +1263,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -1209,11 +1292,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1243,11 +1328,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1258,6 +1345,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -1271,6 +1359,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -1287,11 +1376,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1321,11 +1412,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1336,12 +1429,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -1368,16 +1463,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1451,6 +1557,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -1489,6 +1604,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -1501,6 +1617,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -1600,11 +1717,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1668,6 +1787,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -1727,11 +1847,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1838,16 +1960,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1905,6 +2038,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -1967,11 +2101,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -1983,11 +2119,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -1998,6 +2136,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -2014,11 +2153,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -2030,14 +2171,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -2063,11 +2207,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2097,11 +2243,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2112,6 +2260,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -2125,6 +2274,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -2141,11 +2291,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2175,11 +2327,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2190,12 +2344,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -2217,11 +2373,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2251,11 +2409,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2266,6 +2426,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -2279,6 +2440,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -2295,11 +2457,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2329,11 +2493,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2344,12 +2510,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -2376,16 +2544,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -2459,6 +2638,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -2497,6 +2685,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -2509,6 +2698,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -2608,11 +2798,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2676,6 +2868,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -2735,11 +2928,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2799,11 +2994,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -2815,11 +3012,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -2830,6 +3029,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -2846,11 +3046,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -2862,14 +3064,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -2895,11 +3100,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2929,11 +3136,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2944,6 +3153,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -2957,6 +3167,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -2973,11 +3184,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3007,11 +3220,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3022,12 +3237,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -3049,11 +3266,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3083,11 +3302,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3098,6 +3319,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -3111,6 +3333,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -3127,11 +3350,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3161,11 +3386,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3176,12 +3403,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -3201,16 +3430,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -3272,6 +3512,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -3310,6 +3551,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -3328,6 +3570,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -3338,6 +3581,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -3381,6 +3625,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3399,6 +3644,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3429,6 +3675,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3475,6 +3722,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -3513,6 +3769,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -3525,6 +3782,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -3547,6 +3805,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3577,6 +3836,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3665,6 +3925,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -3724,11 +3985,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3802,6 +4065,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -3811,6 +4075,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3828,6 +4093,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3856,7 +4122,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3871,6 +4139,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3926,6 +4195,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -3950,6 +4220,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -4009,11 +4280,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4046,10 +4319,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -4066,6 +4341,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4146,11 +4422,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4227,11 +4505,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4266,7 +4546,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -4312,6 +4594,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -4330,7 +4613,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -4350,6 +4635,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -4381,6 +4667,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -4388,6 +4675,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4410,6 +4698,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4448,6 +4737,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -4462,6 +4752,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4494,10 +4785,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -4512,6 +4805,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4550,6 +4844,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4562,12 +4857,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -4578,6 +4877,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -4585,6 +4885,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -4599,6 +4900,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4616,6 +4918,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4657,6 +4960,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4674,6 +4978,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4716,6 +5021,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4746,6 +5052,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4820,6 +5127,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4850,6 +5158,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4940,16 +5249,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5005,6 +5325,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5035,6 +5356,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5097,6 +5419,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -5108,6 +5433,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -5117,6 +5444,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: @@ -5134,6 +5464,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5164,6 +5495,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5236,11 +5568,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5300,6 +5634,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -5359,11 +5694,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5407,11 +5744,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -5423,11 +5762,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -5438,6 +5779,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -5454,11 +5796,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -5470,14 +5814,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -5503,11 +5850,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5537,11 +5886,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5552,6 +5903,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -5565,6 +5917,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -5581,11 +5934,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5615,11 +5970,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5630,12 +5987,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -5657,11 +6016,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5691,11 +6052,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5706,6 +6069,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -5719,6 +6083,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -5735,11 +6100,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5769,11 +6136,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5784,12 +6153,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -5805,16 +6176,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5878,6 +6260,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5916,6 +6299,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5934,6 +6318,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5944,6 +6329,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5985,6 +6371,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6003,6 +6390,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6033,6 +6421,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6079,6 +6468,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -6117,6 +6515,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -6129,6 +6528,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -6151,6 +6551,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6181,6 +6582,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6269,6 +6671,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6299,6 +6702,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6371,11 +6775,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6435,6 +6841,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -6494,11 +6901,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6526,16 +6935,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -6655,11 +7075,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -6671,11 +7093,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -6686,6 +7110,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -6702,11 +7127,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -6718,14 +7145,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -6751,11 +7181,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6785,11 +7217,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6800,6 +7234,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -6813,6 +7248,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -6829,11 +7265,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6863,11 +7301,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6878,12 +7318,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -6905,11 +7347,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6939,11 +7383,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6954,6 +7400,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -6967,6 +7414,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -6983,11 +7431,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7017,11 +7467,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7032,12 +7484,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -7053,16 +7507,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -7126,6 +7591,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -7164,6 +7630,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -7182,6 +7649,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -7192,6 +7660,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -7233,6 +7702,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7251,6 +7721,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7281,6 +7752,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7327,6 +7799,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -7365,6 +7846,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -7377,6 +7859,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -7399,6 +7882,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7429,6 +7913,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7517,6 +8002,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7547,6 +8033,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7619,11 +8106,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7683,6 +8172,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -7742,11 +8232,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7790,11 +8282,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -7806,11 +8300,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -7821,6 +8317,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -7837,11 +8334,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -7853,14 +8352,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -7886,11 +8388,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7920,11 +8424,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7935,6 +8441,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -7948,6 +8455,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -7964,11 +8472,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7998,11 +8508,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8013,12 +8525,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -8040,11 +8554,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8074,11 +8590,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8089,6 +8607,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -8102,6 +8621,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -8118,11 +8638,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8152,11 +8674,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8167,12 +8691,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -8188,16 +8714,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -8261,6 +8798,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -8299,6 +8837,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -8317,6 +8856,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -8327,6 +8867,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -8368,6 +8909,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -8386,6 +8928,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -8416,6 +8959,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8462,6 +9006,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -8500,6 +9053,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -8512,6 +9066,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -8534,6 +9089,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -8564,6 +9120,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8652,6 +9209,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -8682,6 +9240,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8754,11 +9313,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8818,6 +9379,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -8877,11 +9439,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8932,16 +9496,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -9003,6 +9578,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -9041,6 +9617,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -9059,6 +9636,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -9069,6 +9647,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -9084,6 +9663,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -9096,6 +9676,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -9126,6 +9707,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9174,6 +9756,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -9204,6 +9787,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9283,6 +9867,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -9313,6 +9898,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: diff --git a/deploy/crd.yaml b/deploy/crd.yaml index c7cf24ede..024f0bbc8 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -87,11 +87,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -103,11 +105,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -118,6 +122,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -134,11 +139,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -150,14 +157,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -183,11 +193,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -217,11 +229,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -232,6 +246,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -245,6 +260,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -261,11 +277,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -295,11 +313,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -310,12 +330,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -337,11 +359,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -371,11 +395,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -386,6 +412,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -399,6 +426,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -415,11 +443,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -449,11 +479,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -464,12 +496,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -496,16 +530,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -579,6 +624,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -617,6 +671,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -629,6 +684,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -728,11 +784,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -796,6 +854,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -855,11 +914,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -959,11 +1020,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -975,11 +1038,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -990,6 +1055,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -1006,11 +1072,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -1022,14 +1090,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -1055,11 +1126,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1089,11 +1162,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1104,6 +1179,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -1117,6 +1193,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -1133,11 +1210,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1167,11 +1246,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1182,12 +1263,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -1209,11 +1292,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1243,11 +1328,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1258,6 +1345,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -1271,6 +1359,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -1287,11 +1376,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1321,11 +1412,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1336,12 +1429,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -1368,16 +1463,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1451,6 +1557,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -1489,6 +1604,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -1501,6 +1617,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -1600,11 +1717,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1668,6 +1787,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -1727,11 +1847,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1838,16 +1960,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1905,6 +2038,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -1967,11 +2101,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -1983,11 +2119,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -1998,6 +2136,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -2014,11 +2153,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -2030,14 +2171,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -2063,11 +2207,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2097,11 +2243,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2112,6 +2260,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -2125,6 +2274,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -2141,11 +2291,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2175,11 +2327,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2190,12 +2344,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -2217,11 +2373,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2251,11 +2409,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2266,6 +2426,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -2279,6 +2440,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -2295,11 +2457,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2329,11 +2493,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2344,12 +2510,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object annotations: @@ -2376,16 +2544,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -2459,6 +2638,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -2497,6 +2685,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -2509,6 +2698,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -2608,11 +2798,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2676,6 +2868,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -2735,11 +2928,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2799,11 +2994,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -2815,11 +3012,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -2830,6 +3029,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -2846,11 +3046,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -2862,14 +3064,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -2895,11 +3100,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2929,11 +3136,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2944,6 +3153,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -2957,6 +3167,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -2973,11 +3184,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3007,11 +3220,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3022,12 +3237,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -3049,11 +3266,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3083,11 +3302,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3098,6 +3319,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -3111,6 +3333,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -3127,11 +3350,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3161,11 +3386,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3176,12 +3403,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -3201,16 +3430,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -3272,6 +3512,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -3310,6 +3551,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -3328,6 +3570,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -3338,6 +3581,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -3381,6 +3625,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3399,6 +3644,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3429,6 +3675,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3475,6 +3722,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -3513,6 +3769,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -3525,6 +3782,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -3547,6 +3805,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -3577,6 +3836,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -3665,6 +3925,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -3724,11 +3985,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3802,6 +4065,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -3811,6 +4075,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3828,6 +4093,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3856,7 +4122,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3871,6 +4139,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3926,6 +4195,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -3950,6 +4220,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -4009,11 +4280,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4046,10 +4319,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -4066,6 +4341,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4146,11 +4422,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4227,11 +4505,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4266,7 +4546,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -4312,6 +4594,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -4330,7 +4613,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -4350,6 +4635,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -4381,6 +4667,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -4388,6 +4675,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4410,6 +4698,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4448,6 +4737,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -4462,6 +4752,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -4494,10 +4785,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -4512,6 +4805,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4550,6 +4844,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4562,12 +4857,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -4578,6 +4877,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -4585,6 +4885,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -4599,6 +4900,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4616,6 +4918,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4657,6 +4960,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4674,6 +4978,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4716,6 +5021,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4746,6 +5052,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4820,6 +5127,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4850,6 +5158,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4940,16 +5249,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5005,6 +5325,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5035,6 +5356,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5097,6 +5419,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -5108,6 +5433,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -5117,6 +5444,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: @@ -5134,6 +5464,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5164,6 +5495,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5236,11 +5568,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5300,6 +5634,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -5359,11 +5694,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5407,11 +5744,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -5423,11 +5762,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -5438,6 +5779,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -5454,11 +5796,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -5470,14 +5814,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -5503,11 +5850,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5537,11 +5886,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5552,6 +5903,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -5565,6 +5917,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -5581,11 +5934,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5615,11 +5970,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5630,12 +5987,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -5657,11 +6016,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5691,11 +6052,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5706,6 +6069,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -5719,6 +6083,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -5735,11 +6100,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5769,11 +6136,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -5784,12 +6153,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -5805,16 +6176,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5878,6 +6260,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5916,6 +6299,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5934,6 +6318,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5944,6 +6329,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5985,6 +6371,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6003,6 +6390,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6033,6 +6421,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6079,6 +6468,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -6117,6 +6515,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -6129,6 +6528,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -6151,6 +6551,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6181,6 +6582,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6269,6 +6671,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6299,6 +6702,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6371,11 +6775,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6435,6 +6841,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -6494,11 +6901,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6526,16 +6935,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -6655,11 +7075,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -6671,11 +7093,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -6686,6 +7110,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -6702,11 +7127,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -6718,14 +7145,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -6751,11 +7181,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6785,11 +7217,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6800,6 +7234,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -6813,6 +7248,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -6829,11 +7265,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6863,11 +7301,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6878,12 +7318,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -6905,11 +7347,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6939,11 +7383,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6954,6 +7400,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -6967,6 +7414,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -6983,11 +7431,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7017,11 +7467,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7032,12 +7484,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -7053,16 +7507,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -7126,6 +7591,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -7164,6 +7630,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -7182,6 +7649,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -7192,6 +7660,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -7233,6 +7702,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7251,6 +7721,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7281,6 +7752,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7327,6 +7799,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -7365,6 +7846,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -7377,6 +7859,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -7399,6 +7882,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7429,6 +7913,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7517,6 +8002,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -7547,6 +8033,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -7619,11 +8106,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7683,6 +8172,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -7742,11 +8232,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7790,11 +8282,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -7806,11 +8300,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -7821,6 +8317,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -7837,11 +8334,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -7853,14 +8352,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -7886,11 +8388,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7920,11 +8424,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7935,6 +8441,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -7948,6 +8455,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -7964,11 +8472,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7998,11 +8508,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8013,12 +8525,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -8040,11 +8554,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8074,11 +8590,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8089,6 +8607,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -8102,6 +8621,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -8118,11 +8638,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8152,11 +8674,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8167,12 +8691,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object antiAffinityTopologyKey: @@ -8188,16 +8714,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -8261,6 +8798,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -8299,6 +8837,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -8317,6 +8856,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -8327,6 +8867,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -8368,6 +8909,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -8386,6 +8928,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -8416,6 +8959,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8462,6 +9006,15 @@ spec: type: object podSecurityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -8500,6 +9053,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -8512,6 +9066,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -8534,6 +9089,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -8564,6 +9120,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8652,6 +9209,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -8682,6 +9240,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -8754,11 +9313,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8818,6 +9379,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -8877,11 +9439,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -8932,16 +9496,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -9003,6 +9578,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -9041,6 +9617,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -9059,6 +9636,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -9069,6 +9647,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -9084,6 +9663,7 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -9096,6 +9676,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -9126,6 +9707,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9174,6 +9756,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -9204,6 +9787,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -9283,6 +9867,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -9313,6 +9898,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: diff --git a/go.mod b/go.mod index 6c09f13f3..ad35e7c1e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/percona/percona-server-mysql-operator -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 @@ -14,6 +16,7 @@ require ( github.com/go-openapi/validate v0.24.0 github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d + github.com/google/go-cmp v0.6.0 github.com/minio/minio-go/v7 v7.0.69 github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.33.0 @@ -22,28 +25,17 @@ require ( go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 + golang.org/x/text v0.14.0 google.golang.org/grpc v1.63.2 - k8s.io/api v0.29.3 - k8s.io/apimachinery v0.29.3 - k8s.io/client-go v0.29.3 + k8s.io/api v0.30.1 + k8s.io/apimachinery v0.30.1 + k8s.io/client-go v0.30.1 k8s.io/utils v0.0.0-20240102154912-e7106e64919e - sigs.k8s.io/controller-runtime v0.17.3 + sigs.k8s.io/controller-runtime v0.18.3 ) require ( filippo.io/edwards25519 v1.1.0 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect - github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect -) - -require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 @@ -55,7 +47,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.7.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect @@ -68,10 +60,11 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/go-cmp v0.6.0 + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/iancoleman/orderedmap v0.3.0 // indirect @@ -81,12 +74,15 @@ require ( github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -106,28 +102,30 @@ require ( go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.18.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.2 // indirect - k8s.io/component-base v0.29.2 // indirect - k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 // indirect + k8s.io/apiextensions-apiserver v0.30.1 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect sigs.k8s.io/gateway-api v1.0.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index f0c18fedd..70939b425 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= -github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -62,7 +62,6 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -354,8 +353,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -408,24 +407,22 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= -k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= -k8s.io/apiextensions-apiserver v0.29.2 h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg= -k8s.io/apiextensions-apiserver v0.29.2/go.mod h1:aLfYjpA5p3OwtqNXQFkhJ56TB+spV8Gc4wfMhUA3/b8= -k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= -k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= -k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= -k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= -k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8= -k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 h1:avRdiaB03v88Mfvum2S3BBwkNuTlmuar4LlfO9Hajko= -k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022/go.mod h1:sIV51WBTkZrlGOJMCDZDA1IaPBUDTulPpD4y7oe038k= +k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= +k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= +k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= +k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= +k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= +k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= +k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= -sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= +sigs.k8s.io/controller-runtime v0.18.3 h1:B5Wmmo8WMWK7izei+2LlXLVDGzMwAHBNLX68lwtlSR4= +sigs.k8s.io/controller-runtime v0.18.3/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From 4da881e7b5663992a623d622c709e6fcfdc54b4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:07:47 +0300 Subject: [PATCH 141/192] CLOUD-727: Bump golang.org/x/text from 0.14.0 to 0.16.0 (#652) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.14.0 to 0.16.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.14.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index ad35e7c1e..fd7d1a0ce 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( go.nhat.io/grpcmock v0.25.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 - golang.org/x/text v0.14.0 + golang.org/x/text v0.16.0 google.golang.org/grpc v1.63.2 k8s.io/api v0.30.1 k8s.io/apimachinery v0.30.1 @@ -105,14 +105,14 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.21.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index 70939b425..0138fbe83 100644 --- a/go.sum +++ b/go.sum @@ -282,8 +282,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= @@ -304,8 +304,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= @@ -329,18 +329,18 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -353,8 +353,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 568687b9ddaeb5ca98cc40728b63dbc0b291dc9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:08:07 +0300 Subject: [PATCH 142/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.19.0 to 0.22.0 (#657) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.19.0 to 0.22.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.19.0...0.22.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 6d1f9ae5c..8598d488a 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -31,7 +31,7 @@ jobs: ./e2e-tests/build - name: Run Trivy vulnerability scanner image (linux/arm64) - uses: aquasecurity/trivy-action@0.19.0 + uses: aquasecurity/trivy-action@0.22.0 with: image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64' format: 'table' @@ -49,7 +49,7 @@ jobs: ./e2e-tests/build - name: Run Trivy vulnerability scanner image (linux/amd64) - uses: aquasecurity/trivy-action@0.19.0 + uses: aquasecurity/trivy-action@0.22.0 with: image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64' format: 'table' From 8c7152ffdcc8deca03e0fdeb9d10240092312938 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:08:45 +0300 Subject: [PATCH 143/192] CLOUD-727: Bump golangci/golangci-lint-action from 4 to 6 (#649) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 6. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v6) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/reviewdog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index a0cb595eb..731dc69f3 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -10,7 +10,7 @@ jobs: go-version: '^1.22' - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v6 with: version: latest only-new-issues: true From 3f2eba850777b004de0cbde31853827b0cc6472d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:16:51 +0300 Subject: [PATCH 144/192] CLOUD-727: Bump sigs.k8s.io/controller-runtime from 0.18.3 to 0.18.4 (#658) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.3 to 0.18.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.18.3...v0.18.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fd7d1a0ce..794c818ef 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( k8s.io/apimachinery v0.30.1 k8s.io/client-go v0.30.1 k8s.io/utils v0.0.0-20240102154912-e7106e64919e - sigs.k8s.io/controller-runtime v0.18.3 + sigs.k8s.io/controller-runtime v0.18.4 ) require ( diff --git a/go.sum b/go.sum index 0138fbe83..f16ce58a4 100644 --- a/go.sum +++ b/go.sum @@ -421,8 +421,8 @@ k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7F k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.18.3 h1:B5Wmmo8WMWK7izei+2LlXLVDGzMwAHBNLX68lwtlSR4= -sigs.k8s.io/controller-runtime v0.18.3/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= +sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From a2059f4e437b57232b7ef61abd8c5b45b5df7d81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:18:35 +0300 Subject: [PATCH 145/192] CLOUD-727: Bump google.golang.org/grpc from 1.63.2 to 1.64.0 (#641) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.63.2 to 1.64.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.63.2...v1.64.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 9 ++++----- go.sum | 18 ++++++++---------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 794c818ef..33a719df9 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 - google.golang.org/grpc v1.63.2 + google.golang.org/grpc v1.64.0 k8s.io/api v0.30.1 k8s.io/apimachinery v0.30.1 k8s.io/client-go v0.30.1 @@ -108,16 +108,15 @@ require ( golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index f16ce58a4..6c83bffaa 100644 --- a/go.sum +++ b/go.sum @@ -307,8 +307,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= 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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -368,19 +368,17 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= From 243b5278c2a80c2354c43afd385b48bb6b883758 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:41:22 +0300 Subject: [PATCH 146/192] CLOUD-727: Bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.19.0 (#647) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.17.1 to 2.19.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.17.1...v2.19.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 9 +++++---- go.sum | 22 ++++++++-------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 33a719df9..ef5b7c146 100644 --- a/go.mod +++ b/go.mod @@ -18,8 +18,8 @@ require ( github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/google/go-cmp v0.6.0 github.com/minio/minio-go/v7 v7.0.69 - github.com/onsi/ginkgo/v2 v2.17.1 - github.com/onsi/gomega v1.33.0 + github.com/onsi/ginkgo/v2 v2.19.0 + github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 go.nhat.io/grpcmock v0.25.0 @@ -34,6 +34,8 @@ require ( sigs.k8s.io/controller-runtime v0.18.4 ) +require github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect @@ -56,13 +58,12 @@ require ( github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/loads v0.22.0 // indirect github.com/go-openapi/spec v0.21.0 // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect + github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect diff --git a/go.sum b/go.sum index 6c83bffaa..6c8d8ebb1 100644 --- a/go.sum +++ b/go.sum @@ -32,9 +32,6 @@ github.com/cert-manager/cert-manager v1.14.4 h1:DLXIZHx3jhkViYfobXo+N7/od/oj4YgG github.com/cert-manager/cert-manager v1.14.4/go.mod h1:d+CBeRu5MbpHTfXkkiiamUhnfdvhbThoOPwilU4UM98= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -91,8 +88,8 @@ github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1 github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04vbmDOc3yuruGvVO+LOa7cVER3yWw= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -120,8 +117,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -133,7 +130,6 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0Q github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -191,10 +187,10 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= -github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= -github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= -github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -235,7 +231,6 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -321,7 +316,6 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From cda0c88c9448b1636a261c6a6645c47bbb433bf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:42:38 +0300 Subject: [PATCH 147/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.69 to 7.0.71 (#662) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.69 to 7.0.71. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.69...v7.0.71) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 +++++--- go.sum | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index ef5b7c146..1cbc1411b 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/google/go-cmp v0.6.0 - github.com/minio/minio-go/v7 v7.0.69 + github.com/minio/minio-go/v7 v7.0.71 github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 @@ -34,7 +34,10 @@ require ( sigs.k8s.io/controller-runtime v0.18.4 ) -require github.com/go-task/slim-sprig/v3 v3.0.0 // indirect +require ( + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect +) require ( filippo.io/edwards25519 v1.1.0 // indirect @@ -77,7 +80,6 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/go.sum b/go.sum index 6c8d8ebb1..d675e2b30 100644 --- a/go.sum +++ b/go.sum @@ -92,6 +92,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04vbmDOc3yuruGvVO+LOa7cVER3yWw= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= @@ -163,10 +165,8 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvls github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.69 h1:l8AnsQFyY1xiwa/DaQskY4NXSLA2yrGsW5iD9nRPVS0= -github.com/minio/minio-go/v7 v7.0.69/go.mod h1:XAvOPJQ5Xlzk5o3o/ArO2NMbhSGkimC+bpW/ngRKDmQ= -github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= -github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= +github.com/minio/minio-go/v7 v7.0.71 h1:No9XfOKTYi6i0GnBj+WZwD8WP5GZfL7n7GOjRqCdAjA= +github.com/minio/minio-go/v7 v7.0.71/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= From c054a37b7a1507e448d1ce7658522f3aa370ed16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 20:31:13 +0300 Subject: [PATCH 148/192] CLOUD-727: Bump github.com/cert-manager/cert-manager (#661) Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.14.4 to 1.15.0. - [Release notes](https://github.com/cert-manager/cert-manager/releases) - [Changelog](https://github.com/cert-manager/cert-manager/blob/master/RELEASE.md) - [Commits](https://github.com/cert-manager/cert-manager/compare/v1.14.4...v1.15.0) --- updated-dependencies: - dependency-name: github.com/cert-manager/cert-manager dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 44 ++++++++++--------- go.sum | 130 +++++++++++++++++++++++---------------------------------- 2 files changed, 73 insertions(+), 101 deletions(-) diff --git a/go.mod b/go.mod index 1cbc1411b..ac91f5f05 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.22.3 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 - github.com/cert-manager/cert-manager v1.14.4 + github.com/cert-manager/cert-manager v1.15.0 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.1 github.com/go-openapi/errors v0.22.0 @@ -30,7 +30,7 @@ require ( k8s.io/api v0.30.1 k8s.io/apimachinery v0.30.1 k8s.io/client-go v0.30.1 - k8s.io/utils v0.0.0-20240102154912-e7106e64919e + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 sigs.k8s.io/controller-runtime v0.18.4 ) @@ -42,16 +42,16 @@ require ( require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bool64/shared v0.1.5 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch v5.7.0+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/evanphx/json-patch v5.9.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -68,9 +68,9 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -78,7 +78,6 @@ require ( github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/spdystream v0.2.0 // indirect @@ -90,9 +89,9 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.18.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.46.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -104,31 +103,30 @@ require ( go.mongodb.org/mongo-driver v1.14.0 // indirect go.nhat.io/matcher/v2 v2.0.0 // indirect go.nhat.io/wait v0.1.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.20.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.30.1 // indirect k8s.io/klog/v2 v2.120.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - sigs.k8s.io/gateway-api v1.0.0 // indirect + k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f // indirect + sigs.k8s.io/gateway-api v1.1.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index d675e2b30..bf0a8d83d 100644 --- a/go.sum +++ b/go.sum @@ -3,16 +3,16 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 h1:3A878XXdSJGu9JPeOQ7bPe3g7SLkghJqcMFWL8GulLA= github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239/go.mod h1:2gW0U0FS5Bpl2cL9PrmeSb1Vp/5x0zmrN1o5iiiTd9k= @@ -28,28 +28,26 @@ github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8 github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cert-manager/cert-manager v1.14.4 h1:DLXIZHx3jhkViYfobXo+N7/od/oj4YgG6AJw4ORJnYs= -github.com/cert-manager/cert-manager v1.14.4/go.mod h1:d+CBeRu5MbpHTfXkkiiamUhnfdvhbThoOPwilU4UM98= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cert-manager/cert-manager v1.15.0 h1:xVL8tzdQECMypoYQa9rv4DLjkn2pJXJLTqH4JUsxfko= +github.com/cert-manager/cert-manager v1.15.0/go.mod h1:Vxq6yNKAbgQeMtzu5gqU8n0vXDiZcGTa5LDyCJRbmXE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= +github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= -github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= @@ -96,8 +94,8 @@ github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= -github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -105,14 +103,11 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -124,12 +119,12 @@ github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwg github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -159,10 +154,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.71 h1:No9XfOKTYi6i0GnBj+WZwD8WP5GZfL7n7GOjRqCdAjA= @@ -205,12 +198,12 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= +github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= @@ -244,7 +237,6 @@ github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcm github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.nhat.io/aferomock v0.4.0 h1:gs3nJzIqAezglUuaPfautAmZwulwRWLcfSSzdK4YCC0= @@ -255,14 +247,14 @@ go.nhat.io/matcher/v2 v2.0.0 h1:W+rbHi0hKuZHtOQH4U5g+KwyKyfVioIxrxjoGRcUETE= go.nhat.io/matcher/v2 v2.0.0/go.mod h1:cL5oYp0M9A4L8jEGqjmUfy+k7AXVDddoVt6aYIL1r5g= go.nhat.io/wait v0.1.0 h1:aQ4YDzaOgFbypiJ9c/eAfOIB1G25VOv7Gd2QS8uz1gw= go.nhat.io/wait v0.1.0/go.mod h1:+ijMghc9/9zXi+HDcs49HNReprvXOZha2Q3jTOtqJrE= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -276,19 +268,17 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -297,19 +287,16 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -317,22 +304,14 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -346,7 +325,6 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -357,15 +335,13 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 h1:4HZJ3Xv1cmrJ+0aFo304Zn79ur1HMxptAE7aCPNLSqc= +google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -373,10 +349,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -409,14 +383,14 @@ k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= +k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= -sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs= -sigs.k8s.io/gateway-api v1.0.0/go.mod h1:4cUgr0Lnp5FZ0Cdq8FdRwCvpiWws7LVhLHGIudLlf4c= +sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= +sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= From a7b56943f10a74f5dd4b3eee357e3e5d95903ce5 Mon Sep 17 00:00:00 2001 From: Pavel Tankov <4014969+ptankov@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:13:17 +0300 Subject: [PATCH 149/192] updating-jq-and-yq-versions (#660) --- Jenkinsfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 307671e20..35262d17a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -240,11 +240,8 @@ void prepareNode() { curl -fsSL https://get.helm.sh/helm-v3.12.3-linux-amd64.tar.gz | sudo tar -C /usr/local/bin --strip-components 1 -xzf - linux-amd64/helm - sudo sh -c "curl -s -L https://github.com/mikefarah/yq/releases/download/v4.35.1/yq_linux_amd64 > /usr/local/bin/yq" - sudo chmod +x /usr/local/bin/yq - - sudo sh -c "curl -s -L https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 > /usr/local/bin/jq" - sudo chmod +x /usr/local/bin/jq + sudo curl -fsSL https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 -o /usr/local/bin/yq && sudo chmod +x /usr/local/bin/yq + sudo curl -fsSL https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux64 -o /usr/local/bin/jq && sudo chmod +x /usr/local/bin/jq curl -fsSL https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz | tar -xzf - ./krew-linux_amd64 install krew From d2bec5083bb53b21ebbdca8e8743ee7c418ab495 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:09:25 +0300 Subject: [PATCH 150/192] CLOUD-727: Bump github.com/go-logr/logr from 1.4.1 to 1.4.2 (#664) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ac91f5f05..95fc265ff 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 github.com/cert-manager/cert-manager v1.15.0 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 - github.com/go-logr/logr v1.4.1 + github.com/go-logr/logr v1.4.2 github.com/go-openapi/errors v0.22.0 github.com/go-openapi/runtime v0.28.0 github.com/go-openapi/strfmt v0.23.0 diff --git a/go.sum b/go.sum index bf0a8d83d..6a487c995 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= From 4416f4bbe8aabb021aa6eb9ea5dd383c2eb74b4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:11:25 +0300 Subject: [PATCH 151/192] CLOUD-727: Bump go.nhat.io/grpcmock from 0.25.0 to 0.26.0 (#663) Bumps [go.nhat.io/grpcmock](https://github.com/nhatthm/grpcmock) from 0.25.0 to 0.26.0. - [Release notes](https://github.com/nhatthm/grpcmock/releases) - [Commits](https://github.com/nhatthm/grpcmock/compare/v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: go.nhat.io/grpcmock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 95fc265ff..71c2cecf5 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 github.com/sjmudd/stopwatch v0.1.1 - go.nhat.io/grpcmock v0.25.0 + go.nhat.io/grpcmock v0.26.0 go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 @@ -117,7 +117,7 @@ require ( golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 6a487c995..ad8a119f6 100644 --- a/go.sum +++ b/go.sum @@ -241,8 +241,8 @@ go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.nhat.io/aferomock v0.4.0 h1:gs3nJzIqAezglUuaPfautAmZwulwRWLcfSSzdK4YCC0= go.nhat.io/aferomock v0.4.0/go.mod h1:msi5MDOtJ/AroUa/lDc3jVGOILM4SKP//4yBRImOvkI= -go.nhat.io/grpcmock v0.25.0 h1:zk03vvA60w7UrnurZbqL4wxnjmJz1Kuyb7ig2MF+n4c= -go.nhat.io/grpcmock v0.25.0/go.mod h1:5U694ASEFBkiZP7aPuz9kbbb/jphVlfpbOnocyht/rE= +go.nhat.io/grpcmock v0.26.0 h1:XXR62JrF8EpAP+oTO5SWmyIj25rAQsmqtAFdcppzabo= +go.nhat.io/grpcmock v0.26.0/go.mod h1:XBzBoqqy8NnKR9IV8dtsKtkKJZI62XDaIfj6xcwZEaY= go.nhat.io/matcher/v2 v2.0.0 h1:W+rbHi0hKuZHtOQH4U5g+KwyKyfVioIxrxjoGRcUETE= go.nhat.io/matcher/v2 v2.0.0/go.mod h1:cL5oYp0M9A4L8jEGqjmUfy+k7AXVDddoVt6aYIL1r5g= go.nhat.io/wait v0.1.0 h1:aQ4YDzaOgFbypiJ9c/eAfOIB1G25VOv7Gd2QS8uz1gw= @@ -340,8 +340,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 h1:4HZJ3Xv1cmrJ+0aFo304Zn79ur1HMxptAE7aCPNLSqc= google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= From 2c22daa4e4e6d27dc4b66a0db54d4adc2f4c59e3 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Wed, 12 Jun 2024 14:26:43 +0300 Subject: [PATCH 152/192] K8SPS-334: add prefix to finalizers (#655) * K8SPS-334: add prefix to finalizers https://perconadev.atlassian.net/browse/K8SPS-334 * fix rename * `delete-backup` => `percona.com/delete-backup` --------- Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 41 +++++-------------- cmd/orc-handler/main.go | 13 +++--- deploy/backup.yaml | 2 +- deploy/cr.yaml | 4 +- .../async-ignore-annotations/01-assert.yaml | 2 +- e2e-tests/tests/demand-backup/02-assert.yaml | 2 +- e2e-tests/tests/demand-backup/05-assert.yaml | 2 +- .../demand-backup/05-create-backup-minio.yaml | 2 +- e2e-tests/tests/demand-backup/08-assert.yaml | 2 +- e2e-tests/tests/demand-backup/12-assert.yaml | 2 +- e2e-tests/tests/demand-backup/14-assert.yaml | 2 +- .../demand-backup/14-create-backup-s3.yaml | 2 +- e2e-tests/tests/demand-backup/16-assert.yaml | 2 +- e2e-tests/tests/demand-backup/18-assert.yaml | 2 +- .../demand-backup/18-create-backup-gcp.yaml | 2 +- e2e-tests/tests/demand-backup/20-assert.yaml | 2 +- e2e-tests/tests/demand-backup/22-assert.yaml | 2 +- .../demand-backup/22-create-backup-azure.yaml | 2 +- e2e-tests/tests/demand-backup/24-assert.yaml | 2 +- e2e-tests/tests/gr-haproxy/01-assert.yaml | 2 +- e2e-tests/tests/gr-init-deploy/01-assert.yaml | 2 +- e2e-tests/tests/gr-recreate/01-assert.yaml | 2 +- e2e-tests/tests/gr-recreate/03-assert.yaml | 2 +- e2e-tests/tests/gr-recreate/04-assert.yaml | 2 +- e2e-tests/tests/gr-recreate/09-assert.yaml | 2 +- e2e-tests/tests/gr-scaling/01-assert.yaml | 2 +- e2e-tests/tests/gr-scaling/05-assert.yaml | 2 +- .../tests/gr-scaling/05-scale-down-mysql.yaml | 2 +- e2e-tests/tests/gr-scaling/07-assert.yaml | 2 +- .../tests/gr-scaling/07-scale-down-proxy.yaml | 2 +- e2e-tests/tests/gr-scaling/09-assert.yaml | 2 +- .../gr-scaling/09-scale-up-everything.yaml | 2 +- .../tests/gr-self-healing/02-assert.yaml | 2 +- .../tests/gr-self-healing/05-assert.yaml | 2 +- .../tests/gr-self-healing/08-assert.yaml | 2 +- .../tests/gr-self-healing/11-assert.yaml | 2 +- .../tests/gr-self-healing/13-assert.yaml | 2 +- .../tests/gr-self-healing/14-assert.yaml | 2 +- e2e-tests/tests/haproxy/01-assert.yaml | 2 +- e2e-tests/tests/haproxy/09-assert.yaml | 2 +- e2e-tests/tests/init-deploy/01-assert.yaml | 2 +- e2e-tests/tests/monitoring/02-assert.yaml | 2 +- e2e-tests/tests/monitoring/03-assert.yaml | 2 +- .../operator-self-healing/02-assert.yaml | 2 +- .../operator-self-healing/06-assert.yaml | 2 +- .../operator-self-healing/08-assert.yaml | 2 +- .../operator-self-healing/10-assert.yaml | 2 +- e2e-tests/tests/recreate/01-assert.yaml | 2 +- e2e-tests/tests/recreate/03-assert.yaml | 2 +- e2e-tests/tests/recreate/04-assert.yaml | 2 +- e2e-tests/tests/recreate/09-assert.yaml | 2 +- e2e-tests/tests/scaling/01-assert.yaml | 2 +- e2e-tests/tests/scaling/06-assert.yaml | 2 +- e2e-tests/tests/scaling/08-assert.yaml | 2 +- .../tests/service-per-pod/01-assert.yaml | 2 +- .../tests/service-per-pod/04-assert.yaml | 2 +- .../tests/tls-cert-manager/02-assert.yaml | 2 +- .../tests/tls-cert-manager/04-assert.yaml | 2 +- .../tests/tls-cert-manager/06-assert.yaml | 2 +- pkg/controller/ps/controller.go | 9 ++-- pkg/controller/ps/tls_test.go | 11 ++--- pkg/controller/ps/user.go | 21 ++++------ pkg/controller/psbackup/controller.go | 5 +-- pkg/controller/psbackup/controller_test.go | 29 ++++++------- pkg/haproxy/haproxy.go | 7 ++-- pkg/k8s/utils.go | 9 ++-- pkg/mysql/mysql.go | 9 ++-- pkg/naming/naming.go | 40 ++++++++++++++++++ pkg/orchestrator/orchestrator.go | 9 ++-- pkg/router/router.go | 7 ++-- pkg/xtrabackup/xtrabackup.go | 8 ++-- 71 files changed, 178 insertions(+), 156 deletions(-) create mode 100644 pkg/naming/naming.go diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index d181c2f37..073d66ee6 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -25,19 +25,19 @@ import ( "strings" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - - "github.com/percona/percona-server-mysql-operator/pkg/platform" - "github.com/percona/percona-server-mysql-operator/pkg/version" + "github.com/pkg/errors" "golang.org/x/text/cases" "golang.org/x/text/language" - - "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/percona/percona-server-mysql-operator/pkg/naming" + "github.com/percona/percona-server-mysql-operator/pkg/platform" + "github.com/percona/percona-server-mysql-operator/pkg/version" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -876,32 +876,13 @@ func (p *PodSpec) GetTopologySpreadConstraints(ls map[string]string) []corev1.To return tscs } -type AnnotationKey string - -const ( - AnnotationSpecHash AnnotationKey = "percona.com/last-applied-spec" - AnnotationSecretHash AnnotationKey = "percona.com/last-applied-secret" - AnnotationConfigHash AnnotationKey = "percona.com/configuration-hash" - AnnotationTLSHash AnnotationKey = "percona.com/last-applied-tls" -) - -const ( - NameLabel = "app.kubernetes.io/name" - InstanceLabel = "app.kubernetes.io/instance" - ManagedByLabel = "app.kubernetes.io/managed-by" - PartOfLabel = "app.kubernetes.io/part-of" - ComponentLabel = "app.kubernetes.io/component" - MySQLPrimaryLabel = "mysql.percona.com/primary" - ExposedLabel = "percona.com/exposed" -) - // Labels returns a standardized set of labels for the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) Labels() map[string]string { return map[string]string{ - NameLabel: "percona-server", - InstanceLabel: cr.Name, - ManagedByLabel: "percona-server-operator", - PartOfLabel: "percona-server", + naming.LabelName: "percona-server", + naming.LabelInstance: cr.Name, + naming.LabelManagedBy: "percona-server-operator", + naming.LabelPartOf: "percona-server", } } @@ -914,9 +895,9 @@ func (cr *PerconaServerMySQL) ClusterHint() string { // GetClusterNameFromObject retrieves the cluster's name from the given client object's labels. func GetClusterNameFromObject(obj client.Object) (string, error) { labels := obj.GetLabels() - instance, ok := labels[InstanceLabel] + instance, ok := labels[naming.LabelInstance] if !ok { - return "", errors.Errorf("label %s doesn't exist", InstanceLabel) + return "", errors.Errorf("label %s doesn't exist", naming.LabelInstance) } return instance, nil } diff --git a/cmd/orc-handler/main.go b/cmd/orc-handler/main.go index 413f3403d..ad7ca0f84 100644 --- a/cmd/orc-handler/main.go +++ b/cmd/orc-handler/main.go @@ -22,14 +22,13 @@ import ( perconaClientCmd "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/platform" ) var log = logf.Log.WithName("orc-handler") -var ( - primary = flag.String("primary", "", "Primary hostname") -) +var primary = flag.String("primary", "", "Primary hostname") func main() { ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, os.Interrupt) @@ -124,8 +123,8 @@ func setPrimaryLabel(ctx context.Context, primary string) error { continue } pod := pods[i].DeepCopy() - if pod.GetLabels()[apiv1alpha1.MySQLPrimaryLabel] == "true" { - k8s.RemoveLabel(pod, apiv1alpha1.MySQLPrimaryLabel) + if pod.GetLabels()[naming.LabelMySQLPrimary] == "true" { + k8s.RemoveLabel(pod, naming.LabelMySQLPrimary) if err := cl.Patch(ctx, pod, client.StrategicMergeFrom(&pods[i])); err != nil { return errors.Wrapf(err, "remove label from old primary pod: %v/%v", pod.GetNamespace(), pod.GetName()) } @@ -138,13 +137,13 @@ func setPrimaryLabel(ctx context.Context, primary string) error { return errors.Wrapf(err, "primary pod %s not found %s", primaryName, primary) } - if primaryPod.GetLabels()[apiv1alpha1.MySQLPrimaryLabel] == "true" { + if primaryPod.GetLabels()[naming.LabelMySQLPrimary] == "true" { log.Info("Primary pod is not changed, skipping", "pod", primaryName) return nil } pod := primaryPod.DeepCopy() - k8s.AddLabel(pod, apiv1alpha1.MySQLPrimaryLabel, "true") + k8s.AddLabel(pod, naming.LabelMySQLPrimary, "true") if err := cl.Patch(ctx, pod, client.StrategicMergeFrom(primaryPod)); err != nil { return errors.Wrapf(err, "add label to new primary pod %v/%v", pod.GetNamespace(), pod.GetName()) } diff --git a/deploy/backup.yaml b/deploy/backup.yaml index ed98ea0fd..33d21a41f 100644 --- a/deploy/backup.yaml +++ b/deploy/backup.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQLBackup metadata: name: backup1 finalizers: - - delete-backup + - percona.com/delete-backup spec: clusterName: cluster1 storageName: minio diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 2e46eb58f..86fe2c8ea 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -3,8 +3,8 @@ kind: PerconaServerMySQL metadata: name: cluster1 finalizers: - - delete-mysql-pods-in-order - # - delete-ssl + - percona.com/delete-mysql-pods-in-order + # - percona.com/delete-ssl spec: allowUnsafeConfigurations: false # pause: false diff --git a/e2e-tests/tests/async-ignore-annotations/01-assert.yaml b/e2e-tests/tests/async-ignore-annotations/01-assert.yaml index b91ac65f6..ba5b7f6f8 100644 --- a/e2e-tests/tests/async-ignore-annotations/01-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/01-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: async-ignore-annotations finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/demand-backup/02-assert.yaml b/e2e-tests/tests/demand-backup/02-assert.yaml index f5c04da48..f2c821b48 100644 --- a/e2e-tests/tests/demand-backup/02-assert.yaml +++ b/e2e-tests/tests/demand-backup/02-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: demand-backup finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/demand-backup/05-assert.yaml b/e2e-tests/tests/demand-backup/05-assert.yaml index 13db16d7d..c1e624de9 100644 --- a/e2e-tests/tests/demand-backup/05-assert.yaml +++ b/e2e-tests/tests/demand-backup/05-assert.yaml @@ -7,6 +7,6 @@ apiVersion: ps.percona.com/v1alpha1 metadata: name: demand-backup-minio finalizers: - - delete-backup + - percona.com/delete-backup status: state: Succeeded diff --git a/e2e-tests/tests/demand-backup/05-create-backup-minio.yaml b/e2e-tests/tests/demand-backup/05-create-backup-minio.yaml index dda5c38ba..655aa9650 100644 --- a/e2e-tests/tests/demand-backup/05-create-backup-minio.yaml +++ b/e2e-tests/tests/demand-backup/05-create-backup-minio.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQLBackup metadata: name: demand-backup-minio finalizers: - - delete-backup + - percona.com/delete-backup spec: clusterName: demand-backup storageName: minio diff --git a/e2e-tests/tests/demand-backup/08-assert.yaml b/e2e-tests/tests/demand-backup/08-assert.yaml index b0a45bad2..2aa37517e 100644 --- a/e2e-tests/tests/demand-backup/08-assert.yaml +++ b/e2e-tests/tests/demand-backup/08-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: demand-backup finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/demand-backup/12-assert.yaml b/e2e-tests/tests/demand-backup/12-assert.yaml index 2c6402930..488381da4 100644 --- a/e2e-tests/tests/demand-backup/12-assert.yaml +++ b/e2e-tests/tests/demand-backup/12-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: demand-backup finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/demand-backup/14-assert.yaml b/e2e-tests/tests/demand-backup/14-assert.yaml index e82428cb8..57e7257d6 100644 --- a/e2e-tests/tests/demand-backup/14-assert.yaml +++ b/e2e-tests/tests/demand-backup/14-assert.yaml @@ -7,6 +7,6 @@ apiVersion: ps.percona.com/v1alpha1 metadata: name: demand-backup-s3 finalizers: - - delete-backup + - percona.com/delete-backup status: state: Succeeded diff --git a/e2e-tests/tests/demand-backup/14-create-backup-s3.yaml b/e2e-tests/tests/demand-backup/14-create-backup-s3.yaml index 3542517f4..9bc6a7460 100644 --- a/e2e-tests/tests/demand-backup/14-create-backup-s3.yaml +++ b/e2e-tests/tests/demand-backup/14-create-backup-s3.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQLBackup metadata: name: demand-backup-s3 finalizers: - - delete-backup + - percona.com/delete-backup spec: clusterName: demand-backup storageName: aws-s3 diff --git a/e2e-tests/tests/demand-backup/16-assert.yaml b/e2e-tests/tests/demand-backup/16-assert.yaml index 699b59f0a..cbf66023a 100644 --- a/e2e-tests/tests/demand-backup/16-assert.yaml +++ b/e2e-tests/tests/demand-backup/16-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: demand-backup finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/demand-backup/18-assert.yaml b/e2e-tests/tests/demand-backup/18-assert.yaml index 19074dea6..927b78c5a 100644 --- a/e2e-tests/tests/demand-backup/18-assert.yaml +++ b/e2e-tests/tests/demand-backup/18-assert.yaml @@ -7,6 +7,6 @@ apiVersion: ps.percona.com/v1alpha1 metadata: name: demand-backup-gcp finalizers: - - delete-backup + - percona.com/delete-backup status: state: Succeeded diff --git a/e2e-tests/tests/demand-backup/18-create-backup-gcp.yaml b/e2e-tests/tests/demand-backup/18-create-backup-gcp.yaml index e24042b77..4d1513796 100644 --- a/e2e-tests/tests/demand-backup/18-create-backup-gcp.yaml +++ b/e2e-tests/tests/demand-backup/18-create-backup-gcp.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQLBackup metadata: name: demand-backup-gcp finalizers: - - delete-backup + - percona.com/delete-backup spec: clusterName: demand-backup storageName: gcp-cs diff --git a/e2e-tests/tests/demand-backup/20-assert.yaml b/e2e-tests/tests/demand-backup/20-assert.yaml index 5ac4092e8..07f0131a5 100644 --- a/e2e-tests/tests/demand-backup/20-assert.yaml +++ b/e2e-tests/tests/demand-backup/20-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: demand-backup finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/demand-backup/22-assert.yaml b/e2e-tests/tests/demand-backup/22-assert.yaml index ab6757c21..5e6a47622 100644 --- a/e2e-tests/tests/demand-backup/22-assert.yaml +++ b/e2e-tests/tests/demand-backup/22-assert.yaml @@ -7,6 +7,6 @@ apiVersion: ps.percona.com/v1alpha1 metadata: name: demand-backup-azure finalizers: - - delete-backup + - percona.com/delete-backup status: state: Succeeded diff --git a/e2e-tests/tests/demand-backup/22-create-backup-azure.yaml b/e2e-tests/tests/demand-backup/22-create-backup-azure.yaml index df8e8bc44..a0df5c7c4 100644 --- a/e2e-tests/tests/demand-backup/22-create-backup-azure.yaml +++ b/e2e-tests/tests/demand-backup/22-create-backup-azure.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQLBackup metadata: name: demand-backup-azure finalizers: - - delete-backup + - percona.com/delete-backup spec: clusterName: demand-backup storageName: azure-blob diff --git a/e2e-tests/tests/demand-backup/24-assert.yaml b/e2e-tests/tests/demand-backup/24-assert.yaml index 0f99b8415..93c1ff95a 100644 --- a/e2e-tests/tests/demand-backup/24-assert.yaml +++ b/e2e-tests/tests/demand-backup/24-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: demand-backup finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/gr-haproxy/01-assert.yaml b/e2e-tests/tests/gr-haproxy/01-assert.yaml index 168163cd8..99d995588 100644 --- a/e2e-tests/tests/gr-haproxy/01-assert.yaml +++ b/e2e-tests/tests/gr-haproxy/01-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-haproxy finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-init-deploy/01-assert.yaml b/e2e-tests/tests/gr-init-deploy/01-assert.yaml index d13e2f01b..e3895aa8c 100644 --- a/e2e-tests/tests/gr-init-deploy/01-assert.yaml +++ b/e2e-tests/tests/gr-init-deploy/01-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-init-deploy finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-recreate/01-assert.yaml b/e2e-tests/tests/gr-recreate/01-assert.yaml index 0defb50bc..d305c4304 100644 --- a/e2e-tests/tests/gr-recreate/01-assert.yaml +++ b/e2e-tests/tests/gr-recreate/01-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-recreate/03-assert.yaml b/e2e-tests/tests/gr-recreate/03-assert.yaml index f6a32005e..4d9c48f98 100644 --- a/e2e-tests/tests/gr-recreate/03-assert.yaml +++ b/e2e-tests/tests/gr-recreate/03-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: gr-recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: state: paused diff --git a/e2e-tests/tests/gr-recreate/04-assert.yaml b/e2e-tests/tests/gr-recreate/04-assert.yaml index 954091fa1..432e827c9 100644 --- a/e2e-tests/tests/gr-recreate/04-assert.yaml +++ b/e2e-tests/tests/gr-recreate/04-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-recreate/09-assert.yaml b/e2e-tests/tests/gr-recreate/09-assert.yaml index 8fbe7b5f8..99d4dffdc 100644 --- a/e2e-tests/tests/gr-recreate/09-assert.yaml +++ b/e2e-tests/tests/gr-recreate/09-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-scaling/01-assert.yaml b/e2e-tests/tests/gr-scaling/01-assert.yaml index 0b9a460dc..0b537f2b5 100644 --- a/e2e-tests/tests/gr-scaling/01-assert.yaml +++ b/e2e-tests/tests/gr-scaling/01-assert.yaml @@ -30,7 +30,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-scaling/05-assert.yaml b/e2e-tests/tests/gr-scaling/05-assert.yaml index 8540bd032..bc369cbe6 100644 --- a/e2e-tests/tests/gr-scaling/05-assert.yaml +++ b/e2e-tests/tests/gr-scaling/05-assert.yaml @@ -30,7 +30,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 1 diff --git a/e2e-tests/tests/gr-scaling/05-scale-down-mysql.yaml b/e2e-tests/tests/gr-scaling/05-scale-down-mysql.yaml index 6ed303740..44fc33e22 100644 --- a/e2e-tests/tests/gr-scaling/05-scale-down-mysql.yaml +++ b/e2e-tests/tests/gr-scaling/05-scale-down-mysql.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order spec: mysql: size: 1 diff --git a/e2e-tests/tests/gr-scaling/07-assert.yaml b/e2e-tests/tests/gr-scaling/07-assert.yaml index 4b7324be5..bf0b78a0f 100644 --- a/e2e-tests/tests/gr-scaling/07-assert.yaml +++ b/e2e-tests/tests/gr-scaling/07-assert.yaml @@ -30,7 +30,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 1 diff --git a/e2e-tests/tests/gr-scaling/07-scale-down-proxy.yaml b/e2e-tests/tests/gr-scaling/07-scale-down-proxy.yaml index 1cbba934a..0e8acb2e1 100644 --- a/e2e-tests/tests/gr-scaling/07-scale-down-proxy.yaml +++ b/e2e-tests/tests/gr-scaling/07-scale-down-proxy.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order spec: proxy: router: diff --git a/e2e-tests/tests/gr-scaling/09-assert.yaml b/e2e-tests/tests/gr-scaling/09-assert.yaml index cf221f4db..651b702c6 100644 --- a/e2e-tests/tests/gr-scaling/09-assert.yaml +++ b/e2e-tests/tests/gr-scaling/09-assert.yaml @@ -30,7 +30,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-scaling/09-scale-up-everything.yaml b/e2e-tests/tests/gr-scaling/09-scale-up-everything.yaml index 7b2360699..2396f9f90 100644 --- a/e2e-tests/tests/gr-scaling/09-scale-up-everything.yaml +++ b/e2e-tests/tests/gr-scaling/09-scale-up-everything.yaml @@ -3,7 +3,7 @@ kind: PerconaServerMySQL metadata: name: gr-scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order spec: mysql: size: 3 diff --git a/e2e-tests/tests/gr-self-healing/02-assert.yaml b/e2e-tests/tests/gr-self-healing/02-assert.yaml index ea774179f..5abb86755 100644 --- a/e2e-tests/tests/gr-self-healing/02-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/02-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-self-healing/05-assert.yaml b/e2e-tests/tests/gr-self-healing/05-assert.yaml index f107033cd..f684c5879 100644 --- a/e2e-tests/tests/gr-self-healing/05-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/05-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-self-healing/08-assert.yaml b/e2e-tests/tests/gr-self-healing/08-assert.yaml index e2f394cc0..8f6e75005 100644 --- a/e2e-tests/tests/gr-self-healing/08-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/08-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-self-healing/11-assert.yaml b/e2e-tests/tests/gr-self-healing/11-assert.yaml index 7075a30c6..ec02c6ba0 100644 --- a/e2e-tests/tests/gr-self-healing/11-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/11-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-self-healing/13-assert.yaml b/e2e-tests/tests/gr-self-healing/13-assert.yaml index c74eca537..3decb9705 100644 --- a/e2e-tests/tests/gr-self-healing/13-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/13-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: gr-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/gr-self-healing/14-assert.yaml b/e2e-tests/tests/gr-self-healing/14-assert.yaml index 022a09012..ab1e5930f 100644 --- a/e2e-tests/tests/gr-self-healing/14-assert.yaml +++ b/e2e-tests/tests/gr-self-healing/14-assert.yaml @@ -29,7 +29,7 @@ kind: PerconaServerMySQL metadata: name: gr-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/haproxy/01-assert.yaml b/e2e-tests/tests/haproxy/01-assert.yaml index 49126eeb1..209b89169 100644 --- a/e2e-tests/tests/haproxy/01-assert.yaml +++ b/e2e-tests/tests/haproxy/01-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: haproxy finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/haproxy/09-assert.yaml b/e2e-tests/tests/haproxy/09-assert.yaml index e471a1ad0..835847baf 100644 --- a/e2e-tests/tests/haproxy/09-assert.yaml +++ b/e2e-tests/tests/haproxy/09-assert.yaml @@ -31,7 +31,7 @@ kind: PerconaServerMySQL metadata: name: haproxy finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: {} mysql: diff --git a/e2e-tests/tests/init-deploy/01-assert.yaml b/e2e-tests/tests/init-deploy/01-assert.yaml index 3af6bb3c4..bf99ec956 100644 --- a/e2e-tests/tests/init-deploy/01-assert.yaml +++ b/e2e-tests/tests/init-deploy/01-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: init-deploy finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/monitoring/02-assert.yaml b/e2e-tests/tests/monitoring/02-assert.yaml index 914e8fef2..3f7ac51f5 100644 --- a/e2e-tests/tests/monitoring/02-assert.yaml +++ b/e2e-tests/tests/monitoring/02-assert.yaml @@ -123,7 +123,7 @@ kind: PerconaServerMySQL metadata: name: monitoring finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/monitoring/03-assert.yaml b/e2e-tests/tests/monitoring/03-assert.yaml index a0c643f01..067809420 100644 --- a/e2e-tests/tests/monitoring/03-assert.yaml +++ b/e2e-tests/tests/monitoring/03-assert.yaml @@ -122,7 +122,7 @@ kind: PerconaServerMySQL metadata: name: monitoring finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/operator-self-healing/02-assert.yaml b/e2e-tests/tests/operator-self-healing/02-assert.yaml index 5c32cb344..14b5ab5b9 100644 --- a/e2e-tests/tests/operator-self-healing/02-assert.yaml +++ b/e2e-tests/tests/operator-self-healing/02-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: operator-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/operator-self-healing/06-assert.yaml b/e2e-tests/tests/operator-self-healing/06-assert.yaml index f5a696df9..4cf37646f 100644 --- a/e2e-tests/tests/operator-self-healing/06-assert.yaml +++ b/e2e-tests/tests/operator-self-healing/06-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: operator-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 5 diff --git a/e2e-tests/tests/operator-self-healing/08-assert.yaml b/e2e-tests/tests/operator-self-healing/08-assert.yaml index b4e8f08af..97b347804 100644 --- a/e2e-tests/tests/operator-self-healing/08-assert.yaml +++ b/e2e-tests/tests/operator-self-healing/08-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: operator-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/operator-self-healing/10-assert.yaml b/e2e-tests/tests/operator-self-healing/10-assert.yaml index c3121eccc..f3d38efd3 100644 --- a/e2e-tests/tests/operator-self-healing/10-assert.yaml +++ b/e2e-tests/tests/operator-self-healing/10-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: operator-self-healing finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 5 diff --git a/e2e-tests/tests/recreate/01-assert.yaml b/e2e-tests/tests/recreate/01-assert.yaml index bb37dfc40..cdffe6e36 100644 --- a/e2e-tests/tests/recreate/01-assert.yaml +++ b/e2e-tests/tests/recreate/01-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/recreate/03-assert.yaml b/e2e-tests/tests/recreate/03-assert.yaml index 75e60f85a..4c0eed4cf 100644 --- a/e2e-tests/tests/recreate/03-assert.yaml +++ b/e2e-tests/tests/recreate/03-assert.yaml @@ -7,7 +7,7 @@ kind: PerconaServerMySQL metadata: name: recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: state: paused diff --git a/e2e-tests/tests/recreate/04-assert.yaml b/e2e-tests/tests/recreate/04-assert.yaml index 90f7e13d3..17bfa43f6 100644 --- a/e2e-tests/tests/recreate/04-assert.yaml +++ b/e2e-tests/tests/recreate/04-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/recreate/09-assert.yaml b/e2e-tests/tests/recreate/09-assert.yaml index 041fc7797..2526dccc3 100644 --- a/e2e-tests/tests/recreate/09-assert.yaml +++ b/e2e-tests/tests/recreate/09-assert.yaml @@ -43,7 +43,7 @@ kind: PerconaServerMySQL metadata: name: recreate finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: haproxy: ready: 3 diff --git a/e2e-tests/tests/scaling/01-assert.yaml b/e2e-tests/tests/scaling/01-assert.yaml index 4c158f53e..e32d63e54 100644 --- a/e2e-tests/tests/scaling/01-assert.yaml +++ b/e2e-tests/tests/scaling/01-assert.yaml @@ -31,7 +31,7 @@ kind: PerconaServerMySQL metadata: name: scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/scaling/06-assert.yaml b/e2e-tests/tests/scaling/06-assert.yaml index 1d1166849..e1c990435 100644 --- a/e2e-tests/tests/scaling/06-assert.yaml +++ b/e2e-tests/tests/scaling/06-assert.yaml @@ -31,7 +31,7 @@ kind: PerconaServerMySQL metadata: name: scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 5 diff --git a/e2e-tests/tests/scaling/08-assert.yaml b/e2e-tests/tests/scaling/08-assert.yaml index a30411631..3d7b40406 100644 --- a/e2e-tests/tests/scaling/08-assert.yaml +++ b/e2e-tests/tests/scaling/08-assert.yaml @@ -31,7 +31,7 @@ kind: PerconaServerMySQL metadata: name: scaling finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/service-per-pod/01-assert.yaml b/e2e-tests/tests/service-per-pod/01-assert.yaml index 9fb5f5e2e..52bb0a71c 100644 --- a/e2e-tests/tests/service-per-pod/01-assert.yaml +++ b/e2e-tests/tests/service-per-pod/01-assert.yaml @@ -31,7 +31,7 @@ kind: PerconaServerMySQL metadata: name: service-per-pod finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/service-per-pod/04-assert.yaml b/e2e-tests/tests/service-per-pod/04-assert.yaml index b7cebc665..e6e143231 100644 --- a/e2e-tests/tests/service-per-pod/04-assert.yaml +++ b/e2e-tests/tests/service-per-pod/04-assert.yaml @@ -31,7 +31,7 @@ kind: PerconaServerMySQL metadata: name: service-per-pod finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order status: mysql: ready: 3 diff --git a/e2e-tests/tests/tls-cert-manager/02-assert.yaml b/e2e-tests/tests/tls-cert-manager/02-assert.yaml index e256b00de..f0b09caf1 100644 --- a/e2e-tests/tests/tls-cert-manager/02-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/02-assert.yaml @@ -67,7 +67,7 @@ kind: PerconaServerMySQL metadata: name: tls-cert-manager finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order generation: 1 spec: mysql: diff --git a/e2e-tests/tests/tls-cert-manager/04-assert.yaml b/e2e-tests/tests/tls-cert-manager/04-assert.yaml index cd9b7e902..646b71b87 100644 --- a/e2e-tests/tests/tls-cert-manager/04-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/04-assert.yaml @@ -67,7 +67,7 @@ kind: PerconaServerMySQL metadata: name: tls-cert-manager finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order generation: 2 spec: mysql: diff --git a/e2e-tests/tests/tls-cert-manager/06-assert.yaml b/e2e-tests/tests/tls-cert-manager/06-assert.yaml index 16ea6bfff..32c3e6423 100644 --- a/e2e-tests/tests/tls-cert-manager/06-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/06-assert.yaml @@ -67,7 +67,7 @@ kind: PerconaServerMySQL metadata: name: tls-cert-manager finalizers: - - delete-mysql-pods-in-order + - percona.com/delete-mysql-pods-in-order generation: 2 spec: mysql: diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 519d070e5..893af454c 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -50,6 +50,7 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" "github.com/percona/percona-server-mysql-operator/pkg/mysqlsh" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/router" @@ -134,9 +135,9 @@ func (r *PerconaServerMySQLReconciler) applyFinalizers(ctx context.Context, cr * finalizers := []string{} for _, f := range cr.GetFinalizers() { switch f { - case "delete-mysql-pods-in-order": + case naming.FinalizerDeletePodsInOrder: err = r.deleteMySQLPods(ctx, cr) - case "delete-ssl": + case naming.FinalizerDeleteSSL: err = r.deleteCerts(ctx, cr) } @@ -867,7 +868,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Conte } svcLabels := exposer.Labels() - svcLabels[apiv1alpha1.ExposedLabel] = "true" + svcLabels[naming.LabelExposed] = "true" services, err := k8s.ServicesByLabels(ctx, r.Client, svcLabels) if err != nil { return errors.Wrap(err, "get exposed services") @@ -898,7 +899,6 @@ func (r *PerconaServerMySQLReconciler) cleanupMysql(ctx context.Context, cr *api } func (r *PerconaServerMySQLReconciler) cleanupOrchestrator(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { - if !cr.OrchestratorEnabled() { if err := r.Delete(ctx, orchestrator.StatefulSet(cr, "", "")); err != nil && !k8serrors.IsNotFound(err) { return errors.Wrap(err, "failed to delete orchestrator statefulset") @@ -992,7 +992,6 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, } func (r *PerconaServerMySQLReconciler) cleanupOutdated(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { - if err := r.cleanupMysql(ctx, cr); err != nil { return errors.Wrap(err, "cleanup mysql") } diff --git a/pkg/controller/ps/tls_test.go b/pkg/controller/ps/tls_test.go index feb10a416..1c930b76a 100644 --- a/pkg/controller/ps/tls_test.go +++ b/pkg/controller/ps/tls_test.go @@ -20,6 +20,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/naming" ) var _ = Describe("TLS secrets without cert-manager", Ordered, func() { @@ -55,7 +56,8 @@ var _ = Describe("TLS secrets without cert-manager", Ordered, func() { NamespacedName: types.NamespacedName{ Namespace: cr.Namespace, Name: cr.Name, - }} + }, + } _, err := reconciler().Reconcile(ctx, req) Expect(err).Should(Succeed()) }) @@ -101,7 +103,8 @@ var _ = Describe("TLS secrets without cert-manager", Ordered, func() { NamespacedName: types.NamespacedName{ Namespace: cr.Namespace, Name: cr.Name, - }} + }, + } _, err := reconciler().Reconcile(ctx, req) Expect(err).Should(Succeed()) }) @@ -186,7 +189,7 @@ var _ = Describe("Finalizer delete-ssl", Ordered, func() { Context("delete-ssl finalizer specified", Ordered, func() { cr, err := readDefaultCR(crName, ns) - cr.Finalizers = append(cr.Finalizers, "delete-ssl") + cr.Finalizers = append(cr.Finalizers, naming.FinalizerDeleteSSL) It("should read and create defautl cr.yaml", func() { Expect(err).NotTo(HaveOccurred()) Expect(k8sClient.Create(ctx, cr)).Should(Succeed()) @@ -225,7 +228,6 @@ var _ = Describe("Finalizer delete-ssl", Ordered, func() { It("controller should delete issuers and certificates", func() { issuers := &cm.IssuerList{} Eventually(func() bool { - opts := &client.ListOptions{Namespace: cr.Namespace} err := k8sClient.List(ctx, issuers, opts) @@ -236,7 +238,6 @@ var _ = Describe("Finalizer delete-ssl", Ordered, func() { certs := &cm.CertificateList{} Eventually(func() bool { - opts := &client.ListOptions{Namespace: cr.Namespace} err := k8sClient.List(ctx, certs, opts) diff --git a/pkg/controller/ps/user.go b/pkg/controller/ps/user.go index ab25349d7..5b2339ac5 100644 --- a/pkg/controller/ps/user.go +++ b/pkg/controller/ps/user.go @@ -21,15 +21,12 @@ import ( "github.com/percona/percona-server-mysql-operator/pkg/haproxy" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/orchestrator" "github.com/percona/percona-server-mysql-operator/pkg/router" "github.com/percona/percona-server-mysql-operator/pkg/secret" ) -const ( - annotationPasswordsUpdated string = "percona.com/passwords-updated" -) - var ErrPassNotPropagated = errors.New("password not yet propagated") func allSystemUsers() map[apiv1alpha1.SystemUser]mysql.User { @@ -137,7 +134,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a } if hash == internalHash { - if v, ok := internalSecret.Annotations[annotationPasswordsUpdated]; ok && v == "false" { + if v, ok := internalSecret.Annotations[naming.AnnotationPasswordsUpdated.String()]; ok && v == "false" { operatorPass, err := k8s.UserPassword(ctx, r.Client, cr, apiv1alpha1.UserOperator) if err != nil { return errors.Wrap(err, "get operator password") @@ -259,7 +256,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a if err := r.Client.Get(ctx, orchestrator.NamespacedName(cr), sts); err != nil { return errors.Wrap(err, "get Orchestrator statefulset") } - if err := k8s.RolloutRestart(ctx, r.Client, sts, apiv1alpha1.AnnotationSecretHash, hash); err != nil { + if err := k8s.RolloutRestart(ctx, r.Client, sts, naming.AnnotationSecretHash, hash); err != nil { return errors.Wrap(err, "restart orchestrator") } } @@ -271,7 +268,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a if err := r.Client.Get(ctx, mysql.NamespacedName(cr), sts); err != nil { return errors.Wrap(err, "get MySQL statefulset") } - if err := k8s.RolloutRestart(ctx, r.Client, sts, apiv1alpha1.AnnotationSecretHash, hash); err != nil { + if err := k8s.RolloutRestart(ctx, r.Client, sts, naming.AnnotationSecretHash, hash); err != nil { return errors.Wrap(err, "restart MySQL") } } @@ -283,7 +280,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a if err := r.Get(ctx, haproxy.NamespacedName(cr), sts); err != nil { return errors.Wrap(err, "get HAProxy statefulset") } - if err := k8s.RolloutRestart(ctx, r.Client, sts, apiv1alpha1.AnnotationSecretHash, hash); err != nil { + if err := k8s.RolloutRestart(ctx, r.Client, sts, naming.AnnotationSecretHash, hash); err != nil { return errors.Wrap(err, "restart MySQL") } } @@ -300,7 +297,7 @@ func (r *PerconaServerMySQLReconciler) reconcileUsers(ctx context.Context, cr *a log.Info("Updated internal secret", "secretName", cr.InternalSecretName()) - k8s.AddAnnotation(internalSecret, string(annotationPasswordsUpdated), "false") + k8s.AddAnnotation(internalSecret, naming.AnnotationPasswordsUpdated.String(), "false") err = r.Client.Update(ctx, internalSecret) if err != nil { return errors.Wrap(err, "update internal sys users secret annotation") @@ -314,8 +311,8 @@ func (r *PerconaServerMySQLReconciler) discardOldPasswordsAfterNewPropagated( cr *apiv1alpha1.PerconaServerMySQL, secrets *corev1.Secret, updatedUsers []mysql.User, - operatorPass string) error { - + operatorPass string, +) error { log := logf.FromContext(ctx) err := r.passwordsPropagated(ctx, cr, secrets) @@ -350,7 +347,7 @@ func (r *PerconaServerMySQLReconciler) discardOldPasswordsAfterNewPropagated( log.Info("Discarded old user passwords") - k8s.AddAnnotation(secrets, annotationPasswordsUpdated, "true") + k8s.AddAnnotation(secrets, naming.AnnotationPasswordsUpdated.String(), "true") err = r.Client.Update(ctx, secrets) if err != nil { return errors.Wrap(err, "update internal sys users secret annotation") diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index febf74957..1019316ef 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -38,6 +38,7 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/clientcmd" "github.com/percona/percona-server-mysql-operator/pkg/k8s" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/secret" "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" @@ -386,8 +387,6 @@ func (r *PerconaServerMySQLBackupReconciler) getBackupSource(ctx context.Context return source, nil } -const finalizerDeleteBackup = "delete-backup" - func (r *PerconaServerMySQLBackupReconciler) checkFinalizers(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQLBackup) { if cr.DeletionTimestamp == nil || cr.Status.State == apiv1alpha1.BackupStarting || cr.Status.State == apiv1alpha1.BackupRunning { return @@ -410,7 +409,7 @@ func (r *PerconaServerMySQLBackupReconciler) checkFinalizers(ctx context.Context for _, finalizer := range cr.GetFinalizers() { var err error switch finalizer { - case finalizerDeleteBackup: + case naming.FinalizerDeleteBackup: var ok bool ok, err = r.deleteBackup(ctx, cr) if !ok { diff --git a/pkg/controller/psbackup/controller_test.go b/pkg/controller/psbackup/controller_test.go index 63eb29093..19421b837 100644 --- a/pkg/controller/psbackup/controller_test.go +++ b/pkg/controller/psbackup/controller_test.go @@ -20,6 +20,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/secret" "github.com/percona/percona-server-mysql-operator/pkg/xtrabackup" @@ -164,23 +165,23 @@ func TestCheckFinalizers(t *testing.T) { { name: "with finalizer and starting state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupStarting }), - expectedFinalizers: []string{finalizerDeleteBackup}, + expectedFinalizers: []string{naming.FinalizerDeleteBackup}, }, { name: "with finalizer and running state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupRunning }), - expectedFinalizers: []string{finalizerDeleteBackup}, + expectedFinalizers: []string{naming.FinalizerDeleteBackup}, }, { name: "with finalizer and error state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupError }), expectedFinalizers: nil, @@ -188,7 +189,7 @@ func TestCheckFinalizers(t *testing.T) { { name: "with finalizer and new state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupNew }), expectedFinalizers: nil, @@ -196,16 +197,16 @@ func TestCheckFinalizers(t *testing.T) { { name: "with failing finalizer and succeeded state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupSucceeded }), finalizerJobFail: true, - expectedFinalizers: []string{finalizerDeleteBackup}, + expectedFinalizers: []string{naming.FinalizerDeleteBackup}, }, { name: "with successful finalizer and succeeded state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupSucceeded }), expectedFinalizers: []string{}, @@ -213,7 +214,7 @@ func TestCheckFinalizers(t *testing.T) { { name: "with successful finalizer, unknown finalizer and succeeded state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup, "unknown-finalizer"} + cr.Finalizers = []string{naming.FinalizerDeleteBackup, "unknown-finalizer"} cr.Status.State = apiv1alpha1.BackupSucceeded }), expectedFinalizers: []string{"unknown-finalizer"}, @@ -221,16 +222,16 @@ func TestCheckFinalizers(t *testing.T) { { name: "with failing finalizer and failed state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupFailed }), finalizerJobFail: true, - expectedFinalizers: []string{finalizerDeleteBackup}, + expectedFinalizers: []string{naming.FinalizerDeleteBackup}, }, { name: "with successful finalizer and failed state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup} + cr.Finalizers = []string{naming.FinalizerDeleteBackup} cr.Status.State = apiv1alpha1.BackupFailed }), expectedFinalizers: []string{}, @@ -238,7 +239,7 @@ func TestCheckFinalizers(t *testing.T) { { name: "with successful finalizer, unknown finalizer and failed state", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQLBackup) { - cr.Finalizers = []string{finalizerDeleteBackup, "unknown-finalizer"} + cr.Finalizers = []string{naming.FinalizerDeleteBackup, "unknown-finalizer"} cr.Status.State = apiv1alpha1.BackupFailed }), expectedFinalizers: []string{"unknown-finalizer"}, diff --git a/pkg/haproxy/haproxy.go b/pkg/haproxy/haproxy.go index bb178efa5..9a52527d6 100644 --- a/pkg/haproxy/haproxy.go +++ b/pkg/haproxy/haproxy.go @@ -12,6 +12,7 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/pmm" "github.com/percona/percona-server-mysql-operator/pkg/util" ) @@ -47,7 +48,7 @@ func ServiceName(cr *apiv1alpha1.PerconaServerMySQL) string { func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { return util.SSMapMerge(cr.MySQLSpec().Labels, - map[string]string{apiv1alpha1.ComponentLabel: ComponentName}, + map[string]string{naming.LabelComponent: ComponentName}, cr.Labels()) } @@ -133,10 +134,10 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsH annotations := make(map[string]string) if configHash != "" { - annotations[string(apiv1alpha1.AnnotationConfigHash)] = configHash + annotations[string(naming.AnnotationConfigHash)] = configHash } if tlsHash != "" { - annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash + annotations[string(naming.AnnotationTLSHash)] = tlsHash } t := true diff --git a/pkg/k8s/utils.go b/pkg/k8s/utils.go index 45f8fc5cb..beab57bee 100644 --- a/pkg/k8s/utils.go +++ b/pkg/k8s/utils.go @@ -23,6 +23,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/platform" "github.com/percona/percona-server-mysql-operator/pkg/util" ) @@ -173,7 +174,7 @@ func EnsureObjectWithHash( } objAnnotations := obj.GetAnnotations() - delete(objAnnotations, "percona.com/last-config-hash") + delete(objAnnotations, naming.AnnotationLastConfigHash.String()) obj.SetAnnotations(objAnnotations) hash, err := ObjectHash(obj) @@ -182,7 +183,7 @@ func EnsureObjectWithHash( } objAnnotations = obj.GetAnnotations() - objAnnotations["percona.com/last-config-hash"] = hash + objAnnotations[naming.AnnotationLastConfigHash.String()] = hash obj.SetAnnotations(objAnnotations) val := reflect.ValueOf(obj) @@ -220,7 +221,7 @@ func EnsureObjectWithHash( obj.SetAnnotations(annotations) } - if oldObject.GetAnnotations()["percona.com/last-config-hash"] != hash || + if oldObject.GetAnnotations()[naming.AnnotationLastConfigHash.String()] != hash || !objectMetaEqual(obj, oldObject) { obj.SetResourceVersion(oldObject.GetResourceVersion()) @@ -379,7 +380,7 @@ func DefaultAPINamespace() (string, error) { } // RolloutRestart restarts pods owned by object by updating the pod template with passed annotation key-value. -func RolloutRestart(ctx context.Context, cl client.Client, obj runtime.Object, key apiv1alpha1.AnnotationKey, value string) error { +func RolloutRestart(ctx context.Context, cl client.Client, obj runtime.Object, key naming.AnnotationKey, value string) error { switch obj := obj.(type) { case *appsv1.StatefulSet: orig := obj.DeepCopy() diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index 76bd34d54..d9050bafd 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -10,6 +10,7 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/pmm" "github.com/percona/percona-server-mysql-operator/pkg/util" ) @@ -110,7 +111,7 @@ func FQDN(cr *apiv1alpha1.PerconaServerMySQL, idx int) string { func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { return util.SSMapMerge(cr.MySQLSpec().Labels, - map[string]string{apiv1alpha1.ComponentLabel: ComponentName}, + map[string]string{naming.LabelComponent: ComponentName}, cr.Labels()) } @@ -122,10 +123,10 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsH annotations := make(map[string]string) if configHash != "" { - annotations[string(apiv1alpha1.AnnotationConfigHash)] = configHash + annotations[string(naming.AnnotationConfigHash)] = configHash } if tlsHash != "" { - annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash + annotations[string(naming.AnnotationTLSHash)] = tlsHash } return &appsv1.StatefulSet{ @@ -415,7 +416,7 @@ func PodService(cr *apiv1alpha1.PerconaServerMySQL, t corev1.ServiceType, podNam expose := cr.Spec.MySQL.Expose labels := MatchLabels(cr) - labels[apiv1alpha1.ExposedLabel] = "true" + labels[naming.LabelExposed] = "true" labels = util.SSMapMerge(expose.Labels, labels) selector := MatchLabels(cr) diff --git a/pkg/naming/naming.go b/pkg/naming/naming.go new file mode 100644 index 000000000..0be103285 --- /dev/null +++ b/pkg/naming/naming.go @@ -0,0 +1,40 @@ +package naming + +const ( + annotationPrefix = "percona.com/" + annotationPrefixMysql = "mysql.percona.com/" +) + +const ( + LabelName = "app.kubernetes.io/name" + LabelInstance = "app.kubernetes.io/instance" + LabelManagedBy = "app.kubernetes.io/managed-by" + LabelPartOf = "app.kubernetes.io/part-of" + LabelComponent = "app.kubernetes.io/component" +) + +const ( + LabelMySQLPrimary = annotationPrefixMysql + "primary" + LabelExposed = annotationPrefix + "exposed" +) + +const ( + FinalizerDeleteSSL = annotationPrefix + "delete-ssl" + FinalizerDeletePodsInOrder = annotationPrefix + "delete-mysql-pods-in-order" + + FinalizerDeleteBackup = annotationPrefix + "delete-backup" +) + +type AnnotationKey string + +func (s AnnotationKey) String() string { + return string(s) +} + +const ( + AnnotationSecretHash AnnotationKey = annotationPrefix + "last-applied-secret" + AnnotationConfigHash AnnotationKey = annotationPrefix + "configuration-hash" + AnnotationTLSHash AnnotationKey = annotationPrefix + "last-applied-tls" + AnnotationPasswordsUpdated AnnotationKey = annotationPrefix + "passwords-updated" + AnnotationLastConfigHash AnnotationKey = annotationPrefix + "last-config-hash" +) diff --git a/pkg/orchestrator/orchestrator.go b/pkg/orchestrator/orchestrator.go index 67e9b0e4c..e1bfea8b8 100644 --- a/pkg/orchestrator/orchestrator.go +++ b/pkg/orchestrator/orchestrator.go @@ -5,6 +5,7 @@ import ( "fmt" "path/filepath" + "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -14,8 +15,8 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/util" - "github.com/pkg/errors" ) const ( @@ -100,7 +101,7 @@ func Labels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { return util.SSMapMerge(Labels(cr), - map[string]string{apiv1alpha1.ComponentLabel: ComponentName}, + map[string]string{naming.LabelComponent: ComponentName}, cr.Labels()) } @@ -111,7 +112,7 @@ func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, tlsHash string) annotations := make(map[string]string, 0) if tlsHash != "" { - annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash + annotations[string(naming.AnnotationTLSHash)] = tlsHash } return &appsv1.StatefulSet{ @@ -382,7 +383,7 @@ func PodService(cr *apiv1alpha1.PerconaServerMySQL, t corev1.ServiceType, podNam expose := cr.Spec.Orchestrator.Expose labels := MatchLabels(cr) - labels[apiv1alpha1.ExposedLabel] = "true" + labels[naming.LabelExposed] = "true" labels = util.SSMapMerge(expose.Labels, labels) selector := MatchLabels(cr) diff --git a/pkg/router/router.go b/pkg/router/router.go index a8c331af5..b87d90b33 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -11,6 +11,7 @@ import ( apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" "github.com/percona/percona-server-mysql-operator/pkg/mysql" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/util" ) @@ -50,7 +51,7 @@ func ServiceName(cr *apiv1alpha1.PerconaServerMySQL) string { func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { return util.SSMapMerge(cr.MySQLSpec().Labels, - map[string]string{apiv1alpha1.ComponentLabel: ComponentName}, + map[string]string{naming.LabelComponent: ComponentName}, cr.Labels()) } @@ -140,10 +141,10 @@ func Deployment(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsHa annotations := make(map[string]string) if configHash != "" { - annotations[string(apiv1alpha1.AnnotationConfigHash)] = configHash + annotations[string(naming.AnnotationConfigHash)] = configHash } if tlsHash != "" { - annotations[string(apiv1alpha1.AnnotationTLSHash)] = tlsHash + annotations[string(naming.AnnotationTLSHash)] = tlsHash } zero := intstr.FromInt(0) diff --git a/pkg/xtrabackup/xtrabackup.go b/pkg/xtrabackup/xtrabackup.go index 5a2ed4434..2bc7475f5 100644 --- a/pkg/xtrabackup/xtrabackup.go +++ b/pkg/xtrabackup/xtrabackup.go @@ -4,15 +4,15 @@ import ( "fmt" "strconv" + "github.com/pkg/errors" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/pkg/errors" - apiv1alpha1 "github.com/percona/percona-server-mysql-operator/api/v1alpha1" "github.com/percona/percona-server-mysql-operator/pkg/k8s" + "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/secret" "github.com/percona/percona-server-mysql-operator/pkg/util" ) @@ -59,7 +59,7 @@ func DeleteJobName(cr *apiv1alpha1.PerconaServerMySQLBackup) string { } func MatchLabels(cluster *apiv1alpha1.PerconaServerMySQL) map[string]string { - return util.SSMapMerge(map[string]string{apiv1alpha1.ComponentLabel: componentName}, cluster.Labels()) + return util.SSMapMerge(map[string]string{naming.LabelComponent: componentName}, cluster.Labels()) } func Job( @@ -402,7 +402,7 @@ func GetDeleteJob(cr *apiv1alpha1.PerconaServerMySQLBackup, conf *BackupConfig) t := true storage := cr.Status.Storage - labels := util.SSMapMerge(storage.Labels, cr.Labels, map[string]string{apiv1alpha1.ComponentLabel: componentName}) + labels := util.SSMapMerge(storage.Labels, cr.Labels, map[string]string{naming.LabelComponent: componentName}) return &batchv1.Job{ TypeMeta: metav1.TypeMeta{ From 613cb7dfbc9adda55b6367c671bca138d1f35424 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Thu, 13 Jun 2024 11:49:31 +0200 Subject: [PATCH 153/192] K8SPS-154 - Add gr-finalizer test (#589) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * K8SPS-154 - Add gr-finalizer test * ensure pod-0 is primary before deletion * fix finalizer prefixes * fix gr-finalizer test --------- Co-authored-by: Ege Güneş Co-authored-by: Viacheslav Sarzhan --- .github/linters/go.mod | 2 +- e2e-tests/run-distro.csv | 1 + e2e-tests/run-pr.csv | 1 + e2e-tests/run-release.csv | 1 + e2e-tests/tests/gr-finalizer/00-assert.yaml | 16 +++ .../gr-finalizer/00-deploy-cert-manager.yaml | 11 ++ e2e-tests/tests/gr-finalizer/01-assert.yaml | 34 +++++ .../gr-finalizer/01-deploy-operator.yaml | 13 ++ e2e-tests/tests/gr-finalizer/02-assert.yaml | 126 ++++++++++++++++++ .../tests/gr-finalizer/02-create-cluster.yaml | 16 +++ e2e-tests/tests/gr-finalizer/03-assert.yaml | 10 ++ .../tests/gr-finalizer/03-switch-primary.yaml | 17 +++ .../tests/gr-finalizer/04-delete-cluster.yaml | 11 ++ e2e-tests/tests/gr-finalizer/05-assert.yaml | 17 +++ e2e-tests/tests/gr-finalizer/05-errors.yaml | 6 + e2e-tests/tests/gr-finalizer/06-assert.yaml | 10 ++ e2e-tests/tests/gr-finalizer/06-errors.yaml | 13 ++ e2e-tests/tests/gr-finalizer/07-errors.yaml | 59 ++++++++ pkg/controller/ps/controller.go | 24 +++- pkg/mysqlsh/mysqlshexec.go | 10 ++ 20 files changed, 394 insertions(+), 4 deletions(-) create mode 100644 e2e-tests/tests/gr-finalizer/00-assert.yaml create mode 100644 e2e-tests/tests/gr-finalizer/00-deploy-cert-manager.yaml create mode 100644 e2e-tests/tests/gr-finalizer/01-assert.yaml create mode 100644 e2e-tests/tests/gr-finalizer/01-deploy-operator.yaml create mode 100644 e2e-tests/tests/gr-finalizer/02-assert.yaml create mode 100644 e2e-tests/tests/gr-finalizer/02-create-cluster.yaml create mode 100644 e2e-tests/tests/gr-finalizer/03-assert.yaml create mode 100644 e2e-tests/tests/gr-finalizer/03-switch-primary.yaml create mode 100644 e2e-tests/tests/gr-finalizer/04-delete-cluster.yaml create mode 100644 e2e-tests/tests/gr-finalizer/05-assert.yaml create mode 100644 e2e-tests/tests/gr-finalizer/05-errors.yaml create mode 100644 e2e-tests/tests/gr-finalizer/06-assert.yaml create mode 100644 e2e-tests/tests/gr-finalizer/06-errors.yaml create mode 100644 e2e-tests/tests/gr-finalizer/07-errors.yaml diff --git a/.github/linters/go.mod b/.github/linters/go.mod index 570f83f2c..16a4ed7c9 100644 --- a/.github/linters/go.mod +++ b/.github/linters/go.mod @@ -1,3 +1,3 @@ module linters -go 1.22 +go 1.22.0 diff --git a/e2e-tests/run-distro.csv b/e2e-tests/run-distro.csv index 06142e3bb..11f0d1ecb 100644 --- a/e2e-tests/run-distro.csv +++ b/e2e-tests/run-distro.csv @@ -4,6 +4,7 @@ config-router demand-backup gr-demand-backup gr-demand-backup-haproxy +gr-finalizer gr-haproxy gr-init-deploy gr-one-pod diff --git a/e2e-tests/run-pr.csv b/e2e-tests/run-pr.csv index cdd85364c..d2732ad00 100644 --- a/e2e-tests/run-pr.csv +++ b/e2e-tests/run-pr.csv @@ -5,6 +5,7 @@ config-router demand-backup gr-demand-backup gr-demand-backup-haproxy +gr-finalizer gr-haproxy gr-ignore-annotations gr-init-deploy diff --git a/e2e-tests/run-release.csv b/e2e-tests/run-release.csv index cdd85364c..d2732ad00 100644 --- a/e2e-tests/run-release.csv +++ b/e2e-tests/run-release.csv @@ -5,6 +5,7 @@ config-router demand-backup gr-demand-backup gr-demand-backup-haproxy +gr-finalizer gr-haproxy gr-ignore-annotations gr-init-deploy diff --git a/e2e-tests/tests/gr-finalizer/00-assert.yaml b/e2e-tests/tests/gr-finalizer/00-assert.yaml new file mode 100644 index 000000000..e039585af --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/00-assert.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cert-manager + namespace: cert-manager +status: + availableReplicas: 1 + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updatedReplicas: 1 + diff --git a/e2e-tests/tests/gr-finalizer/00-deploy-cert-manager.yaml b/e2e-tests/tests/gr-finalizer/00-deploy-cert-manager.yaml new file mode 100644 index 000000000..52d9748a6 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/00-deploy-cert-manager.yaml @@ -0,0 +1,11 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 120 +commands: + - script: |- + set -o xtrace + + source ../../functions + init_temp_dir # do this only in the first TestStep + + deploy_cert_manager diff --git a/e2e-tests/tests/gr-finalizer/01-assert.yaml b/e2e-tests/tests/gr-finalizer/01-assert.yaml new file mode 100644 index 000000000..b30c7d718 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/01-assert.yaml @@ -0,0 +1,34 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 120 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +status: + availableReplicas: 1 + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updatedReplicas: 1 +--- +apiVersion: v1 +kind: Pod +metadata: + name: mysql-client diff --git a/e2e-tests/tests/gr-finalizer/01-deploy-operator.yaml b/e2e-tests/tests/gr-finalizer/01-deploy-operator.yaml new file mode 100644 index 000000000..95773f69d --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/01-deploy-operator.yaml @@ -0,0 +1,13 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 120 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + deploy_operator + deploy_non_tls_cluster_secrets + deploy_client diff --git a/e2e-tests/tests/gr-finalizer/02-assert.yaml b/e2e-tests/tests/gr-finalizer/02-assert.yaml new file mode 100644 index 000000000..f2738a992 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/02-assert.yaml @@ -0,0 +1,126 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 420 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + generation: 1 + name: gr-finalizer-ca-cert +spec: + commonName: gr-finalizer-ca + duration: 8760h0m0s + isCA: true + issuerRef: + kind: Issuer + name: gr-finalizer-pso-ca-issuer + renewBefore: 730h0m0s + secretName: gr-finalizer-ca-cert +status: + conditions: + - message: Certificate is up to date and has not expired + observedGeneration: 1 + reason: Ready + status: 'True' + type: Ready + revision: 1 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + generation: 1 + name: gr-finalizer-ssl +spec: + issuerRef: + kind: Issuer + name: gr-finalizer-pso-issuer + secretName: test-ssl +status: + conditions: + - message: Certificate is up to date and has not expired + observedGeneration: 1 + reason: Ready + status: 'True' + type: Ready + revision: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + generation: 1 + name: gr-finalizer-mysql +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-finalizer-haproxy +status: + observedGeneration: 1 + replicas: 3 + readyReplicas: 3 + updatedReplicas: 3 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + finalizers: + - percona.com/delete-mysql-pods-in-order + - percona.com/delete-ssl + generation: 1 + name: gr-finalizer +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + state: ready +--- +apiVersion: v1 +kind: Secret +metadata: + annotations: + cert-manager.io/certificate-name: gr-finalizer-ca-cert + cert-manager.io/common-name: gr-finalizer-ca + cert-manager.io/issuer-kind: Issuer + cert-manager.io/issuer-name: gr-finalizer-pso-ca-issuer + labels: + controller.cert-manager.io/fao: "true" + name: gr-finalizer-ca-cert +type: kubernetes.io/tls +--- +apiVersion: v1 +kind: Secret +metadata: + annotations: + cert-manager.io/certificate-name: gr-finalizer-ssl + cert-manager.io/issuer-kind: Issuer + cert-manager.io/issuer-name: gr-finalizer-pso-issuer + labels: + controller.cert-manager.io/fao: "true" + name: test-ssl +type: kubernetes.io/tls +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + generation: 1 + name: gr-finalizer-pso-ca-issuer +spec: + selfSigned: {} +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + generation: 1 + name: gr-finalizer-pso-issuer +spec: + ca: + secretName: gr-finalizer-ca-cert diff --git a/e2e-tests/tests/gr-finalizer/02-create-cluster.yaml b/e2e-tests/tests/gr-finalizer/02-create-cluster.yaml new file mode 100644 index 000000000..c56b6c797 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/02-create-cluster.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + get_cr \ + | yq eval '.spec.mysql.clusterType="group-replication"' - \ + | yq eval '.spec.proxy.router.enabled=false' - \ + | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval '.metadata.finalizers |= ["percona.com/delete-mysql-pods-in-order", "percona.com/delete-ssl"]' - \ + | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-finalizer/03-assert.yaml b/e2e-tests/tests/gr-finalizer/03-assert.yaml new file mode 100644 index 000000000..06546c7dc --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/03-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 03-switch-primary +data: + data: "gr-finalizer-mysql-0\tONLINE\tSECONDARY\ngr-finalizer-mysql-1\tONLINE\tPRIMARY\ngr-finalizer-mysql-2\tONLINE\tSECONDARY" diff --git a/e2e-tests/tests/gr-finalizer/03-switch-primary.yaml b/e2e-tests/tests/gr-finalizer/03-switch-primary.yaml new file mode 100644 index 000000000..b42e2004c --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/03-switch-primary.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + host=$(get_mysql_headless_fqdn $(get_cluster_name) 1) + uuid=$(run_mysql "SELECT @@server_uuid" "-h ${host} -uroot -proot_password") + + run_mysql "SELECT group_replication_set_as_primary('"${uuid}"')" "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password" + + data=$(run_mysql "SELECT LEFT(member_host,20), member_state, member_role FROM performance_schema.replication_group_members order by member_host" "-h $(get_haproxy_svc $(get_cluster_name)) -uroot -proot_password") + kubectl create configmap -n "${NAMESPACE}" 03-switch-primary --from-literal=data="${data}" diff --git a/e2e-tests/tests/gr-finalizer/04-delete-cluster.yaml b/e2e-tests/tests/gr-finalizer/04-delete-cluster.yaml new file mode 100644 index 000000000..1acee6c23 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/04-delete-cluster.yaml @@ -0,0 +1,11 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 10 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + kubectl delete --namespace "${NAMESPACE}" ps gr-finalizer --force --grace-period=0 --wait=false diff --git a/e2e-tests/tests/gr-finalizer/05-assert.yaml b/e2e-tests/tests/gr-finalizer/05-assert.yaml new file mode 100644 index 000000000..825ead7bd --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/05-assert.yaml @@ -0,0 +1,17 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-0 +status: + phase: Running +--- +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-1 +status: + phase: Running diff --git a/e2e-tests/tests/gr-finalizer/05-errors.yaml b/e2e-tests/tests/gr-finalizer/05-errors.yaml new file mode 100644 index 000000000..1418dc629 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/05-errors.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-2 +status: + phase: Running diff --git a/e2e-tests/tests/gr-finalizer/06-assert.yaml b/e2e-tests/tests/gr-finalizer/06-assert.yaml new file mode 100644 index 000000000..a61ad8b56 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/06-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 5 +--- +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-0 +status: + phase: Running diff --git a/e2e-tests/tests/gr-finalizer/06-errors.yaml b/e2e-tests/tests/gr-finalizer/06-errors.yaml new file mode 100644 index 000000000..dc0ba41c9 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/06-errors.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-1 +status: + phase: Running +--- +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-2 +status: + phase: Running diff --git a/e2e-tests/tests/gr-finalizer/07-errors.yaml b/e2e-tests/tests/gr-finalizer/07-errors.yaml new file mode 100644 index 000000000..3b62349f0 --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/07-errors.yaml @@ -0,0 +1,59 @@ +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-0 +--- +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-1 +--- +apiVersion: v1 +kind: Pod +metadata: + name: gr-finalizer-mysql-2 +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: gr-finalizer-ca-cert +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: gr-finalizer-ssl +--- +apiVersion: v1 +kind: Secret +metadata: + name: gr-finalizer-ca-cert +--- +apiVersion: v1 +kind: Secret +metadata: + name: test-ssl +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: gr-finalizer-pso-ca-issuer +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: gr-finalizer-pso-issuer +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: gr-finalizer-mysql +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: gr-finalizer-haproxy +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-finalizer diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 893af454c..26821372d 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -164,7 +164,7 @@ func (r *PerconaServerMySQLReconciler) applyFinalizers(ctx context.Context, cr * } func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { - log := logf.FromContext(ctx) + log := logf.FromContext(ctx).WithName("deleteMySQLPods") pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) if err != nil { @@ -214,6 +214,25 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * return err } + clusterStatus, err := mysh.ClusterStatusWithExec(ctx, cr.InnoDBClusterName()) + if err != nil { + return errors.Wrap(err, "get cluster status") + } + + log.Info("Got primary", "primary", clusterStatus.DefaultReplicaSet.Primary) + + if !strings.HasPrefix(clusterStatus.DefaultReplicaSet.Primary, firstPodFQDN) { + log.Info("Primary is not pod-0", "primary", clusterStatus.DefaultReplicaSet.Primary) + + log.Info("Ensuring pod-0 is the primary") + err := mysh.SetPrimaryInstanceWithExec(ctx, cr.InnoDBClusterName(), firstPodFQDN) + if err != nil { + return errors.Wrap(err, "set primary instance") + } + + return psrestore.ErrWaitingTermination + } + log.Info("Removing instances from GR") for _, pod := range pods { if pod.Name == firstPod.Name { @@ -247,7 +266,6 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * if err := r.Client.Get(ctx, mysql.NamespacedName(cr), sts); err != nil { return errors.Wrap(err, "get MySQL statefulset") } - log.V(1).Info("Got statefulset", "sts", sts, "spec", sts.Spec) if sts.Spec.Replicas == nil || *sts.Spec.Replicas != 1 { dscaleTo := int32(1) @@ -256,7 +274,7 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * if err != nil { return errors.Wrap(err, "downscale StatefulSet") } - log.Info("sts replicaset downscaled", "sts", sts) + log.Info("Statefulset downscaled", "sts", sts) } return psrestore.ErrWaitingTermination diff --git a/pkg/mysqlsh/mysqlshexec.go b/pkg/mysqlsh/mysqlshexec.go index ded36a07c..18a0cb193 100644 --- a/pkg/mysqlsh/mysqlshexec.go +++ b/pkg/mysqlsh/mysqlshexec.go @@ -92,3 +92,13 @@ func (m *mysqlshExec) RebootClusterFromCompleteOutageWithExec(ctx context.Contex return nil } + +func (m *mysqlshExec) SetPrimaryInstanceWithExec(ctx context.Context, clusterName, instance string) error { + cmd := fmt.Sprintf("dba.getCluster('%s').setPrimaryInstance('%s')", clusterName, instance) + + if err := m.runWithExec(ctx, cmd); err != nil { + return errors.Wrap(err, "set primary instance") + } + + return nil +} From f236e4934fcd49ec68c506fa51cb873eafac8d97 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Mon, 17 Jun 2024 11:33:18 +0300 Subject: [PATCH 154/192] K8SPS-340: add securityContext to `xtrabackup` container (#656) * K8SPS-340: add securityContext to `xtrabackup` container https://perconadev.atlassian.net/browse/K8SPS-340 * update `cr.yaml` --------- Co-authored-by: Viacheslav Sarzhan --- deploy/cr.yaml | 2 ++ e2e-tests/tests/gr-security-context/02-assert.yaml | 2 ++ e2e-tests/tests/gr-security-context/02-create-cluster.yaml | 1 + pkg/mysql/mysql.go | 1 + 4 files changed, 6 insertions(+) diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 86fe2c8ea..ab6a51f6a 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -372,6 +372,8 @@ spec: # backoffLimit: 6 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.8.0 +# containerSecurityContext: +# privileged: true storages: s3-us-west: type: s3 diff --git a/e2e-tests/tests/gr-security-context/02-assert.yaml b/e2e-tests/tests/gr-security-context/02-assert.yaml index 9d3cf097c..eaedbbdb3 100644 --- a/e2e-tests/tests/gr-security-context/02-assert.yaml +++ b/e2e-tests/tests/gr-security-context/02-assert.yaml @@ -20,6 +20,8 @@ spec: - command: - /opt/percona/sidecar name: xtrabackup + securityContext: + privileged: false initContainers: - command: - /opt/percona-server-mysql-operator/ps-init-entrypoint.sh diff --git a/e2e-tests/tests/gr-security-context/02-create-cluster.yaml b/e2e-tests/tests/gr-security-context/02-create-cluster.yaml index 0bb63cf11..426830b27 100644 --- a/e2e-tests/tests/gr-security-context/02-create-cluster.yaml +++ b/e2e-tests/tests/gr-security-context/02-create-cluster.yaml @@ -18,6 +18,7 @@ commands: | yq eval '.spec.backup.storages.minio.containerSecurityContext.privileged=true' - \ | yq eval '.spec.backup.storages.minio.podSecurityContext.fsGroup=1001' - \ | yq eval '.spec.backup.storages.minio.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ + | yq eval '.spec.backup.containerSecurityContext.privileged=false' - \ | yq eval '.spec.mysql.clusterType="group-replication"' - \ | yq eval '.spec.mysql.containerSecurityContext.privileged=true' - \ | yq eval '.spec.mysql.podSecurityContext.fsGroup=1001' - \ diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index d9050bafd..891e64df1 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -591,6 +591,7 @@ func backupContainer(cr *apiv1alpha1.PerconaServerMySQL) corev1.Container { Command: []string{"/opt/percona/sidecar"}, TerminationMessagePath: "/dev/termination-log", TerminationMessagePolicy: corev1.TerminationMessageReadFile, + SecurityContext: cr.Spec.Backup.ContainerSecurityContext, } } From 4fd644ff26792e13663140f898dd3359e89998f8 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Mon, 17 Jun 2024 16:18:31 +0300 Subject: [PATCH 155/192] K8SPS-301 improve multi arch builds (#666) * K8SPS-301 improve multi arch builds * Golang builds faster in native architecture. * Update e2e-tests/build Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- Jenkinsfile | 1 + build/Dockerfile | 16 ++++++++-------- e2e-tests/build | 24 ++++++++++++++---------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 35262d17a..2db21dd0d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -340,6 +340,7 @@ pipeline { docker login -u '${USER}' -p '${PASS}' export RELEASE=0 export IMAGE=\$DOCKER_TAG + docker buildx create --use ./e2e-tests/build docker logout " diff --git a/build/Dockerfile b/build/Dockerfile index c788e5558..f2798b1f7 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22 AS go_builder +FROM --platform=${BUILDPLATFORM} golang:1.22 AS go_builder WORKDIR /go/src/github.com/percona/percona-server-mysql-operator COPY go.mod go.sum ./ @@ -9,38 +9,38 @@ ARG BUILD_TIME ARG BUILD_TIME ARG GO_LDFLAGS ARG GOOS=linux -ARG GOARCH=amd64 +ARG TARGETARCH ARG CGO_ENABLED=0 COPY . . RUN mkdir -p build/_output/bin \ - && GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ + && GOOS=$GOOS GOARCH=$TARGETARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \ -o build/_output/bin/percona-server-mysql-operator \ cmd/manager/main.go \ && cp -r build/_output/bin/percona-server-mysql-operator /usr/local/bin/percona-server-mysql-operator -RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ +RUN GOOS=$GOOS GOARCH=$TARGETARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \ -o build/_output/bin/bootstrap \ ./cmd/bootstrap/ \ && cp -r build/_output/bin/bootstrap /usr/local/bin/bootstrap -RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ +RUN GOOS=$GOOS GOARCH=$TARGETARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \ -o build/_output/bin/healthcheck \ cmd/healthcheck/main.go \ && cp -r build/_output/bin/healthcheck /usr/local/bin/healthcheck -RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ +RUN GOOS=$GOOS GOARCH=$TARGETARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \ -o build/_output/bin/sidecar \ ./cmd/sidecar \ && cp -r build/_output/bin/sidecar /usr/local/bin/sidecar -RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ +RUN GOOS=$GOOS GOARCH=$TARGETARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \ -o build/_output/bin/peer-list \ cmd/peer-list/main.go \ && cp -r build/_output/bin/peer-list /usr/local/bin/peer-list -RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ +RUN GOOS=$GOOS GOARCH=$TARGETARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \ -o build/_output/bin/orc-handler \ cmd/orc-handler/main.go \ diff --git a/e2e-tests/build b/e2e-tests/build index 0251a7bf4..5b4ce48fb 100755 --- a/e2e-tests/build +++ b/e2e-tests/build @@ -13,12 +13,17 @@ GIT_COMMIT=$(git rev-parse HEAD) IMAGE=${IMAGE/#percona\//perconalab/} DOCKER_DEFAULT_PLATFORM=${DOCKER_DEFAULT_PLATFORM:-"linux/amd64"} -build_options='--squash' -if [[ ${DOCKER_SQUASH} == 0 ]]; then - build_options='' +if [[ ${DOCKER_SQUASH:-1} == 1 ]]; then + squash="--squash" fi if [[ ${DOCKER_NOCACHE:-0} == 1 ]]; then - build_options="$build_options --no-cache" + no_cache="--no-cache" +fi + +if [[ ${DOCKER_PUSH:-1} == 1 ]]; then + imgresult="--push=true" +else + imgresult="--load" fi build_operator() { @@ -29,26 +34,25 @@ build_operator() { export IMAGE export DOCKER_DEFAULT_PLATFORM export GO_LDFLAGS="-w -s -trimpath $GO_LDFLAGS" - pushd "${ROOT_REPO}" || exit - build_command='build' if echo "$DOCKER_DEFAULT_PLATFORM" | grep -q ','; then - build_command='buildx build' - build_options="$build_options --push=true" if [ "${DOCKER_PUSH:-1}" = 0 ]; then echo "'docker $build_command' doesn't support DOCKER_PUSH=0 option in case of multi-arch builds, please use DOCKER_PUSH=1" exit 1 fi fi - docker $build_command \ + pushd "${ROOT_REPO}" || exit + docker buildx build \ --platform $DOCKER_DEFAULT_PLATFORM \ --build-arg GIT_COMMIT=$GIT_COMMIT \ --build-arg GIT_BRANCH=$GIT_BRANCH \ --build-arg BUILD_TIME=$BUILD_TIME \ --build-arg GO_LDFLAGS="$GO_LDFLAGS" \ --progress plain \ - $build_options \ + $squash \ + $imgresult \ + $no_cache \ -t "${IMAGE}" -f build/Dockerfile . popd From 5a23bd3d5b6a6c3b12faed526164a94b3c855294 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Tue, 18 Jun 2024 12:09:19 +0200 Subject: [PATCH 156/192] K8SPS-345 add annotation to CR --- deploy/cr.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/cr.yaml b/deploy/cr.yaml index ab6a51f6a..05a6d4661 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -84,6 +84,7 @@ spec: # type: ClusterIP # annotations: # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp +# service.beta.kubernetes.io/aws-load-balancer-type: nlb # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: @@ -231,6 +232,7 @@ spec: # type: ClusterIP # annotations: # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp +# service.beta.kubernetes.io/aws-load-balancer-type: nlb # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: @@ -288,6 +290,7 @@ spec: # type: ClusterIP # annotations: # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp +# service.beta.kubernetes.io/aws-load-balancer-type: nlb # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: @@ -330,6 +333,7 @@ spec: # type: ClusterIP # annotations: # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp +# service.beta.kubernetes.io/aws-load-balancer-type: nlb # externalTrafficPolicy: Cluster # internalTrafficPolicy: Cluster # labels: From 8f27bd7dfdbc0171ad0ff9bb27fc7c2c32ab5771 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:31:41 +0300 Subject: [PATCH 157/192] CLOUD-727: Bump k8s.io/client-go from 0.30.1 to 0.30.2 (#671) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.30.1 to 0.30.2. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.30.1...v0.30.2) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 71c2cecf5..ac33f01cc 100644 --- a/go.mod +++ b/go.mod @@ -27,9 +27,9 @@ require ( golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 google.golang.org/grpc v1.64.0 - k8s.io/api v0.30.1 - k8s.io/apimachinery v0.30.1 - k8s.io/client-go v0.30.1 + k8s.io/api v0.30.2 + k8s.io/apimachinery v0.30.2 + k8s.io/client-go v0.30.2 k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 sigs.k8s.io/controller-runtime v0.18.4 ) diff --git a/go.sum b/go.sum index ad8a119f6..079449c94 100644 --- a/go.sum +++ b/go.sum @@ -373,14 +373,14 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= -k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= +k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= +k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= -k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= -k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= +k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= +k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= +k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= From 09a2b55930ca90672d5b6cfc9abf0dbd080957cf Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Wed, 19 Jun 2024 12:36:20 +0300 Subject: [PATCH 158/192] K8SPS-341: ignore `delete-backup` finalizer for not finished backups (#654) https://perconadev.atlassian.net/browse/K8SPS-341 Co-authored-by: Viacheslav Sarzhan --- pkg/controller/psbackup/controller.go | 4 ++++ pkg/controller/psbackup/controller_test.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/controller/psbackup/controller.go b/pkg/controller/psbackup/controller.go index 1019316ef..5106da0f3 100644 --- a/pkg/controller/psbackup/controller.go +++ b/pkg/controller/psbackup/controller.go @@ -519,6 +519,10 @@ func (r *PerconaServerMySQLBackupReconciler) backupConfig(ctx context.Context, c } func (r *PerconaServerMySQLBackupReconciler) deleteBackup(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQLBackup) (bool, error) { + if cr.Status.State != apiv1alpha1.BackupSucceeded { + return true, nil + } + backupConf, err := r.backupConfig(ctx, cr) if err != nil { return false, errors.Wrap(err, "failed to create sidecar backup config") diff --git a/pkg/controller/psbackup/controller_test.go b/pkg/controller/psbackup/controller_test.go index 19421b837..f6fec7a3e 100644 --- a/pkg/controller/psbackup/controller_test.go +++ b/pkg/controller/psbackup/controller_test.go @@ -226,7 +226,7 @@ func TestCheckFinalizers(t *testing.T) { cr.Status.State = apiv1alpha1.BackupFailed }), finalizerJobFail: true, - expectedFinalizers: []string{naming.FinalizerDeleteBackup}, + expectedFinalizers: []string{}, }, { name: "with successful finalizer and failed state", From c5a378b9002465cc49f101cbad8a669c7e5e5c09 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Wed, 19 Jun 2024 12:25:28 +0200 Subject: [PATCH 159/192] K8SPS-310 update tls certificate issuer name --- e2e-tests/tests/gr-finalizer/02-assert.yaml | 12 ++++++------ e2e-tests/tests/gr-finalizer/07-errors.yaml | 4 ++-- e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml | 4 ++-- e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml | 4 ++-- e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml | 4 ++-- e2e-tests/tests/tls-cert-manager/02-assert.yaml | 4 ++-- e2e-tests/tests/tls-cert-manager/04-assert.yaml | 4 ++-- e2e-tests/tests/tls-cert-manager/06-assert.yaml | 4 ++-- pkg/controller/ps/controller.go | 4 ++-- pkg/controller/ps/tls.go | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/e2e-tests/tests/gr-finalizer/02-assert.yaml b/e2e-tests/tests/gr-finalizer/02-assert.yaml index f2738a992..389c59fc4 100644 --- a/e2e-tests/tests/gr-finalizer/02-assert.yaml +++ b/e2e-tests/tests/gr-finalizer/02-assert.yaml @@ -13,7 +13,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: gr-finalizer-pso-ca-issuer + name: gr-finalizer-ps-ca-issuer renewBefore: 730h0m0s secretName: gr-finalizer-ca-cert status: @@ -33,7 +33,7 @@ metadata: spec: issuerRef: kind: Issuer - name: gr-finalizer-pso-issuer + name: gr-finalizer-ps-issuer secretName: test-ssl status: conditions: @@ -90,7 +90,7 @@ metadata: cert-manager.io/certificate-name: gr-finalizer-ca-cert cert-manager.io/common-name: gr-finalizer-ca cert-manager.io/issuer-kind: Issuer - cert-manager.io/issuer-name: gr-finalizer-pso-ca-issuer + cert-manager.io/issuer-name: gr-finalizer-ps-ca-issuer labels: controller.cert-manager.io/fao: "true" name: gr-finalizer-ca-cert @@ -102,7 +102,7 @@ metadata: annotations: cert-manager.io/certificate-name: gr-finalizer-ssl cert-manager.io/issuer-kind: Issuer - cert-manager.io/issuer-name: gr-finalizer-pso-issuer + cert-manager.io/issuer-name: gr-finalizer-ps-issuer labels: controller.cert-manager.io/fao: "true" name: test-ssl @@ -112,7 +112,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: generation: 1 - name: gr-finalizer-pso-ca-issuer + name: gr-finalizer-ps-ca-issuer spec: selfSigned: {} --- @@ -120,7 +120,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: generation: 1 - name: gr-finalizer-pso-issuer + name: gr-finalizer-ps-issuer spec: ca: secretName: gr-finalizer-ca-cert diff --git a/e2e-tests/tests/gr-finalizer/07-errors.yaml b/e2e-tests/tests/gr-finalizer/07-errors.yaml index 3b62349f0..0014883f1 100644 --- a/e2e-tests/tests/gr-finalizer/07-errors.yaml +++ b/e2e-tests/tests/gr-finalizer/07-errors.yaml @@ -36,12 +36,12 @@ metadata: apiVersion: cert-manager.io/v1 kind: Issuer metadata: - name: gr-finalizer-pso-ca-issuer + name: gr-finalizer-ps-ca-issuer --- apiVersion: cert-manager.io/v1 kind: Issuer metadata: - name: gr-finalizer-pso-issuer + name: gr-finalizer-ps-issuer --- apiVersion: apps/v1 kind: StatefulSet diff --git a/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml index fad60c296..45721e9c9 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/02-assert.yaml @@ -12,7 +12,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: gr-tls-cert-manager-pso-ca-issuer + name: gr-tls-cert-manager-ps-ca-issuer renewBefore: 730h0m0s secretName: gr-tls-cert-manager-ca-cert status: @@ -31,7 +31,7 @@ metadata: spec: issuerRef: kind: Issuer - name: gr-tls-cert-manager-pso-issuer + name: gr-tls-cert-manager-ps-issuer secretName: test-ssl status: conditions: diff --git a/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml index b5ac60eeb..18cf44438 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/04-assert.yaml @@ -12,7 +12,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: gr-tls-cert-manager-pso-ca-issuer + name: gr-tls-cert-manager-ps-ca-issuer renewBefore: 730h0m0s secretName: gr-tls-cert-manager-ca-cert status: @@ -31,7 +31,7 @@ metadata: spec: issuerRef: kind: Issuer - name: gr-tls-cert-manager-pso-issuer + name: gr-tls-cert-manager-ps-issuer secretName: test-ssl status: conditions: diff --git a/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml index ea9d87eb8..c95a2db66 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/06-assert.yaml @@ -12,7 +12,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: gr-tls-cert-manager-pso-ca-issuer + name: gr-tls-cert-manager-ps-ca-issuer renewBefore: 730h0m0s secretName: gr-tls-cert-manager-ca-cert status: @@ -31,7 +31,7 @@ metadata: spec: issuerRef: kind: Issuer - name: gr-tls-cert-manager-pso-issuer + name: gr-tls-cert-manager-ps-issuer secretName: test-ssl status: conditions: diff --git a/e2e-tests/tests/tls-cert-manager/02-assert.yaml b/e2e-tests/tests/tls-cert-manager/02-assert.yaml index f0b09caf1..a7c8a4765 100644 --- a/e2e-tests/tests/tls-cert-manager/02-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/02-assert.yaml @@ -12,7 +12,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: tls-cert-manager-pso-ca-issuer + name: tls-cert-manager-ps-ca-issuer renewBefore: 730h0m0s secretName: tls-cert-manager-ca-cert status: @@ -31,7 +31,7 @@ metadata: spec: issuerRef: kind: Issuer - name: tls-cert-manager-pso-issuer + name: tls-cert-manager-ps-issuer secretName: test-ssl status: conditions: diff --git a/e2e-tests/tests/tls-cert-manager/04-assert.yaml b/e2e-tests/tests/tls-cert-manager/04-assert.yaml index 646b71b87..33754f38b 100644 --- a/e2e-tests/tests/tls-cert-manager/04-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/04-assert.yaml @@ -12,7 +12,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: tls-cert-manager-pso-ca-issuer + name: tls-cert-manager-ps-ca-issuer renewBefore: 730h0m0s secretName: tls-cert-manager-ca-cert status: @@ -31,7 +31,7 @@ metadata: spec: issuerRef: kind: Issuer - name: tls-cert-manager-pso-issuer + name: tls-cert-manager-ps-issuer secretName: test-ssl status: conditions: diff --git a/e2e-tests/tests/tls-cert-manager/06-assert.yaml b/e2e-tests/tests/tls-cert-manager/06-assert.yaml index 32c3e6423..ee854bdca 100644 --- a/e2e-tests/tests/tls-cert-manager/06-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/06-assert.yaml @@ -12,7 +12,7 @@ spec: isCA: true issuerRef: kind: Issuer - name: tls-cert-manager-pso-ca-issuer + name: tls-cert-manager-ps-ca-issuer renewBefore: 730h0m0s secretName: tls-cert-manager-ca-cert status: @@ -31,7 +31,7 @@ metadata: spec: issuerRef: kind: Issuer - name: tls-cert-manager-pso-issuer + name: tls-cert-manager-ps-issuer secretName: test-ssl status: conditions: diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 26821372d..0221b3dd2 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -285,8 +285,8 @@ func (r *PerconaServerMySQLReconciler) deleteCerts(ctx context.Context, cr *apiv log.Info("Deleting SSL certificates") issuers := []string{ - cr.Name + "-pso-ca-issuer", - cr.Name + "-pso-issuer", + cr.Name + "-ps-ca-issuer", + cr.Name + "-ps-issuer", } for _, issuerName := range issuers { issuer := &cm.Issuer{} diff --git a/pkg/controller/ps/tls.go b/pkg/controller/ps/tls.go index 696e09d28..b808687be 100644 --- a/pkg/controller/ps/tls.go +++ b/pkg/controller/ps/tls.go @@ -110,8 +110,8 @@ func (r *PerconaServerMySQLReconciler) checkTLSIssuer(ctx context.Context, cr *a } func (r *PerconaServerMySQLReconciler) ensureSSLByCertManager(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { - issuerName := cr.Name + "-pso-issuer" - caIssuerName := cr.Name + "-pso-ca-issuer" + issuerName := cr.Name + "-ps-issuer" + caIssuerName := cr.Name + "-ps-ca-issuer" issuerKind := "Issuer" issuerGroup := "" if cr.Spec.TLS != nil && cr.Spec.TLS.IssuerConf != nil { From 6a28c38e4ffbf88b9561e311276e40b1d18e0803 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Thu, 20 Jun 2024 15:46:18 +0300 Subject: [PATCH 160/192] K8SPS-301: reduce error logs on pod deletion (#659) * K8SPS-301: reduce error logs on pod deletion https://perconadev.atlassian.net/browse/K8SPS-301 * fix test * fix merge * fix regression * get ready pods for orchestrator --------- Co-authored-by: Viacheslav Sarzhan --- pkg/controller/ps/controller.go | 76 ++++++++++++++++++-------------- pkg/controller/ps/status.go | 7 ++- pkg/controller/ps/status_test.go | 1 + pkg/k8s/utils.go | 3 ++ pkg/mysql/mysql.go | 4 ++ 5 files changed, 55 insertions(+), 36 deletions(-) diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 0221b3dd2..c325ddfe4 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -188,7 +188,7 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * } if cr.Spec.MySQL.IsAsync() { - orcPod, err := getOrcPod(ctx, r.Client, cr, 0) + orcPod, err := getReadyOrcPod(ctx, r.Client, cr) if err != nil { return nil } @@ -204,10 +204,9 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * return errors.Wrap(err, "get operator password") } - firstPodFQDN := fmt.Sprintf("%s.%s.%s", firstPod.Name, mysql.ServiceName(cr), cr.Namespace) - firstPodUri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) + firstPodUri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, mysql.PodFQDN(cr, &firstPod)) - um := database.NewReplicationManager(&firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodFQDN) + um := database.NewReplicationManager(&firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.PodFQDN(cr, &firstPod)) mysh, err := mysqlsh.NewWithExec(r.ClientCmd, &firstPod, firstPodUri) if err != nil { @@ -221,11 +220,11 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * log.Info("Got primary", "primary", clusterStatus.DefaultReplicaSet.Primary) - if !strings.HasPrefix(clusterStatus.DefaultReplicaSet.Primary, firstPodFQDN) { + if !strings.HasPrefix(clusterStatus.DefaultReplicaSet.Primary, mysql.PodFQDN(cr, &firstPod)) { log.Info("Primary is not pod-0", "primary", clusterStatus.DefaultReplicaSet.Primary) log.Info("Ensuring pod-0 is the primary") - err := mysh.SetPrimaryInstanceWithExec(ctx, cr.InnoDBClusterName(), firstPodFQDN) + err := mysh.SetPrimaryInstanceWithExec(ctx, cr.InnoDBClusterName(), mysql.PodFQDN(cr, &firstPod)) if err != nil { return errors.Wrap(err, "set primary instance") } @@ -634,7 +633,7 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context return nil } - orcPod, err := getOrcPod(ctx, r.Client, cr, 0) + orcPod, err := getReadyOrcPod(ctx, r.Client, cr) if err != nil { return nil } @@ -785,7 +784,7 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, return nil } - pod, err := getOrcPod(ctx, r.Client, cr, 0) + pod, err := getReadyOrcPod(ctx, r.Client, cr) if err != nil { return nil } @@ -833,9 +832,9 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con return nil } - firstPod, err := getMySQLPod(ctx, r.Client, cr, 0) + pod, err := getReadyMySQLPod(ctx, r.Client, cr) if err != nil { - return err + return errors.Wrap(err, "get ready mysql pod") } operatorPass, err := k8s.UserPassword(ctx, r.Client, cr, apiv1alpha1.UserOperator) @@ -843,7 +842,7 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con return errors.Wrap(err, "get operator password") } - db := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.ServiceName(cr)) + db := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.ServiceName(cr)) cond := meta.FindStatusCondition(cr.Status.Conditions, apiv1alpha1.ConditionInnoDBClusterBootstrapped) if cond == nil || cond.Status == metav1.ConditionFalse { if exists, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata"); err != nil || !exists { @@ -863,7 +862,7 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con } if exists, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata"); err != nil || !exists { - return errors.New("InnoDB cluster is already bootstrapped, but failed to check its status") + return errors.Wrap(err, "InnoDB cluster is already bootstrapped, but failed to check its status") } return nil @@ -978,9 +977,9 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, return nil } - firstPod, err := getMySQLPod(ctx, r.Client, cr, 0) + pod, err := getReadyMySQLPod(ctx, r.Client, cr) if err != nil { - return err + return errors.Wrap(err, "get ready mysql pod") } operatorPass, err := k8s.UserPassword(ctx, r.Client, cr, apiv1alpha1.UserOperator) @@ -988,9 +987,7 @@ func (r *PerconaServerMySQLReconciler) reconcileMySQLRouter(ctx context.Context, return errors.Wrap(err, "get operator password") } - firstPodUri := mysql.PodName(cr, 0) + "." + mysql.ServiceName(cr) + "." + cr.Namespace - - db := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodUri) + db := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.PodFQDN(cr, pod)) if exist, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata"); err != nil || !exist { log.V(1).Info("Waiting for InnoDB Cluster", "cluster", cr.Name) return nil @@ -1026,7 +1023,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOutdated(ctx context.Context, cr * } func (r *PerconaServerMySQLReconciler) getPrimaryFromOrchestrator(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) (*orchestrator.Instance, error) { - pod, err := getOrcPod(ctx, r.Client, cr, 0) + pod, err := getReadyOrcPod(ctx, r.Client, cr) if err != nil { return nil, err } @@ -1048,14 +1045,12 @@ func (r *PerconaServerMySQLReconciler) getPrimaryFromGR(ctx context.Context, cr return "", errors.Wrap(err, "get operator password") } - fqdn := mysql.FQDN(cr, 0) - - firstPod, err := getMySQLPod(ctx, r.Client, cr, 0) + pod, err := getReadyMySQLPod(ctx, r.Client, cr) if err != nil { - return "", err + return "", errors.Wrap(err, "get ready mysql pod") } - um := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, fqdn) + um := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.PodFQDN(cr, pod)) return um.GetGroupReplicationPrimary(ctx) } @@ -1079,7 +1074,7 @@ func (r *PerconaServerMySQLReconciler) getPrimaryHost(ctx context.Context, cr *a func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL, primary *orchestrator.Instance) error { log := logf.FromContext(ctx).WithName("stopAsyncReplication") - orcPod, err := getOrcPod(ctx, r.Client, cr, 0) + orcPod, err := getReadyOrcPod(ctx, r.Client, cr) if err != nil { return err } @@ -1134,7 +1129,7 @@ func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, func (r *PerconaServerMySQLReconciler) startAsyncReplication(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL, replicaPass string, primary *orchestrator.Instance) error { log := logf.FromContext(ctx).WithName("startAsyncReplication") - orcPod, err := getOrcPod(ctx, r.Client, cr, 0) + orcPod, err := getReadyOrcPod(ctx, r.Client, cr) if err != nil { return nil } @@ -1177,6 +1172,20 @@ func (r *PerconaServerMySQLReconciler) startAsyncReplication(ctx context.Context return errors.Wrap(g.Wait(), "start replication on replicas") } +func getReadyMySQLPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaServerMySQL) (*corev1.Pod, error) { + pods, err := k8s.PodsByLabels(ctx, cl, mysql.MatchLabels(cr)) + if err != nil { + return nil, errors.Wrap(err, "get pods") + } + + for i, pod := range pods { + if k8s.IsPodReady(pod) { + return &pods[i], nil + } + } + return nil, errors.New("no ready pods") +} + func getMySQLPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaServerMySQL, idx int) (*corev1.Pod, error) { pod := &corev1.Pod{} @@ -1188,15 +1197,18 @@ func getMySQLPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaS return pod, nil } -func getOrcPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaServerMySQL, idx int) (*corev1.Pod, error) { - pod := &corev1.Pod{} - - nn := types.NamespacedName{Namespace: cr.Namespace, Name: orchestrator.PodName(cr, idx)} - if err := cl.Get(ctx, nn, pod); err != nil { - return nil, err +func getReadyOrcPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaServerMySQL) (*corev1.Pod, error) { + pods, err := k8s.PodsByLabels(ctx, cl, orchestrator.MatchLabels(cr)) + if err != nil { + return nil, errors.Wrap(err, "get pods") } - return pod, nil + for i, pod := range pods { + if k8s.IsPodReady(pod) { + return &pods[i], nil + } + } + return nil, errors.New("no ready pods") } func getPodIndexFromHostname(hostname string) (int, error) { diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index d4b5054d7..a1991b9be 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -217,13 +217,12 @@ func (r *PerconaServerMySQLReconciler) isGRReady(ctx context.Context, cr *apiv1a return false, errors.Wrap(err, "get operator password") } - firstPod, err := getMySQLPod(ctx, r.Client, cr, 0) + pod, err := getReadyMySQLPod(ctx, r.Client, cr) if err != nil { - return false, err + return false, errors.Wrap(err, "get ready mysql pod") } - firstPodUri := mysql.PodName(cr, 0) + "." + mysql.ServiceName(cr) + "." + cr.Namespace - db := database.NewReplicationManager(firstPod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, firstPodUri) + db := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, mysql.PodFQDN(cr, pod)) dbExists, err := db.CheckIfDatabaseExists(ctx, "mysql_innodb_cluster_metadata") if err != nil { diff --git a/pkg/controller/ps/status_test.go b/pkg/controller/ps/status_test.go index b604f631f..602507577 100644 --- a/pkg/controller/ps/status_test.go +++ b/pkg/controller/ps/status_test.go @@ -1138,6 +1138,7 @@ func makeFakeReadyPods(cr *apiv1alpha1.PerconaServerMySQL, amount int, podType s }, }, Status: corev1.PodStatus{ + Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{ { Type: corev1.ContainersReady, diff --git a/pkg/k8s/utils.go b/pkg/k8s/utils.go index beab57bee..606da9dbd 100644 --- a/pkg/k8s/utils.go +++ b/pkg/k8s/utils.go @@ -94,6 +94,9 @@ func IsPodWithNameReady(ctx context.Context, cl client.Client, nn types.Namespac } func IsPodReady(pod corev1.Pod) bool { + if pod.Status.Phase != corev1.PodRunning || pod.DeletionTimestamp != nil { + return false + } for _, cond := range pod.Status.Conditions { if cond.Type == corev1.ContainersReady && cond.Status == corev1.ConditionTrue { return true diff --git a/pkg/mysql/mysql.go b/pkg/mysql/mysql.go index 891e64df1..741d26166 100644 --- a/pkg/mysql/mysql.go +++ b/pkg/mysql/mysql.go @@ -109,6 +109,10 @@ func FQDN(cr *apiv1alpha1.PerconaServerMySQL, idx int) string { return fmt.Sprintf("%s.%s.%s", PodName(cr, idx), ServiceName(cr), cr.Namespace) } +func PodFQDN(cr *apiv1alpha1.PerconaServerMySQL, pod *corev1.Pod) string { + return fmt.Sprintf("%s.%s.%s", pod.Name, ServiceName(cr), cr.Namespace) +} + func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string { return util.SSMapMerge(cr.MySQLSpec().Labels, map[string]string{naming.LabelComponent: ComponentName}, From 336f30916b20fb4f7ea4f1592104e91e1a4a2fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Thu, 20 Jun 2024 16:50:49 +0300 Subject: [PATCH 161/192] K8SPS-186: Add unsafeFlags (#668) * K8SPS-186: Add unsafeFlags * fix tests * fix haproxy test * comment unsafe flags * fix smart-update test --------- Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 44 +++++++++------ api/v1alpha1/zz_generated.deepcopy.go | 16 ++++++ .../ps.percona.com_perconaservermysqls.yaml | 15 +++++- .../samples/ps_v2_perconaserverformysql.yaml | 9 +++- deploy/bundle.yaml | 15 +++++- deploy/cr.yaml | 7 ++- deploy/crd.yaml | 15 +++++- .../tests/gr-demand-backup/02-assert.yaml | 1 - e2e-tests/tests/gr-one-pod/01-assert.yaml | 3 +- .../tests/gr-one-pod/01-create-cluster.yaml | 3 +- .../tests/gr-scaling/01-create-cluster.yaml | 3 +- .../tests/gr-security-context/02-assert.yaml | 2 - .../tests/haproxy/01-create-cluster.yaml | 1 - .../tests/haproxy/09-disable-haproxy.yaml | 3 +- e2e-tests/tests/one-pod/01-assert.yaml | 3 +- .../tests/one-pod/01-create-cluster.yaml | 4 +- .../smart-update/02-check-smart-update.yaml | 9 +++- pkg/controller/ps/controller.go | 12 ++--- pkg/controller/ps/controller_test.go | 53 ++++++------------- pkg/controller/ps/status_test.go | 5 +- pkg/controller/ps/version_test.go | 40 ++++++++++++++ 21 files changed, 182 insertions(+), 81 deletions(-) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 073d66ee6..f85113c9f 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -50,7 +50,7 @@ type PerconaServerMySQLSpec struct { SecretsName string `json:"secretsName,omitempty"` SSLSecretName string `json:"sslSecretName,omitempty"` SSLInternalSecretName string `json:"sslInternalSecretName,omitempty"` - AllowUnsafeConfig bool `json:"allowUnsafeConfigurations,omitempty"` + Unsafe UnsafeFlags `json:"unsafeFlags,omitempty"` InitImage string `json:"initImage,omitempty"` IgnoreAnnotations []string `json:"ignoreAnnotations,omitempty"` IgnoreLabels []string `json:"ignoreLabels,omitempty"` @@ -65,6 +65,21 @@ type PerconaServerMySQLSpec struct { UpdateStrategy appsv1.StatefulSetUpdateStrategyType `json:"updateStrategy,omitempty"` } +type UnsafeFlags struct { + // MySQLSize allows to set MySQL size to a value less than the minimum safe size or higher than the maximum safe size. + MySQLSize bool `json:"mysqlSize,omitempty"` + + // Proxy allows to disable proxy. + Proxy bool `json:"proxy,omitempty"` + // ProxySize allows to set proxy (HAProxy / Router) size to a value less than the minimum safe size. + ProxySize bool `json:"proxySize,omitempty"` + + // Orchestrator allows to disable Orchestrator. + Orchestrator bool `json:"orchestrator,omitempty"` + // OrchestratorSize allows to set Orchestrator size to a value less than the minimum safe size. + OrchestratorSize bool `json:"orchestratorSize,omitempty"` +} + type TLSSpec struct { SANs []string `json:"SANs,omitempty"` IssuerConf *cmmeta.ObjectReference `json:"issuerConf,omitempty"` @@ -676,26 +691,25 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi cr.Spec.MySQL.reconcileAffinityOpts() cr.Spec.Orchestrator.reconcileAffinityOpts() - if oSize := int(cr.Spec.Orchestrator.Size); cr.OrchestratorEnabled() && (oSize < 3 || oSize%2 == 0) && oSize != 0 && !cr.Spec.AllowUnsafeConfig { - return errors.New("Orchestrator size must be 3 or greater and an odd number for raft setup") + if oSize := int(cr.Spec.Orchestrator.Size); cr.OrchestratorEnabled() && (oSize < 3 || oSize%2 == 0) && oSize != 0 && !cr.Spec.Unsafe.OrchestratorSize { + return errors.New("Orchestrator size must be 3 or greater and an odd number for raft setup. Enable spec.unsafeFlags.orchestratorSize to bypass this check") } if cr.Spec.MySQL.ClusterType == ClusterTypeGR && cr.Spec.Proxy.Router == nil { return errors.New("router section is needed for group replication") } - if cr.Spec.MySQL.ClusterType == ClusterTypeGR && !cr.Spec.AllowUnsafeConfig { + if cr.Spec.MySQL.ClusterType == ClusterTypeGR && !cr.Spec.Unsafe.MySQLSize { if cr.Spec.MySQL.Size < MinSafeGRSize { - log.Info("Setting safe defaults, updating MySQL cluster size", "oldSize", cr.Spec.MySQL.Size, "newSafeSize", MinSafeGRSize) - cr.Spec.MySQL.Size = MinSafeGRSize + return errors.Errorf("MySQL size should be %d or greater for Group Replication. Enable spec.unsafeFlags.mysqlSize to set a lower size", MinSafeGRSize) } if cr.Spec.MySQL.Size > MaxSafeGRSize { - cr.Spec.MySQL.Size = MaxSafeGRSize + return errors.Errorf("MySQL size should be %d or lower for Group Replication. Enable spec.unsafeFlags.mysqlSize to set a higher size", MaxSafeGRSize) } if cr.Spec.MySQL.Size%2 == 0 { - cr.Spec.MySQL.Size++ + return errors.New("MySQL size should be an odd number for Group Replication. Enable spec.unsafeFlags.mysqlSize to set an even number") } } @@ -703,10 +717,9 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi return errors.New("MySQL Router and HAProxy can't be enabled at the same time") } - if cr.RouterEnabled() && !cr.Spec.AllowUnsafeConfig { + if cr.RouterEnabled() && !cr.Spec.Unsafe.ProxySize { if cr.Spec.Proxy.Router.Size < MinSafeProxySize { - log.Info("Setting safe defaults, updating Router size", "oldSize", cr.Spec.Proxy.Router.Size, "newSafeSize", MinSafeProxySize) - cr.Spec.Proxy.Router.Size = MinSafeProxySize + return errors.Errorf("Router size should be %d or greater. Enable spec.unsafeFlags.proxySize to set a lower size", MinSafeProxySize) } } @@ -714,10 +727,9 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi cr.Spec.Proxy.HAProxy = new(HAProxySpec) } - if cr.HAProxyEnabled() && !cr.Spec.AllowUnsafeConfig { + if cr.HAProxyEnabled() && !cr.Spec.Unsafe.ProxySize { if cr.Spec.Proxy.HAProxy.Size < MinSafeProxySize { - log.Info("Setting safe defaults, updating HAProxy size", "oldSize", cr.Spec.Proxy.HAProxy.Size, "newSafeSize", MinSafeProxySize) - cr.Spec.Proxy.HAProxy.Size = MinSafeProxySize + return errors.Errorf("HAProxy size should be %d or greater. Enable spec.unsafeFlags.proxySize to set a lower size", MinSafeProxySize) } } @@ -957,7 +969,7 @@ func (cr *PerconaServerMySQL) RouterEnabled() bool { // HAProxyEnabled verifies if HAProxy is enabled based on MySQL configuration and safety settings. func (cr *PerconaServerMySQL) HAProxyEnabled() bool { - if cr.MySQLSpec().IsAsync() && !cr.Spec.AllowUnsafeConfig { + if cr.MySQLSpec().IsAsync() && !cr.Spec.Unsafe.Proxy { return true } @@ -971,7 +983,7 @@ func (cr *PerconaServerMySQL) OrchestratorEnabled() bool { return false } - if cr.MySQLSpec().IsAsync() && !cr.Spec.AllowUnsafeConfig { + if cr.MySQLSpec().IsAsync() && !cr.Spec.Unsafe.Orchestrator { return true } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3031a01af..2d48d7ed1 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -632,6 +632,7 @@ func (in *PerconaServerMySQLRestoreStatus) DeepCopy() *PerconaServerMySQLRestore // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PerconaServerMySQLSpec) DeepCopyInto(out *PerconaServerMySQLSpec) { *out = *in + out.Unsafe = in.Unsafe if in.IgnoreAnnotations != nil { in, out := &in.IgnoreAnnotations, &out.IgnoreAnnotations *out = make([]string, len(*in)) @@ -982,6 +983,21 @@ func (in *ToolkitSpec) DeepCopy() *ToolkitSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UnsafeFlags) DeepCopyInto(out *UnsafeFlags) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnsafeFlags. +func (in *UnsafeFlags) DeepCopy() *UnsafeFlags { + if in == nil { + return nil + } + out := new(UnsafeFlags) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UpgradeOptions) DeepCopyInto(out *UpgradeOptions) { *out = *in diff --git a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml index 3c4dc8c4e..5e053c724 100644 --- a/config/crd/bases/ps.percona.com_perconaservermysqls.yaml +++ b/config/crd/bases/ps.percona.com_perconaservermysqls.yaml @@ -53,8 +53,6 @@ spec: type: object spec: properties: - allowUnsafeConfigurations: - type: boolean backup: properties: backoffLimit: @@ -8046,6 +8044,19 @@ spec: required: - image type: object + unsafeFlags: + properties: + mysqlSize: + type: boolean + orchestrator: + type: boolean + orchestratorSize: + type: boolean + proxy: + type: boolean + proxySize: + type: boolean + type: object updateStrategy: type: string upgradeOptions: diff --git a/config/samples/ps_v2_perconaserverformysql.yaml b/config/samples/ps_v2_perconaserverformysql.yaml index 9d2a64e63..b32e94960 100644 --- a/config/samples/ps_v2_perconaserverformysql.yaml +++ b/config/samples/ps_v2_perconaserverformysql.yaml @@ -3,7 +3,12 @@ kind: PerconaServerMySQL metadata: name: cluster1 spec: - allowUnsafeConfigurations: false + unsafeFlags: + mysqlSize: false + orchestrator: false + orchestratorSize: false + proxy: false + proxySize: false secretsName: cluster1-secrets sslSecretName: cluster1-ssl mysql: @@ -83,7 +88,7 @@ spec: storage: 1G affinity: antiAffinityTopologyKey: "none" - + pmm: enabled: false image: percona/pmm-client:2.12.0 diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 8b22dca22..f1f436134 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -1949,8 +1949,6 @@ spec: type: object spec: properties: - allowUnsafeConfigurations: - type: boolean backup: properties: backoffLimit: @@ -9942,6 +9940,19 @@ spec: required: - image type: object + unsafeFlags: + properties: + mysqlSize: + type: boolean + orchestrator: + type: boolean + orchestratorSize: + type: boolean + proxy: + type: boolean + proxySize: + type: boolean + type: object updateStrategy: type: string upgradeOptions: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 05a6d4661..75c44276e 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -6,7 +6,12 @@ metadata: - percona.com/delete-mysql-pods-in-order # - percona.com/delete-ssl spec: - allowUnsafeConfigurations: false +# unsafeFlags: +# mysqlSize: false +# orchestrator: false +# orchestratorSize: false +# proxy: false +# proxySize: false # pause: false crVersion: 0.8.0 secretsName: cluster1-secrets diff --git a/deploy/crd.yaml b/deploy/crd.yaml index 024f0bbc8..59f6b1a17 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -1949,8 +1949,6 @@ spec: type: object spec: properties: - allowUnsafeConfigurations: - type: boolean backup: properties: backoffLimit: @@ -9942,6 +9940,19 @@ spec: required: - image type: object + unsafeFlags: + properties: + mysqlSize: + type: boolean + orchestrator: + type: boolean + orchestratorSize: + type: boolean + proxy: + type: boolean + proxySize: + type: boolean + type: object updateStrategy: type: string upgradeOptions: diff --git a/e2e-tests/tests/gr-demand-backup/02-assert.yaml b/e2e-tests/tests/gr-demand-backup/02-assert.yaml index e4f9be085..9d9a017fe 100644 --- a/e2e-tests/tests/gr-demand-backup/02-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup/02-assert.yaml @@ -29,7 +29,6 @@ kind: PerconaServerMySQL metadata: name: gr-demand-backup spec: - allowUnsafeConfigurations: false backup: backoffLimit: 3 status: diff --git a/e2e-tests/tests/gr-one-pod/01-assert.yaml b/e2e-tests/tests/gr-one-pod/01-assert.yaml index 727d579cf..657f0c6c0 100644 --- a/e2e-tests/tests/gr-one-pod/01-assert.yaml +++ b/e2e-tests/tests/gr-one-pod/01-assert.yaml @@ -39,7 +39,8 @@ kind: PerconaServerMySQL metadata: name: gr-one-pod spec: - allowUnsafeConfigurations: true + unsafeFlags: + mysqlSize: true mysql: clusterType: group-replication size: 1 diff --git a/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml b/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml index 1be63fa60..9e0523242 100644 --- a/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml +++ b/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml @@ -12,7 +12,8 @@ commands: | yq eval '.spec.mysql.clusterType="group-replication"' - \ | yq eval '.spec.proxy.router.enabled=true' - \ | yq eval '.spec.proxy.haproxy.enabled=false' - \ - | yq eval '.spec.allowUnsafeConfigurations=true' - \ + | yq eval '.spec.unsafeFlags.mysqlSize=true' - \ + | yq eval '.spec.unsafeFlags.proxySize=true' - \ | yq eval '.spec.mysql.size=1' - \ | yq eval '.spec.proxy.haproxy.enabled=false' - \ | yq eval '.spec.proxy.router.size=1' - \ diff --git a/e2e-tests/tests/gr-scaling/01-create-cluster.yaml b/e2e-tests/tests/gr-scaling/01-create-cluster.yaml index 846563a69..780750528 100644 --- a/e2e-tests/tests/gr-scaling/01-create-cluster.yaml +++ b/e2e-tests/tests/gr-scaling/01-create-cluster.yaml @@ -9,7 +9,8 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.allowUnsafeConfigurations=true' - \ + | yq eval '.spec.unsafeFlags.mysqlSize=true' - \ + | yq eval '.spec.unsafeFlags.proxySize=true' - \ | yq eval '.spec.mysql.clusterType="group-replication"' - \ | yq eval '.spec.proxy.router.enabled=true' - \ | yq eval '.spec.proxy.haproxy.enabled=false' - \ diff --git a/e2e-tests/tests/gr-security-context/02-assert.yaml b/e2e-tests/tests/gr-security-context/02-assert.yaml index eaedbbdb3..ee927875d 100644 --- a/e2e-tests/tests/gr-security-context/02-assert.yaml +++ b/e2e-tests/tests/gr-security-context/02-assert.yaml @@ -88,8 +88,6 @@ apiVersion: ps.percona.com/v1alpha1 kind: PerconaServerMySQL metadata: name: gr-security-context -spec: - allowUnsafeConfigurations: false status: conditions: - reason: Initializing diff --git a/e2e-tests/tests/haproxy/01-create-cluster.yaml b/e2e-tests/tests/haproxy/01-create-cluster.yaml index 553abfb15..bbe04ab6c 100644 --- a/e2e-tests/tests/haproxy/01-create-cluster.yaml +++ b/e2e-tests/tests/haproxy/01-create-cluster.yaml @@ -9,7 +9,6 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.allowUnsafeConfigurations=false' - \ | yq eval '.spec.updateStrategy="RollingUpdate"' - \ | yq eval '.spec.mysql.clusterType="async"' - \ | yq eval '.spec.orchestrator.enabled=true' - \ diff --git a/e2e-tests/tests/haproxy/09-disable-haproxy.yaml b/e2e-tests/tests/haproxy/09-disable-haproxy.yaml index aa46b2b77..0bbd6c993 100644 --- a/e2e-tests/tests/haproxy/09-disable-haproxy.yaml +++ b/e2e-tests/tests/haproxy/09-disable-haproxy.yaml @@ -7,7 +7,8 @@ kind: PerconaServerMySQL metadata: name: haproxy spec: - allowUnsafeConfigurations: true + unsafeFlags: + proxy: true proxy: haproxy: enabled: false diff --git a/e2e-tests/tests/one-pod/01-assert.yaml b/e2e-tests/tests/one-pod/01-assert.yaml index af6d9793c..dd7f8cfe7 100644 --- a/e2e-tests/tests/one-pod/01-assert.yaml +++ b/e2e-tests/tests/one-pod/01-assert.yaml @@ -43,7 +43,8 @@ kind: PerconaServerMySQL metadata: name: one-pod spec: - allowUnsafeConfigurations: true + unsafeFlags: + mysqlSize: true mysql: clusterType: async size: 1 diff --git a/e2e-tests/tests/one-pod/01-create-cluster.yaml b/e2e-tests/tests/one-pod/01-create-cluster.yaml index 86781403b..50e3928ff 100644 --- a/e2e-tests/tests/one-pod/01-create-cluster.yaml +++ b/e2e-tests/tests/one-pod/01-create-cluster.yaml @@ -10,7 +10,9 @@ commands: get_cr \ | yq eval '.spec.mysql.clusterType="async"' - \ - | yq eval '.spec.allowUnsafeConfigurations=true' - \ + | yq eval '.spec.unsafeFlags.mysqlSize=true' - \ + | yq eval '.spec.unsafeFlags.proxySize=true' - \ + | yq eval '.spec.unsafeFlags.orchestratorSize=true' - \ | yq eval '.spec.mysql.size=1' - \ | yq eval '.spec.proxy.haproxy.enabled=true' - \ | yq eval '.spec.proxy.haproxy.size=1' - \ diff --git a/e2e-tests/tests/smart-update/02-check-smart-update.yaml b/e2e-tests/tests/smart-update/02-check-smart-update.yaml index 0fd43d376..81b5fa25d 100644 --- a/e2e-tests/tests/smart-update/02-check-smart-update.yaml +++ b/e2e-tests/tests/smart-update/02-check-smart-update.yaml @@ -8,11 +8,16 @@ commands: source ../../functions initialPrimary=$(get_primary_from_haproxy ${test_name}-haproxy-0) + newMysqlImage='percona/percona-server:8.0.28-20' # Upgrade cluster kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \ - --type json \ - -p '[{"op": "replace", "path": "/spec/mysql/image", "value": "percona/percona-server:8.0.28-20"}]' + --type json \ + -p "[{"op": "replace", "path": "/spec/mysql/image", "value": "${newMysqlImage}"}]" + + until [[ "$(kubectl -n "${NAMESPACE}" get sts "$(get_cluster_name)-mysql" -o jsonpath='{.spec.template.spec.containers[0].image}')" == "${newMysqlImage}" ]]; do + echo "waiting for cluster new image" + done wait_cluster_consistency_async "${test_name}" "3" "3" diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index c325ddfe4..19bd5aa31 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -100,6 +100,12 @@ func (r *PerconaServerMySQLReconciler) Reconcile( var cr *apiv1alpha1.PerconaServerMySQL var err error + defer func() { + if err := r.reconcileCRStatus(ctx, cr, err); err != nil { + log.Error(err, "failed to update status") + } + }() + cr, err = k8s.GetCRWithDefaults(ctx, r.Client, req.NamespacedName, r.ServerVersion) if err != nil { if k8serrors.IsNotFound(err) { @@ -113,12 +119,6 @@ func (r *PerconaServerMySQLReconciler) Reconcile( return rr, r.applyFinalizers(ctx, cr) } - defer func() { - if err := r.reconcileCRStatus(ctx, cr, err); err != nil { - log.Error(err, "failed to update status") - } - }() - if err = r.doReconcile(ctx, cr); err != nil { return rr, errors.Wrap(err, "reconcile") } diff --git a/pkg/controller/ps/controller_test.go b/pkg/controller/ps/controller_test.go index 95ff947eb..5d9f93bca 100644 --- a/pkg/controller/ps/controller_test.go +++ b/pkg/controller/ps/controller_test.go @@ -273,71 +273,53 @@ var _ = Describe("Unsafe configurations", Ordered, func() { }) Context("Unsafe configurations are disabled", func() { - Specify("controller should set minimum safe number of replicas to MySQL statefulset", func() { - cr.Spec.AllowUnsafeConfig = false + Specify("controller shouldn't allow setting less than minimum safe size", func() { + cr.Spec.Unsafe.MySQLSize = false cr.MySQLSpec().ClusterType = psv1alpha1.ClusterTypeGR cr.MySQLSpec().Size = 1 Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) _, err = reconciler().Reconcile(ctx, ctrl.Request{NamespacedName: crNamespacedName}) - Expect(err).NotTo(HaveOccurred()) - - sts := &appsv1.StatefulSet{} - - Eventually(func() bool { - err := k8sClient.Get(ctx, types.NamespacedName{Name: mysql.Name(cr), Namespace: cr.Namespace}, sts) - return err == nil - }, time.Second*15, time.Millisecond*250).Should(BeTrue()) + Expect(err).To(HaveOccurred()) - Expect(*sts.Spec.Replicas).Should(Equal(int32(psv1alpha1.MinSafeGRSize))) + Expect(k8sClient.Get(ctx, crNamespacedName, cr)).Should(Succeed()) + Expect(cr.Status.State).Should(Equal(psv1alpha1.StateError)) }) - Specify("controller should set maximum safe number of replicas to MySQL statefulset", func() { + Specify("controller shouldn't allow setting more than maximum safe size", func() { Eventually(func() bool { err := k8sClient.Get(ctx, crNamespacedName, cr) return err == nil }, time.Second*15, time.Millisecond*250).Should(BeTrue()) - cr.Spec.AllowUnsafeConfig = false + cr.Spec.Unsafe.MySQLSize = false cr.MySQLSpec().ClusterType = psv1alpha1.ClusterTypeGR cr.MySQLSpec().Size = 11 Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) _, err = reconciler().Reconcile(ctx, ctrl.Request{NamespacedName: crNamespacedName}) - Expect(err).NotTo(HaveOccurred()) - - sts := &appsv1.StatefulSet{} - - Eventually(func() bool { - err := k8sClient.Get(ctx, types.NamespacedName{Name: mysql.Name(cr), Namespace: cr.Namespace}, sts) - return err == nil - }, time.Second*15, time.Millisecond*250).Should(BeTrue()) + Expect(err).To(HaveOccurred()) - Expect(*sts.Spec.Replicas).Should(Equal(int32(psv1alpha1.MaxSafeGRSize))) + Expect(k8sClient.Get(ctx, crNamespacedName, cr)).Should(Succeed()) + Expect(cr.Status.State).Should(Equal(psv1alpha1.StateError)) }) - Specify("controller should set even number of replicas to MySQL statefulset", func() { + Specify("controller should't allow setting even number of nodes for MySQL", func() { Eventually(func() bool { err := k8sClient.Get(ctx, crNamespacedName, cr) return err == nil }, time.Second*15, time.Millisecond*250).Should(BeTrue()) - cr.Spec.AllowUnsafeConfig = false + cr.Spec.Unsafe.MySQLSize = false cr.MySQLSpec().ClusterType = psv1alpha1.ClusterTypeGR cr.MySQLSpec().Size = 4 Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) _, err = reconciler().Reconcile(ctx, ctrl.Request{NamespacedName: crNamespacedName}) - Expect(err).NotTo(HaveOccurred()) - - sts := &appsv1.StatefulSet{} - - Eventually(func() bool { - err := k8sClient.Get(ctx, types.NamespacedName{Name: mysql.Name(cr), Namespace: cr.Namespace}, sts) - return err == nil - }, time.Second*15, time.Millisecond*250).Should(BeTrue()) + Expect(err).To(HaveOccurred()) - Expect(*sts.Spec.Replicas).Should(Equal(int32(5))) + Expect(k8sClient.Get(ctx, crNamespacedName, cr)).Should(Succeed()) + Expect(cr.Status.State).Should(Equal(psv1alpha1.StateError)) }) }) @@ -348,7 +330,7 @@ var _ = Describe("Unsafe configurations", Ordered, func() { return err == nil }, time.Second*15, time.Millisecond*250).Should(BeTrue()) - cr.Spec.AllowUnsafeConfig = true + cr.Spec.Unsafe.MySQLSize = true cr.MySQLSpec().ClusterType = psv1alpha1.ClusterTypeGR cr.MySQLSpec().Size = 1 Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) @@ -396,7 +378,6 @@ var _ = Describe("Reconcile HAProxy", Ordered, func() { cr, err := readDefaultCR(crName, ns) cr.Spec.MySQL.ClusterType = psv1alpha1.ClusterTypeAsync cr.Spec.Proxy.HAProxy.Enabled = true - cr.Spec.AllowUnsafeConfig = false cr.Spec.UpdateStrategy = appsv1.RollingUpdateStatefulSetStrategyType It("should read and create defautl cr.yaml", func() { Expect(err).NotTo(HaveOccurred()) @@ -416,7 +397,7 @@ var _ = Describe("Reconcile HAProxy", Ordered, func() { }, time.Second*15, time.Millisecond*250).Should(BeTrue()) cr.Spec.Proxy.HAProxy.Enabled = false - cr.Spec.AllowUnsafeConfig = true + cr.Spec.Unsafe.Proxy = true Expect(k8sClient.Update(ctx, cr)).Should(Succeed()) _, err = reconciler().Reconcile(ctx, ctrl.Request{NamespacedName: crNamespacedName}) diff --git a/pkg/controller/ps/status_test.go b/pkg/controller/ps/status_test.go index 602507577..c42ee211c 100644 --- a/pkg/controller/ps/status_test.go +++ b/pkg/controller/ps/status_test.go @@ -283,8 +283,9 @@ func TestReconcileStatusAsync(t *testing.T) { { name: "with all ready pods without orchestrator", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQL) { + cr.Spec.Unsafe.Orchestrator = true + cr.Spec.Unsafe.MySQLSize = true cr.Spec.Orchestrator.Enabled = false - cr.Spec.AllowUnsafeConfig = true cr.Spec.Proxy.HAProxy.Enabled = true cr.Spec.MySQL.Size = 1 cr.Generation = 1 @@ -324,7 +325,7 @@ func TestReconcileStatusAsync(t *testing.T) { name: "with all ready pods without haproxy", cr: updateResource(cr.DeepCopy(), func(cr *apiv1alpha1.PerconaServerMySQL) { cr.Spec.Orchestrator.Enabled = true - cr.Spec.AllowUnsafeConfig = true + cr.Spec.Unsafe.Proxy = true cr.Spec.Proxy.HAProxy.Enabled = false }), objects: appendSlices( diff --git a/pkg/controller/ps/version_test.go b/pkg/controller/ps/version_test.go index 91259c999..23f4aa164 100644 --- a/pkg/controller/ps/version_test.go +++ b/pkg/controller/ps/version_test.go @@ -74,6 +74,7 @@ func TestReconcileVersions(t *testing.T) { }, MySQL: apiv1alpha1.MySQLSpec{ PodSpec: apiv1alpha1.PodSpec{ + Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ Resources: corev1.VolumeResourceRequirements{ @@ -85,6 +86,13 @@ func TestReconcileVersions(t *testing.T) { }, }, }, + Proxy: apiv1alpha1.ProxySpec{ + HAProxy: &apiv1alpha1.HAProxySpec{ + PodSpec: apiv1alpha1.PodSpec{ + Size: 2, + }, + }, + }, UpgradeOptions: apiv1alpha1.UpgradeOptions{ Apply: apiv1alpha1.UpgradeStrategyDisabled, VersionServiceEndpoint: defaultEndpoint, @@ -108,6 +116,7 @@ func TestReconcileVersions(t *testing.T) { }, MySQL: apiv1alpha1.MySQLSpec{ PodSpec: apiv1alpha1.PodSpec{ + Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ Resources: corev1.VolumeResourceRequirements{ @@ -119,6 +128,13 @@ func TestReconcileVersions(t *testing.T) { }, }, }, + Proxy: apiv1alpha1.ProxySpec{ + HAProxy: &apiv1alpha1.HAProxySpec{ + PodSpec: apiv1alpha1.PodSpec{ + Size: 2, + }, + }, + }, UpgradeOptions: apiv1alpha1.UpgradeOptions{ Apply: apiv1alpha1.UpgradeStrategyDisabled, VersionServiceEndpoint: defaultEndpoint, @@ -142,6 +158,7 @@ func TestReconcileVersions(t *testing.T) { }, MySQL: apiv1alpha1.MySQLSpec{ PodSpec: apiv1alpha1.PodSpec{ + Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ Resources: corev1.VolumeResourceRequirements{ @@ -153,6 +170,13 @@ func TestReconcileVersions(t *testing.T) { }, }, }, + Proxy: apiv1alpha1.ProxySpec{ + HAProxy: &apiv1alpha1.HAProxySpec{ + PodSpec: apiv1alpha1.PodSpec{ + Size: 2, + }, + }, + }, UpgradeOptions: apiv1alpha1.UpgradeOptions{ Apply: apiv1alpha1.UpgradeStrategyRecommended, VersionServiceEndpoint: customEndpoint, @@ -177,6 +201,7 @@ func TestReconcileVersions(t *testing.T) { }, MySQL: apiv1alpha1.MySQLSpec{ PodSpec: apiv1alpha1.PodSpec{ + Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ Resources: corev1.VolumeResourceRequirements{ @@ -188,6 +213,13 @@ func TestReconcileVersions(t *testing.T) { }, }, }, + Proxy: apiv1alpha1.ProxySpec{ + HAProxy: &apiv1alpha1.HAProxySpec{ + PodSpec: apiv1alpha1.PodSpec{ + Size: 2, + }, + }, + }, UpgradeOptions: apiv1alpha1.UpgradeOptions{ Apply: apiv1alpha1.UpgradeStrategyRecommended, VersionServiceEndpoint: defaultEndpoint, @@ -309,6 +341,7 @@ func TestGetVersion(t *testing.T) { }, MySQL: apiv1alpha1.MySQLSpec{ PodSpec: apiv1alpha1.PodSpec{ + Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimSpec{ Resources: corev1.VolumeResourceRequirements{ @@ -320,6 +353,13 @@ func TestGetVersion(t *testing.T) { }, }, }, + Proxy: apiv1alpha1.ProxySpec{ + HAProxy: &apiv1alpha1.HAProxySpec{ + PodSpec: apiv1alpha1.PodSpec{ + Size: 2, + }, + }, + }, }, Status: apiv1alpha1.PerconaServerMySQLStatus{ MySQL: apiv1alpha1.StatefulAppStatus{ From 5f8a4794c66d6fc1ea14f99cf15b264a36a7be31 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Fri, 21 Jun 2024 13:19:27 +0200 Subject: [PATCH 162/192] K8SPS-307 fix smart update --- pkg/controller/ps/upgrade.go | 43 +++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index 15dfac3c8..b1b241ec0 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -97,7 +97,7 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app log.Info("apply changes to secondary pod", "pod", pod.Name) if pod.ObjectMeta.Labels[controllerRevisionHash] == sts.Status.UpdateRevision { - log.Info("pod updated updated", "pod", pod.Name) + log.Info("pod updated", "pod", pod.Name) continue } @@ -106,13 +106,46 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app log.Info("apply changes to primary pod", "pod", primPod.Name) - if primPod.ObjectMeta.Labels[controllerRevisionHash] == sts.Status.UpdateRevision { - log.Info("primary pod updated updated", "primPod name", primPod.Name) - log.Info("smart update finished") + if primPod.ObjectMeta.Labels[controllerRevisionHash] != sts.Status.UpdateRevision { + log.Info("primary pod was deleted", "pod", primPod.Name) + err = deletePod(ctx, r.Client, primPod, currentSet) + + if err != nil { + log.Info("primary pod deletion error", "pod", primPod.Name) + return err + } + } + + retriable := func(err error) bool { + return err != nil + } + + retry := k8sretry.DefaultRetry + retry.Duration = 5 * time.Second + retry.Steps = 10 + + err = k8sretry.OnError(retry, retriable, func() error { + + primPod, err := getMySQLPod(ctx, r.Client, cr, idx) + if err != nil { + return errors.Wrap(err, "get primary pod") + } + + if primPod.ObjectMeta.Labels[controllerRevisionHash] != sts.Status.UpdateRevision { + return errors.New("primary pod controllerRevisionHash not equal sts.Status.UpdateRevision") + } + return nil + }) + + if err != nil { + log.Info("smart update of primary pod did not finish correctly after 10 retries") return nil } - return deletePod(ctx, r.Client, primPod, currentSet) + log.Info("primary pod updated", "primPod name", primPod.Name) + log.Info("smart update finished") + return nil + } func stsChanged(sts *appsv1.StatefulSet, pods []corev1.Pod) bool { From 655c30e066b08c15a543c35954552c41f718cc75 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Fri, 21 Jun 2024 13:48:02 +0200 Subject: [PATCH 163/192] fix PR comments --- pkg/controller/ps/upgrade.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index b1b241ec0..fcc86bceb 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -2,6 +2,7 @@ package ps import ( "context" + "k8s.io/apimachinery/pkg/util/wait" "time" "github.com/pkg/errors" @@ -115,16 +116,14 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app return err } } - - retriable := func(err error) bool { - return err != nil + + backoff := wait.Backoff{ + Steps: 5, + Duration: 500 * time.Millisecond, + Factor: 5.0, + Jitter: 0.1, } - - retry := k8sretry.DefaultRetry - retry.Duration = 5 * time.Second - retry.Steps = 10 - - err = k8sretry.OnError(retry, retriable, func() error { + err = k8sretry.OnError(backoff, func(err error) bool { return err != nil }, func() error { primPod, err := getMySQLPod(ctx, r.Client, cr, idx) if err != nil { @@ -139,7 +138,7 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app if err != nil { log.Info("smart update of primary pod did not finish correctly after 10 retries") - return nil + return err } log.Info("primary pod updated", "primPod name", primPod.Name) From 2327071b8e05afd5ecadd95544a92dd2ed06f78e Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Fri, 21 Jun 2024 13:56:59 +0200 Subject: [PATCH 164/192] Update pkg/controller/ps/upgrade.go Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- pkg/controller/ps/upgrade.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index fcc86bceb..2d8efab53 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -116,7 +116,6 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app return err } } - backoff := wait.Backoff{ Steps: 5, Duration: 500 * time.Millisecond, From 72a6b79b558d46df5a19a8185f03405e37102537 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Fri, 21 Jun 2024 13:58:50 +0200 Subject: [PATCH 165/192] delete unnessary empty rows --- pkg/controller/ps/upgrade.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index 2d8efab53..c55a3870e 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -123,7 +123,6 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app Jitter: 0.1, } err = k8sretry.OnError(backoff, func(err error) bool { return err != nil }, func() error { - primPod, err := getMySQLPod(ctx, r.Client, cr, idx) if err != nil { return errors.Wrap(err, "get primary pod") From e5d6ea44db788d1e0d7fbfa116ff5efa1b89f374 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Fri, 21 Jun 2024 14:00:40 +0200 Subject: [PATCH 166/192] delete unnessary empty rows --- pkg/controller/ps/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index c55a3870e..46c7175d3 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -110,12 +110,12 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app if primPod.ObjectMeta.Labels[controllerRevisionHash] != sts.Status.UpdateRevision { log.Info("primary pod was deleted", "pod", primPod.Name) err = deletePod(ctx, r.Client, primPod, currentSet) - if err != nil { log.Info("primary pod deletion error", "pod", primPod.Name) return err } } + backoff := wait.Backoff{ Steps: 5, Duration: 500 * time.Millisecond, From 50b4e05fd12bbc8fa63e291ced49668bdeedf278 Mon Sep 17 00:00:00 2001 From: Natalia Marukovich Date: Fri, 21 Jun 2024 14:56:40 +0200 Subject: [PATCH 167/192] fix PR --- pkg/controller/ps/upgrade.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index 46c7175d3..82db50b7d 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -115,7 +115,7 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app return err } } - + backoff := wait.Backoff{ Steps: 5, Duration: 500 * time.Millisecond, @@ -135,11 +135,11 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app }) if err != nil { - log.Info("smart update of primary pod did not finish correctly after 10 retries") + log.Info("smart update of primary pod did not finish correctly after 5 retries") return err } - log.Info("primary pod updated", "primPod name", primPod.Name) + log.Info("primary pod updated", "pod", primPod.Name) log.Info("smart update finished") return nil From 1123dbe4e15b60b5e833fb5e3c1c47d476fa59c3 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Fri, 21 Jun 2024 19:43:37 +0300 Subject: [PATCH 168/192] K8SPS-340: set `initContainer` security context of restore job to `.spec.backup.containerSecuriryContext` (#675) * K8SPS-340: update initContainer security context of restore job https://perconadev.atlassian.net/browse/K8SPS-340 * use `containerSecurityContext` from `.spec.backup.storages[]` * check backup job in test --------- Co-authored-by: Viacheslav Sarzhan --- .../tests/gr-security-context/04-assert.yaml | 105 +++++++++++++---- .../tests/gr-security-context/05-assert.yaml | 41 +++---- .../tests/gr-security-context/06-assert.yaml | 37 +++--- ...5-delete-data.yaml => 06-delete-data.yaml} | 0 .../tests/gr-security-context/07-assert.yaml | 106 ++++++++++++++---- ...-minio.yaml => 07-restore-from-minio.yaml} | 0 .../tests/gr-security-context/08-assert.yaml | 25 +++++ .../tests/gr-security-context/09-assert.yaml | 24 ++++ .../{07-read-data.yaml => 09-read-data.yaml} | 0 pkg/xtrabackup/xtrabackup.go | 7 +- 10 files changed, 264 insertions(+), 81 deletions(-) rename e2e-tests/tests/gr-security-context/{05-delete-data.yaml => 06-delete-data.yaml} (100%) rename e2e-tests/tests/gr-security-context/{06-restore-from-minio.yaml => 07-restore-from-minio.yaml} (100%) create mode 100644 e2e-tests/tests/gr-security-context/08-assert.yaml create mode 100644 e2e-tests/tests/gr-security-context/09-assert.yaml rename e2e-tests/tests/gr-security-context/{07-read-data.yaml => 09-read-data.yaml} (100%) diff --git a/e2e-tests/tests/gr-security-context/04-assert.yaml b/e2e-tests/tests/gr-security-context/04-assert.yaml index 54c1d9065..8cf3feb93 100644 --- a/e2e-tests/tests/gr-security-context/04-assert.yaml +++ b/e2e-tests/tests/gr-security-context/04-assert.yaml @@ -2,24 +2,91 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert timeout: 300 --- -kind: PerconaServerMySQLBackup -apiVersion: ps.percona.com/v1alpha1 +apiVersion: batch/v1 +kind: Job metadata: - name: gr-security-context-minio + generation: 1 + labels: + app.kubernetes.io/component: xtrabackup + app.kubernetes.io/instance: gr-security-context + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: xb-gr-security-context-minio-minio +spec: + backoffLimit: 6 + completionMode: NonIndexed + completions: 1 + parallelism: 1 + suspend: false + template: + metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: xtrabackup + app.kubernetes.io/instance: gr-security-context + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + job-name: xb-gr-security-context-minio-minio + spec: + containers: + - command: + - /opt/percona/run-backup.sh + image: perconalab/percona-server-mysql-operator:main-backup + imagePullPolicy: Always + name: xtrabackup + resources: {} + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin + - mountPath: /var/lib/mysql + name: datadir + - mountPath: /etc/mysql/mysql-tls-secret + name: tls + dnsPolicy: ClusterFirst + initContainers: + - command: + - /opt/percona-server-mysql-operator/ps-init-entrypoint.sh + imagePullPolicy: Always + name: xtrabackup-init + resources: {} + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin + restartPolicy: Never + schedulerName: default-scheduler + securityContext: + fsGroup: 1001 + supplementalGroups: + - 1001 + - 1002 + - 1003 + setHostnameAsFQDN: true + shareProcessNamespace: true + terminationGracePeriodSeconds: 30 + volumes: + - emptyDir: {} + name: bin + - emptyDir: {} + name: datadir + - name: users + secret: + defaultMode: 420 + secretName: test-secrets + - name: tls + secret: + defaultMode: 420 + secretName: test-ssl status: - state: Succeeded - storage: - containerSecurityContext: - privileged: true - podSecurityContext: - fsGroup: 1001 - supplementalGroups: - - 1001 - - 1002 - - 1003 - s3: - bucket: operator-testing - credentialsSecret: minio-secret - endpointUrl: http://minio-service:9000 - region: us-east-1 - type: s3 + active: 1 + ready: 0 + uncountedTerminatedPods: {} diff --git a/e2e-tests/tests/gr-security-context/05-assert.yaml b/e2e-tests/tests/gr-security-context/05-assert.yaml index b9141ada3..54c1d9065 100644 --- a/e2e-tests/tests/gr-security-context/05-assert.yaml +++ b/e2e-tests/tests/gr-security-context/05-assert.yaml @@ -1,24 +1,25 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 30 +timeout: 300 --- -kind: ConfigMap -apiVersion: v1 +kind: PerconaServerMySQLBackup +apiVersion: ps.percona.com/v1alpha1 metadata: - name: 04-delete-data-minio-0 -data: - data: "" ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 04-delete-data-minio-1 -data: - data: "" ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 04-delete-data-minio-2 -data: - data: "" + name: gr-security-context-minio +status: + state: Succeeded + storage: + containerSecurityContext: + privileged: true + podSecurityContext: + fsGroup: 1001 + supplementalGroups: + - 1001 + - 1002 + - 1003 + s3: + bucket: operator-testing + credentialsSecret: minio-secret + endpointUrl: http://minio-service:9000 + region: us-east-1 + type: s3 diff --git a/e2e-tests/tests/gr-security-context/06-assert.yaml b/e2e-tests/tests/gr-security-context/06-assert.yaml index f49e9b323..b9141ada3 100644 --- a/e2e-tests/tests/gr-security-context/06-assert.yaml +++ b/e2e-tests/tests/gr-security-context/06-assert.yaml @@ -1,25 +1,24 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 500 +timeout: 30 --- -apiVersion: ps.percona.com/v1alpha1 -kind: PerconaServerMySQL +kind: ConfigMap +apiVersion: v1 metadata: - name: gr-security-context -status: - haproxy: - ready: 3 - size: 3 - state: ready - mysql: - ready: 3 - size: 3 - state: ready - state: ready + name: 04-delete-data-minio-0 +data: + data: "" --- -kind: PerconaServerMySQLRestore -apiVersion: ps.percona.com/v1alpha1 +kind: ConfigMap +apiVersion: v1 metadata: - name: gr-security-context-restore-minio -status: - state: Succeeded + name: 04-delete-data-minio-1 +data: + data: "" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 04-delete-data-minio-2 +data: + data: "" diff --git a/e2e-tests/tests/gr-security-context/05-delete-data.yaml b/e2e-tests/tests/gr-security-context/06-delete-data.yaml similarity index 100% rename from e2e-tests/tests/gr-security-context/05-delete-data.yaml rename to e2e-tests/tests/gr-security-context/06-delete-data.yaml diff --git a/e2e-tests/tests/gr-security-context/07-assert.yaml b/e2e-tests/tests/gr-security-context/07-assert.yaml index 17deff5a9..924bf5013 100644 --- a/e2e-tests/tests/gr-security-context/07-assert.yaml +++ b/e2e-tests/tests/gr-security-context/07-assert.yaml @@ -1,24 +1,90 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 30 +timeout: 500 --- -kind: ConfigMap -apiVersion: v1 +apiVersion: batch/v1 +kind: Job metadata: - name: 06-read-data-minio-0 -data: - data: "100500" ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 06-read-data-minio-1 -data: - data: "100500" ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: 06-read-data-minio-2 -data: - data: "100500" + annotations: + batch.kubernetes.io/job-tracking: "" + generation: 1 + labels: + app.kubernetes.io/component: xtrabackup + app.kubernetes.io/instance: gr-security-context + app.kubernetes.io/managed-by: percona-server-operator + app.kubernetes.io/name: percona-server + app.kubernetes.io/part-of: percona-server + name: xb-restore-gr-security-context-restore-minio +spec: + backoffLimit: 4 + completionMode: NonIndexed + completions: 1 + parallelism: 1 + suspend: false + template: + spec: + containers: + - command: + - /opt/percona/run-restore.sh + image: perconalab/percona-server-mysql-operator:main-backup + imagePullPolicy: Always + name: xtrabackup + resources: {} + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin + - mountPath: /var/lib/mysql + name: datadir + - mountPath: /etc/mysql/mysql-tls-secret + name: tls + dnsPolicy: ClusterFirst + initContainers: + - command: + - /opt/percona-server-mysql-operator/ps-init-entrypoint.sh + imagePullPolicy: Always + name: xtrabackup-init + resources: {} + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin + - mountPath: /var/lib/mysql + name: datadir + - mountPath: /etc/mysql/mysql-users-secret + name: users + - mountPath: /etc/mysql/mysql-tls-secret + name: tls + restartPolicy: Never + schedulerName: default-scheduler + securityContext: + fsGroup: 1001 + supplementalGroups: + - 1001 + - 1002 + - 1003 + terminationGracePeriodSeconds: 30 + volumes: + - emptyDir: {} + name: bin + - name: datadir + persistentVolumeClaim: + claimName: datadir-gr-security-context-mysql-0 + - name: users + secret: + defaultMode: 420 + secretName: test-secrets + - name: tls + secret: + defaultMode: 420 + secretName: test-ssl +status: + active: 1 + ready: 0 + uncountedTerminatedPods: {} diff --git a/e2e-tests/tests/gr-security-context/06-restore-from-minio.yaml b/e2e-tests/tests/gr-security-context/07-restore-from-minio.yaml similarity index 100% rename from e2e-tests/tests/gr-security-context/06-restore-from-minio.yaml rename to e2e-tests/tests/gr-security-context/07-restore-from-minio.yaml diff --git a/e2e-tests/tests/gr-security-context/08-assert.yaml b/e2e-tests/tests/gr-security-context/08-assert.yaml new file mode 100644 index 000000000..f49e9b323 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/08-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 500 +--- +apiVersion: ps.percona.com/v1alpha1 +kind: PerconaServerMySQL +metadata: + name: gr-security-context +status: + haproxy: + ready: 3 + size: 3 + state: ready + mysql: + ready: 3 + size: 3 + state: ready + state: ready +--- +kind: PerconaServerMySQLRestore +apiVersion: ps.percona.com/v1alpha1 +metadata: + name: gr-security-context-restore-minio +status: + state: Succeeded diff --git a/e2e-tests/tests/gr-security-context/09-assert.yaml b/e2e-tests/tests/gr-security-context/09-assert.yaml new file mode 100644 index 000000000..17deff5a9 --- /dev/null +++ b/e2e-tests/tests/gr-security-context/09-assert.yaml @@ -0,0 +1,24 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-0 +data: + data: "100500" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-1 +data: + data: "100500" +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: 06-read-data-minio-2 +data: + data: "100500" diff --git a/e2e-tests/tests/gr-security-context/07-read-data.yaml b/e2e-tests/tests/gr-security-context/09-read-data.yaml similarity index 100% rename from e2e-tests/tests/gr-security-context/07-read-data.yaml rename to e2e-tests/tests/gr-security-context/09-read-data.yaml diff --git a/pkg/xtrabackup/xtrabackup.go b/pkg/xtrabackup/xtrabackup.go index 2bc7475f5..2c48d537a 100644 --- a/pkg/xtrabackup/xtrabackup.go +++ b/pkg/xtrabackup/xtrabackup.go @@ -104,7 +104,7 @@ func Job( componentName, initImage, cluster.Spec.Backup.ImagePullPolicy, - cluster.Spec.Backup.ContainerSecurityContext, + storage.ContainerSecurityContext, ), }, Containers: []corev1.Container{ @@ -322,7 +322,7 @@ func RestoreJob( { Name: componentName + "-init", Image: initImage, - ImagePullPolicy: cluster.Spec.MySQL.ImagePullPolicy, + ImagePullPolicy: cluster.Spec.Backup.ImagePullPolicy, VolumeMounts: []corev1.VolumeMount{ { Name: apiv1alpha1.BinVolumeName, @@ -344,7 +344,7 @@ func RestoreJob( Command: []string{"/opt/percona-server-mysql-operator/ps-init-entrypoint.sh"}, TerminationMessagePath: "/dev/termination-log", TerminationMessagePolicy: corev1.TerminationMessageReadFile, - SecurityContext: cluster.Spec.MySQL.ContainerSecurityContext, + SecurityContext: storage.ContainerSecurityContext, }, }, Containers: []corev1.Container{ @@ -358,6 +358,7 @@ func RestoreJob( PriorityClassName: storage.PriorityClassName, RuntimeClassName: storage.RuntimeClassName, DNSPolicy: corev1.DNSClusterFirst, + SecurityContext: storage.PodSecurityContext, Volumes: []corev1.Volume{ { Name: apiv1alpha1.BinVolumeName, From 34fc8bfd49181326b9c298e831b0d12ec91d7edf Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Mon, 24 Jun 2024 10:22:30 +0200 Subject: [PATCH 169/192] K8SPS-43: Include async replication status in the status reconciliation (#667) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Check is async replication ready. * Refactor - rename orchestrator '*exec' functions. * Update e2e test. * Update unit tests. * Check for specific replication problems and record a event if any issue happens. * Increase timeout. * Update e2e-tests/tests/init-deploy/06-check-async-repl-not-ready-cr-status.yaml Co-authored-by: Ege Güneş * Update e2e-tests/tests/init-deploy/06-check-async-repl-not-ready-cr-status.yaml Co-authored-by: Ege Güneş * Scaling down step timeout. * Fix wrong getOrcPod function. * Forget removed instances. * Cleanup --------- Co-authored-by: Viacheslav Sarzhan Co-authored-by: Ege Güneş --- ...-check-async-repl-not-ready-cr-status.yaml | 37 +++++++++ ...-leak.yaml => 07-check-password-leak.yaml} | 0 e2e-tests/tests/scaling/08-scale-down.yaml | 1 + pkg/controller/ps/controller.go | 47 ++++++++--- pkg/controller/ps/status.go | 63 +++++++++++++-- pkg/controller/ps/status_test.go | 68 ++++++++++++++-- pkg/controller/psbackup/topology.go | 2 +- pkg/orchestrator/{clientexec.go => client.go} | 77 +++++++++++++++---- 8 files changed, 259 insertions(+), 36 deletions(-) create mode 100644 e2e-tests/tests/init-deploy/06-check-async-repl-not-ready-cr-status.yaml rename e2e-tests/tests/init-deploy/{06-check-password-leak.yaml => 07-check-password-leak.yaml} (100%) rename pkg/orchestrator/{clientexec.go => client.go} (69%) diff --git a/e2e-tests/tests/init-deploy/06-check-async-repl-not-ready-cr-status.yaml b/e2e-tests/tests/init-deploy/06-check-async-repl-not-ready-cr-status.yaml new file mode 100644 index 000000000..30fda3d0b --- /dev/null +++ b/e2e-tests/tests/init-deploy/06-check-async-repl-not-ready-cr-status.yaml @@ -0,0 +1,37 @@ + +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 30 +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + state=$(kubectl -n ${NAMESPACE} get ps $(get_cluster_name) -o jsonpath='{.status.state}') + if [[ "$state" != "ready" ]]; then + echo "Status state should be ready, but is $state." + exit 1 + fi + + + run_mysqlsh "STOP REPLICA;" "-h localhost -P 33060 -uroot -proot_password" "init-deploy-mysql-2" + + sleep 20 + + state=$(kubectl -n ${NAMESPACE} get ps $(get_cluster_name) -o jsonpath='{.status.state}') + if [[ "$state" != "initializing" ]]; then + echo "Status state should be initializing, but is $state." + exit 1 + fi + + run_mysqlsh "START REPLICA;" "-h localhost -P 33060 -uroot -proot_password" "init-deploy-mysql-2" + + sleep 20 + + state=$(kubectl -n ${NAMESPACE} get ps $(get_cluster_name) -o jsonpath='{.status.state}') + if [[ "$state" != "ready" ]]; then + echo "Status state should be ready, but is $state." + exit 1 + fi diff --git a/e2e-tests/tests/init-deploy/06-check-password-leak.yaml b/e2e-tests/tests/init-deploy/07-check-password-leak.yaml similarity index 100% rename from e2e-tests/tests/init-deploy/06-check-password-leak.yaml rename to e2e-tests/tests/init-deploy/07-check-password-leak.yaml diff --git a/e2e-tests/tests/scaling/08-scale-down.yaml b/e2e-tests/tests/scaling/08-scale-down.yaml index 1f2fd47b4..4d08b358f 100644 --- a/e2e-tests/tests/scaling/08-scale-down.yaml +++ b/e2e-tests/tests/scaling/08-scale-down.yaml @@ -1,5 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep +timeout: 120 commands: - script: |- set -o errexit diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 19bd5aa31..c54ce9528 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -194,7 +194,7 @@ func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr * } log.Info("Ensuring oldest mysql node is the primary") - err = orchestrator.EnsureNodeIsPrimaryExec(ctx, r.ClientCmd, orcPod, cr.ClusterHint(), firstPod.GetName(), mysql.DefaultPort) + err = orchestrator.EnsureNodeIsPrimary(ctx, r.ClientCmd, orcPod, cr.ClusterHint(), firstPod.GetName(), mysql.DefaultPort) if err != nil { return errors.Wrap(err, "ensure node is primary") } @@ -645,7 +645,7 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context for _, peer := range newPeers { p := peer g.Go(func() error { - return orchestrator.AddPeerExec(gCtx, r.ClientCmd, orcPod, p) + return orchestrator.AddPeer(gCtx, r.ClientCmd, orcPod, p) }) } @@ -656,7 +656,7 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context for _, peer := range oldPeers { p := peer g.Go(func() error { - return orchestrator.RemovePeerExec(gCtx, r.ClientCmd, orcPod, p) + return orchestrator.RemovePeer(gCtx, r.ClientCmd, orcPod, p) }) } @@ -789,7 +789,7 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, return nil } - if err := orchestrator.DiscoverExec(ctx, r.ClientCmd, pod, mysql.ServiceName(cr), mysql.DefaultPort); err != nil { + if err := orchestrator.Discover(ctx, r.ClientCmd, pod, mysql.ServiceName(cr), mysql.DefaultPort); err != nil { switch err.Error() { case "Unauthorized": log.Info("mysql is not ready, unauthorized orchestrator discover response. skip") @@ -801,7 +801,7 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, return errors.Wrap(err, "failed to discover cluster") } - primary, err := orchestrator.ClusterPrimaryExec(ctx, r.ClientCmd, pod, cr.ClusterHint()) + primary, err := orchestrator.ClusterPrimary(ctx, r.ClientCmd, pod, cr.ClusterHint()) if err != nil { return errors.Wrap(err, "get cluster primary") } @@ -812,11 +812,40 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, // orchestrator doesn't attempt to recover from NonWriteableMaster if there's only 1 MySQL pod if cr.MySQLSpec().Size == 1 && primary.ReadOnly { - if err := orchestrator.SetWriteableExec(ctx, r.ClientCmd, pod, primary.Key.Hostname, int(primary.Key.Port)); err != nil { + if err := orchestrator.SetWriteable(ctx, r.ClientCmd, pod, primary.Key.Hostname, int(primary.Key.Port)); err != nil { return errors.Wrapf(err, "set %s writeable", primary.Key.Hostname) } } + clusterInstances, err := orchestrator.Cluster(ctx, r.ClientCmd, pod, cr.ClusterHint()) + if err != nil { + return errors.Wrap(err, "get cluster instances") + } + + // In the case of a cluster downscale, we need to forget replicas that are not part of the cluster + if len(clusterInstances) > int(cr.MySQLSpec().Size) { + mysqlPods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) + if err != nil { + return errors.Wrap(err, "get mysql pods") + } + + podSet := make(map[string]struct{}, len(mysqlPods)) + for _, p := range mysqlPods { + podSet[p.Name] = struct{}{} + } + for _, instance := range clusterInstances { + if _, ok := podSet[instance.Alias]; ok { + continue + } + + log.Info("Forgeting replica", "replica", instance.Alias) + err := orchestrator.ForgetInstance(ctx, r.ClientCmd, pod, instance.Alias, int(instance.Key.Port)) + if err != nil { + return errors.Wrapf(err, "forget replica %s", instance.Alias) + } + } + } + return nil } @@ -1027,7 +1056,7 @@ func (r *PerconaServerMySQLReconciler) getPrimaryFromOrchestrator(ctx context.Co if err != nil { return nil, err } - primary, err := orchestrator.ClusterPrimaryExec(ctx, r.ClientCmd, pod, cr.ClusterHint()) + primary, err := orchestrator.ClusterPrimary(ctx, r.ClientCmd, pod, cr.ClusterHint()) if err != nil { return nil, errors.Wrap(err, "get cluster primary") } @@ -1100,7 +1129,7 @@ func (r *PerconaServerMySQLReconciler) stopAsyncReplication(ctx context.Context, } repDb := database.NewReplicationManager(pod, r.ClientCmd, apiv1alpha1.UserOperator, operatorPass, hostname) - if err := orchestrator.StopReplicationExec(gCtx, r.ClientCmd, orcPod, hostname, port); err != nil { + if err := orchestrator.StopReplication(gCtx, r.ClientCmd, orcPod, hostname, port); err != nil { return errors.Wrapf(err, "stop replica %s", hostname) } @@ -1159,7 +1188,7 @@ func (r *PerconaServerMySQLReconciler) startAsyncReplication(ctx context.Context return errors.Wrapf(err, "change replication source on %s", hostname) } - if err := orchestrator.StartReplicationExec(gCtx, r.ClientCmd, orcPod, hostname, port); err != nil { + if err := orchestrator.StartReplication(gCtx, r.ClientCmd, orcPod, hostname, port); err != nil { return errors.Wrapf(err, "start replication on %s", hostname) } diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index a1991b9be..34c9c1d3c 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -3,6 +3,7 @@ package ps import ( "bytes" "context" + "fmt" "strings" "github.com/pkg/errors" @@ -65,13 +66,28 @@ func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr } cr.Status.MySQL = mysqlStatus - if mysqlStatus.State == apiv1alpha1.StateReady && cr.Spec.MySQL.IsGR() { - ready, err := r.isGRReady(ctx, cr) - if err != nil { - return errors.Wrap(err, "check if GR ready") + if mysqlStatus.State == apiv1alpha1.StateReady { + if cr.Spec.MySQL.IsGR() { + ready, err := r.isGRReady(ctx, cr) + if err != nil { + return errors.Wrap(err, "check if GR is ready") + } + if !ready { + mysqlStatus.State = apiv1alpha1.StateInitializing + } } - if !ready { - mysqlStatus.State = apiv1alpha1.StateInitializing + + if cr.Spec.MySQL.IsAsync() && cr.OrchestratorEnabled() { + ready, msg, err := r.isAsyncReady(ctx, cr) + if err != nil { + return errors.Wrap(err, "check if async is ready") + } + if !ready { + mysqlStatus.State = apiv1alpha1.StateInitializing + + r.Recorder.Event(cr, "Warning", "AsyncReplicationNotReady", msg) + + } } } cr.Status.MySQL = mysqlStatus @@ -257,6 +273,41 @@ func (r *PerconaServerMySQLReconciler) isGRReady(ctx context.Context, cr *apiv1a return true, nil } +func (r *PerconaServerMySQLReconciler) isAsyncReady(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) (bool, string, error) { + pod, err := getReadyOrcPod(ctx, r.Client, cr) + if err != nil { + return false, "", err + } + + instances, err := orchestrator.Cluster(ctx, r.ClientCmd, pod, cr.ClusterHint()) + if err != nil { + return false, "", err + } + + problems := make(map[string][]string) + + for _, i := range instances { + if len(i.Problems) > 0 { + problems[i.Alias] = i.Problems + } + } + + // formatMessage formats a map of problems to a message like + // 'cluster1-mysql-1:[not_replicating, replication_lag], cluster1-mysql-2:[not_replicating]' + formatMessage := func(problems map[string][]string) string { + var sb strings.Builder + for k, v := range problems { + joinedValues := strings.Join(v, ", ") + sb.WriteString(fmt.Sprintf("%s: [%s], ", k, joinedValues)) + } + + return strings.TrimRight(sb.String(), ", ") + } + + msg := formatMessage(problems) + return msg == "", msg, nil +} + func (r *PerconaServerMySQLReconciler) allLoadBalancersReady(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) (bool, error) { opts := &client.ListOptions{Namespace: cr.Namespace, LabelSelector: labels.SelectorFromSet(cr.Labels())} svcList := &corev1.ServiceList{} diff --git a/pkg/controller/ps/status_test.go b/pkg/controller/ps/status_test.go index c42ee211c..0869e450e 100644 --- a/pkg/controller/ps/status_test.go +++ b/pkg/controller/ps/status_test.go @@ -5,6 +5,7 @@ import ( "context" "database/sql" "encoding/csv" + "encoding/json" "fmt" "io" "reflect" @@ -97,9 +98,12 @@ func TestReconcileStatusAsync(t *testing.T) { }, }, { - name: "with 3 ready mysql pods", - cr: cr, - objects: makeFakeReadyPods(cr, 3, "mysql"), + name: "with 3 ready mysql pods", + cr: cr, + objects: appendSlices( + makeFakeReadyPods(cr, 3, "mysql"), + makeFakeReadyPods(cr, 3, "orchestrator"), + ), expected: apiv1alpha1.PerconaServerMySQLStatus{ MySQL: apiv1alpha1.StatefulAppStatus{ Size: 3, @@ -108,7 +112,8 @@ func TestReconcileStatusAsync(t *testing.T) { }, Orchestrator: apiv1alpha1.StatefulAppStatus{ Size: 3, - State: apiv1alpha1.StateInitializing, + Ready: 3, + State: apiv1alpha1.StateReady, }, HAProxy: apiv1alpha1.StatefulAppStatus{ Size: 3, @@ -366,14 +371,21 @@ func TestReconcileStatusAsync(t *testing.T) { cr := tt.cr.DeepCopy() cb := fake.NewClientBuilder().WithScheme(scheme).WithObjects(cr).WithStatusSubresource(cr).WithObjects(tt.objects...).WithStatusSubresource(tt.objects...) + cliCmd, err := getFakeOrchestratorClient(cr) + if err != nil { + t.Fatal(err) + } + r := &PerconaServerMySQLReconciler{ - Client: cb.Build(), - Scheme: scheme, + Client: cb.Build(), + Scheme: scheme, + ClientCmd: cliCmd, ServerVersion: &platform.ServerVersion{ Platform: platform.PlatformKubernetes, }, } - err := r.reconcileCRStatus(ctx, cr, nil) + + err = r.reconcileCRStatus(ctx, cr, nil) if err != nil { t.Fatal(err) } @@ -1121,6 +1133,48 @@ func getFakeClient(cr *apiv1alpha1.PerconaServerMySQL, mysqlMemberStates []innod stderr: []byte("No such file or directory"), err: errors.New("fake error"), }) + + return &fakeClient{ + scripts: scripts, + }, nil +} + +func getFakeOrchestratorClient(cr *apiv1alpha1.PerconaServerMySQL) (clientcmd.Client, error) { + var scripts []fakeClientScript + + // Get async cluster from Orchestrator + orcClusterScript := func() fakeClientScript { + instances := []*orchestrator.Instance{ + { + Alias: "mysql-host-0", + Problems: []string{}, + }, + { + Alias: "mysql-host-1", + Problems: []string{}, + }, + { + Alias: "mysql-host-2", + Problems: []string{}, + }, + } + + res, err := json.Marshal(&instances) + if err != nil { + panic(err) + } + + return fakeClientScript{ + cmd: []string{ + "curl", + fmt.Sprintf("localhost:%d/%s", 3000, fmt.Sprintf("api/cluster/%s", cr.Name+"."+cr.Namespace)), + }, + stdout: res, + } + } + + scripts = append(scripts, orcClusterScript()) + return &fakeClient{ scripts: scripts, }, nil diff --git a/pkg/controller/psbackup/topology.go b/pkg/controller/psbackup/topology.go index 02087120d..11742eba6 100644 --- a/pkg/controller/psbackup/topology.go +++ b/pkg/controller/psbackup/topology.go @@ -55,7 +55,7 @@ func getDBTopology(ctx context.Context, cli client.Client, cliCmd clientcmd.Clie return topology{}, err } - primary, err := orchestrator.ClusterPrimaryExec(ctx, cliCmd, pod, cluster.ClusterHint()) + primary, err := orchestrator.ClusterPrimary(ctx, cliCmd, pod, cluster.ClusterHint()) if err != nil { return topology{}, errors.Wrap(err, "get primary") diff --git a/pkg/orchestrator/clientexec.go b/pkg/orchestrator/client.go similarity index 69% rename from pkg/orchestrator/clientexec.go rename to pkg/orchestrator/client.go index 046eac244..d02621548 100644 --- a/pkg/orchestrator/clientexec.go +++ b/pkg/orchestrator/client.go @@ -29,6 +29,7 @@ type Instance struct { MasterKey InstanceKey `json:"MasterKey"` Replicas []InstanceKey `json:"Replicas"` ReadOnly bool `json:"ReadOnly"` + Problems []string `json:"Problems"` } var ErrEmptyResponse = errors.New("empty response") @@ -43,7 +44,7 @@ func exec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, endpoin return nil } -func ClusterPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint string) (*Instance, error) { +func ClusterPrimary(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint string) (*Instance, error) { url := fmt.Sprintf("api/master/%s", clusterHint) var res, errb bytes.Buffer @@ -71,7 +72,7 @@ func ClusterPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev return primary, nil } -func StopReplicationExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int32) error { +func StopReplication(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int32) error { url := fmt.Sprintf("api/stop-replica/%s/%d", host, port) var res, errb bytes.Buffer @@ -92,7 +93,7 @@ func StopReplicationExec(ctx context.Context, cliCmd clientcmd.Client, pod *core return nil } -func StartReplicationExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int32) error { +func StartReplication(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int32) error { url := fmt.Sprintf("api/start-replica/%s/%d", host, port) var res, errb bytes.Buffer @@ -113,7 +114,7 @@ func StartReplicationExec(ctx context.Context, cliCmd clientcmd.Client, pod *cor return nil } -func AddPeerExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error { +func AddPeer(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error { url := fmt.Sprintf("api/raft-add-peer/%s", peer) var res, errb bytes.Buffer @@ -142,7 +143,7 @@ func AddPeerExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, return nil } -func RemovePeerExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error { +func RemovePeer(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error { url := fmt.Sprintf("api/raft-remove-peer/%s", peer) var res, errb bytes.Buffer @@ -171,8 +172,8 @@ func RemovePeerExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Po return nil } -func EnsureNodeIsPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint, host string, port int) error { - primary, err := ClusterPrimaryExec(ctx, cliCmd, pod, clusterHint) +func EnsureNodeIsPrimary(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint, host string, port int) error { + primary, err := ClusterPrimary(ctx, cliCmd, pod, clusterHint) if err != nil { return errors.Wrap(err, "get cluster primary") } @@ -181,7 +182,6 @@ func EnsureNodeIsPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod * return nil } - // /api/graceful-master-takeover-auto/cluster1.default/cluster1-mysql-0/3306 url := fmt.Sprintf("api/graceful-master-takeover-auto/%s/%s/%d", clusterHint, host, port) var res, errb bytes.Buffer @@ -196,9 +196,6 @@ func EnsureNodeIsPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod * if err := json.Unmarshal(body, orcResp); err != nil { return errors.Wrapf(err, "json decode \"%s\"", string(body)) } - // if err := json.NewDecoder(res.Bytes()).Decode(orcResp); err != nil { - // return errors.Wrap(err, "json decode") - // } if orcResp.Code == "ERROR" { return errors.New(orcResp.Message) @@ -207,7 +204,7 @@ func EnsureNodeIsPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod * return nil } -func DiscoverExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error { +func Discover(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error { url := fmt.Sprintf("api/discover/%s/%d", host, port) var res, errb bytes.Buffer @@ -233,7 +230,7 @@ func DiscoverExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, return nil } -func SetWriteableExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error { +func SetWriteable(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error { url := fmt.Sprintf("api/set-writeable/%s/%d", host, port) var res, errb bytes.Buffer @@ -258,3 +255,57 @@ func SetWriteableExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1. } return nil } + +func Cluster(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint string) ([]*Instance, error) { + url := fmt.Sprintf("api/cluster/%s", clusterHint) + + var res, errb bytes.Buffer + err := exec(ctx, cliCmd, pod, url, &res, &errb) + if err != nil { + return nil, err + } + + body := res.Bytes() + + instances := []*Instance{} + if err := json.Unmarshal(body, &instances); err == nil { + return instances, nil + } + + orcResp := &orcResponse{} + if err := json.Unmarshal(body, orcResp); err != nil { + return nil, errors.Wrap(err, "json decode") + } + + if orcResp.Code == "ERROR" { + return nil, errors.New(orcResp.Message) + } + + return instances, nil +} + +func ForgetInstance(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error { + url := fmt.Sprintf("api/forget/%s/%d", host, port) + + var res, errb bytes.Buffer + err := exec(ctx, cliCmd, pod, url, &res, &errb) + if err != nil { + return err + } + + orcResp := new(orcResponse) + body := res.Bytes() + + if len(body) == 0 { + return ErrEmptyResponse + } + + if err := json.Unmarshal(body, orcResp); err != nil { + return errors.Wrapf(err, "json decode \"%s\"", string(body)) + } + + if orcResp.Code == "ERROR" { + return errors.New(orcResp.Message) + } + return nil +} From 5335a712cdccf11db61f1b4ca5db2872ae017991 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Mon, 24 Jun 2024 14:44:16 +0200 Subject: [PATCH 170/192] K8SPS-241: Cluster-wide support (#673) * Generate cw-* files. * Fix env var. * Fix kustomize. * Regenerate cw files. * Update deploy_operator test function. * Get correct client. * Fix import. * Check OPERATOR_NS env var in tests. * Regenerate cw files. * Remove operator_ns env var for pmm and minio. * Update tests. * Update tests. * Fix test. * Fix tests. * remove comment --- Makefile | 7 + cmd/manager/main.go | 3 +- .../cluster/controller_manager_config.yaml | 11 + config/manager/cluster/kustomization.yaml | 16 + config/manager/cluster/manager.yaml | 61 + config/rbac/cluster/kustomization copy.yaml | 14 + config/rbac/cluster/kustomization.yaml | 14 + config/rbac/cluster/leader_election_role.yaml | 37 + .../cluster/leader_election_role_binding.yaml | 11 + config/rbac/cluster/orchestrator_role.yaml | 19 + .../cluster/orchestrator_role_binding.yaml | 11 + .../cluster/orchestrator_service_account.yaml | 4 + config/rbac/cluster/role.yaml | 135 + config/rbac/cluster/role_binding.yaml | 12 + config/rbac/cluster/service_account.yaml | 4 + config/rbac/orchestrator_role.yaml | 2 +- config/rbac/orchestrator_role_binding.yaml | 4 +- deploy/bundle.yaml | 50 +- deploy/cw-bundle.yaml | 10389 ++++++++++++++++ deploy/cw-operator.yaml | 79 + deploy/cw-rbac.yaml | 238 + deploy/rbac.yaml | 50 +- e2e-tests/functions | 68 +- .../demand-backup/01-deploy-operator.yaml | 2 +- .../gr-demand-backup/01-deploy-operator.yaml | 2 +- .../01-deploy-operator.yaml | 2 +- 26 files changed, 11159 insertions(+), 86 deletions(-) create mode 100644 config/manager/cluster/controller_manager_config.yaml create mode 100644 config/manager/cluster/kustomization.yaml create mode 100644 config/manager/cluster/manager.yaml create mode 100644 config/rbac/cluster/kustomization copy.yaml create mode 100644 config/rbac/cluster/kustomization.yaml create mode 100644 config/rbac/cluster/leader_election_role.yaml create mode 100644 config/rbac/cluster/leader_election_role_binding.yaml create mode 100644 config/rbac/cluster/orchestrator_role.yaml create mode 100644 config/rbac/cluster/orchestrator_role_binding.yaml create mode 100644 config/rbac/cluster/orchestrator_service_account.yaml create mode 100644 config/rbac/cluster/role.yaml create mode 100644 config/rbac/cluster/role_binding.yaml create mode 100644 config/rbac/cluster/service_account.yaml create mode 100644 deploy/cw-bundle.yaml create mode 100644 deploy/cw-operator.yaml create mode 100644 deploy/cw-rbac.yaml diff --git a/Makefile b/Makefile index 81a1f128e..b4332ddbf 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,13 @@ manifests: kustomize generate echo "---" >> $(DEPLOYDIR)/operator.yaml cat $(DEPLOYDIR)/crd.yaml $(DEPLOYDIR)/rbac.yaml $(DEPLOYDIR)/operator.yaml > $(DEPLOYDIR)/bundle.yaml + $(KUSTOMIZE) build config/rbac/cluster/ > $(DEPLOYDIR)/cw-rbac.yaml + echo "---" >> $(DEPLOYDIR)/cw-rbac.yaml + cd config/manager/cluster && $(KUSTOMIZE) edit set image perconalab/percona-server-mysql-operator=$(IMAGE) + $(KUSTOMIZE) build config/manager/cluster/ > $(DEPLOYDIR)/cw-operator.yaml + echo "---" >> $(DEPLOYDIR)/cw-operator.yaml + cat $(DEPLOYDIR)/crd.yaml $(DEPLOYDIR)/cw-rbac.yaml $(DEPLOYDIR)/cw-operator.yaml > $(DEPLOYDIR)/cw-bundle.yaml + gen-versionservice-client: swagger rm pkg/version/service/version.swagger.yaml curl https://raw.githubusercontent.com/Percona-Lab/percona-version-service/main/api/version.swagger.yaml --output pkg/version/service/version.swagger.yaml diff --git a/cmd/manager/main.go b/cmd/manager/main.go index a29df5643..a221da498 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -35,7 +35,6 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" - "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" metricsServer "sigs.k8s.io/controller-runtime/pkg/metrics/server" @@ -134,7 +133,7 @@ func main() { os.Exit(1) } - nsClient := client.NewNamespacedClient(mgr.GetClient(), namespace) + nsClient := mgr.GetClient() cliCmd, err := clientcmd.NewClient() if err != nil { diff --git a/config/manager/cluster/controller_manager_config.yaml b/config/manager/cluster/controller_manager_config.yaml new file mode 100644 index 000000000..b571df5f5 --- /dev/null +++ b/config/manager/cluster/controller_manager_config.yaml @@ -0,0 +1,11 @@ +apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 +kind: ControllerManagerConfig +health: + healthProbeBindAddress: :8081 +metrics: + bindAddress: 127.0.0.1:8080 +webhook: + port: 9443 +leaderElection: + leaderElect: true + resourceName: 08db2feb.percona.com diff --git a/config/manager/cluster/kustomization.yaml b/config/manager/cluster/kustomization.yaml new file mode 100644 index 000000000..43d283c3e --- /dev/null +++ b/config/manager/cluster/kustomization.yaml @@ -0,0 +1,16 @@ +resources: +- manager.yaml + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- files: + - controller_manager_config.yaml + name: percona-server-mysql-operator-config +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: perconalab/percona-server-mysql-operator + newName: perconalab/percona-server-mysql-operator + newTag: main diff --git a/config/manager/cluster/manager.yaml b/config/manager/cluster/manager.yaml new file mode 100644 index 000000000..108585784 --- /dev/null +++ b/config/manager/cluster/manager.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +spec: + selector: + matchLabels: + app.kubernetes.io/name: percona-server-mysql-operator + replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: percona-server-mysql-operator + spec: + securityContext: + runAsNonRoot: true + containers: + - command: + - /usr/local/bin/percona-server-mysql-operator + args: + - --leader-elect + env: + - name: LOG_STRUCTURED + value: 'false' + - name: LOG_LEVEL + value: INFO + - name: WATCH_NAMESPACE + value: "" + - name: DISABLE_TELEMETRY + value: "false" + image: perconalab/percona-server-mysql-operator:main + imagePullPolicy: Always + name: manager + securityContext: + allowPrivilegeEscalation: false + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 100m + memory: 20Mi + serviceAccountName: percona-server-mysql-operator + terminationGracePeriodSeconds: 10 diff --git a/config/rbac/cluster/kustomization copy.yaml b/config/rbac/cluster/kustomization copy.yaml new file mode 100644 index 000000000..def7ee260 --- /dev/null +++ b/config/rbac/cluster/kustomization copy.yaml @@ -0,0 +1,14 @@ +resources: +# All RBAC will be applied under this service account in +# the deployment namespace. You may comment out this resource +# if your manager will use a service account that exists at +# runtime. Be sure to update RoleBinding and ClusterRoleBinding +# subjects if changing service account names. +- service_account.yaml +- role.yaml +- role_binding.yaml +- leader_election_role.yaml +- leader_election_role_binding.yaml +- orchestrator_service_account.yaml +- orchestrator_role.yaml +- orchestrator_role_binding.yaml diff --git a/config/rbac/cluster/kustomization.yaml b/config/rbac/cluster/kustomization.yaml new file mode 100644 index 000000000..def7ee260 --- /dev/null +++ b/config/rbac/cluster/kustomization.yaml @@ -0,0 +1,14 @@ +resources: +# All RBAC will be applied under this service account in +# the deployment namespace. You may comment out this resource +# if your manager will use a service account that exists at +# runtime. Be sure to update RoleBinding and ClusterRoleBinding +# subjects if changing service account names. +- service_account.yaml +- role.yaml +- role_binding.yaml +- leader_election_role.yaml +- leader_election_role_binding.yaml +- orchestrator_service_account.yaml +- orchestrator_role.yaml +- orchestrator_role_binding.yaml diff --git a/config/rbac/cluster/leader_election_role.yaml b/config/rbac/cluster/leader_election_role.yaml new file mode 100644 index 000000000..53790ca11 --- /dev/null +++ b/config/rbac/cluster/leader_election_role.yaml @@ -0,0 +1,37 @@ +# permissions to do leader election. +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: percona-server-mysql-operator-leaderelection +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch diff --git a/config/rbac/cluster/leader_election_role_binding.yaml b/config/rbac/cluster/leader_election_role_binding.yaml new file mode 100644 index 000000000..2c00672f8 --- /dev/null +++ b/config/rbac/cluster/leader_election_role_binding.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: percona-server-mysql-operator-leaderelection +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: percona-server-mysql-operator-leaderelection +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator diff --git a/config/rbac/cluster/orchestrator_role.yaml b/config/rbac/cluster/orchestrator_role.yaml new file mode 100644 index 000000000..ad10528a9 --- /dev/null +++ b/config/rbac/cluster/orchestrator_role.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: percona-server-mysql-operator-orchestrator +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - patch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + verbs: + - get diff --git a/config/rbac/cluster/orchestrator_role_binding.yaml b/config/rbac/cluster/orchestrator_role_binding.yaml new file mode 100644 index 000000000..9ddf1a2d5 --- /dev/null +++ b/config/rbac/cluster/orchestrator_role_binding.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: percona-server-mysql-operator-orchestrator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: percona-server-mysql-operator-orchestrator +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator-orchestrator diff --git a/config/rbac/cluster/orchestrator_service_account.yaml b/config/rbac/cluster/orchestrator_service_account.yaml new file mode 100644 index 000000000..528b0306a --- /dev/null +++ b/config/rbac/cluster/orchestrator_service_account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: percona-server-mysql-operator-orchestrator diff --git a/config/rbac/cluster/role.yaml b/config/rbac/cluster/role.yaml new file mode 100644 index 000000000..3448f6d8a --- /dev/null +++ b/config/rbac/cluster/role.yaml @@ -0,0 +1,135 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: percona-server-mysql-operator +rules: +- apiGroups: + - "" + resources: + - configmaps + - pods + - pods/exec + - secrets + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cert-manager.io + - certmanager.k8s.io + resources: + - certificates + - issuers + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqlbackups + - perconaservermysqlbackups/finalizers + - perconaservermysqlbackups/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqlrestores + - perconaservermysqlrestores/finalizers + - perconaservermysqlrestores/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + - perconaservermysqls/finalizers + - perconaservermysqls/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/config/rbac/cluster/role_binding.yaml b/config/rbac/cluster/role_binding.yaml new file mode 100644 index 000000000..b8fffcf08 --- /dev/null +++ b/config/rbac/cluster/role_binding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: percona-server-mysql-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: percona-server-mysql-operator +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator + namespace: ps-operator diff --git a/config/rbac/cluster/service_account.yaml b/config/rbac/cluster/service_account.yaml new file mode 100644 index 000000000..41c94d623 --- /dev/null +++ b/config/rbac/cluster/service_account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: percona-server-mysql-operator diff --git a/config/rbac/orchestrator_role.yaml b/config/rbac/orchestrator_role.yaml index d0a757043..ad10528a9 100644 --- a/config/rbac/orchestrator_role.yaml +++ b/config/rbac/orchestrator_role.yaml @@ -1,6 +1,6 @@ --- apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole +kind: Role metadata: name: percona-server-mysql-operator-orchestrator rules: diff --git a/config/rbac/orchestrator_role_binding.yaml b/config/rbac/orchestrator_role_binding.yaml index 9463c5b23..9ddf1a2d5 100644 --- a/config/rbac/orchestrator_role_binding.yaml +++ b/config/rbac/orchestrator_role_binding.yaml @@ -1,10 +1,10 @@ apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding +kind: RoleBinding metadata: name: percona-server-mysql-operator-orchestrator roleRef: apiGroup: rbac.authorization.k8s.io - kind: ClusterRole + kind: Role name: percona-server-mysql-operator-orchestrator subjects: - kind: ServiceAccount diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index f1f436134..bd40f1cf7 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -10119,6 +10119,25 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role +metadata: + name: percona-server-mysql-operator-orchestrator +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - patch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role metadata: name: percona-server-mysql-operator rules: @@ -10241,25 +10260,6 @@ rules: - watch --- apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: percona-server-mysql-operator-orchestrator -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: percona-server-mysql-operator-leaderelection @@ -10274,26 +10274,26 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator + name: percona-server-mysql-operator-orchestrator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator + name: percona-server-mysql-operator-orchestrator subjects: - kind: ServiceAccount - name: percona-server-mysql-operator + name: percona-server-mysql-operator-orchestrator --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator subjects: - kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator --- apiVersion: v1 data: diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml new file mode 100644 index 000000000..dc8c410d6 --- /dev/null +++ b/deploy/cw-bundle.yaml @@ -0,0 +1,10389 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: perconaservermysqlbackups.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQLBackup + listKind: PerconaServerMySQLBackupList + plural: perconaservermysqlbackups + shortNames: + - ps-backup + - ps-backups + singular: perconaservermysqlbackup + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.storageName + name: Storage + type: string + - jsonPath: .status.destination + name: Destination + type: string + - jsonPath: .status.state + name: State + type: string + - jsonPath: .status.completed + name: Completed + type: date + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + clusterName: + type: string + storageName: + type: string + required: + - clusterName + - storageName + type: object + status: + properties: + completed: + format: date-time + type: string + destination: + type: string + image: + type: string + state: + type: string + stateDescription: + type: string + storage: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + azure: + properties: + containerName: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + storageClass: + type: string + required: + - containerName + - credentialsSecret + type: object + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + gcs: + properties: + bucket: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + storageClass: + type: string + required: + - bucket + - credentialsSecret + type: object + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + s3: + properties: + bucket: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + region: + type: string + storageClass: + type: string + required: + - bucket + - credentialsSecret + type: object + schedulerName: + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + type: + type: string + verifyTLS: + type: boolean + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - type + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: perconaservermysqlrestores.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQLRestore + listKind: PerconaServerMySQLRestoreList + plural: perconaservermysqlrestores + shortNames: + - ps-restore + singular: perconaservermysqlrestore + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.state + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + backupName: + type: string + backupSource: + properties: + completed: + format: date-time + type: string + destination: + type: string + image: + type: string + state: + type: string + stateDescription: + type: string + storage: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + azure: + properties: + containerName: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + storageClass: + type: string + required: + - containerName + - credentialsSecret + type: object + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + gcs: + properties: + bucket: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + storageClass: + type: string + required: + - bucket + - credentialsSecret + type: object + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + s3: + properties: + bucket: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + region: + type: string + storageClass: + type: string + required: + - bucket + - credentialsSecret + type: object + schedulerName: + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + type: + type: string + verifyTLS: + type: boolean + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - type + type: object + type: object + clusterName: + type: string + required: + - clusterName + type: object + status: + properties: + completed: + format: date-time + type: string + state: + type: string + stateDescription: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: perconaservermysqls.ps.percona.com +spec: + group: ps.percona.com + names: + kind: PerconaServerMySQL + listKind: PerconaServerMySQLList + plural: perconaservermysqls + shortNames: + - ps + singular: perconaservermysql + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.mysql.clusterType + name: Replication + type: string + - jsonPath: .status.host + name: Endpoint + type: string + - jsonPath: .status.state + name: State + type: string + - jsonPath: .status.mysql.ready + name: MySQL + type: string + - jsonPath: .status.orchestrator.ready + name: Orchestrator + type: string + - jsonPath: .status.haproxy.ready + name: HAProxy + type: string + - jsonPath: .status.router.ready + name: Router + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + backup: + properties: + backoffLimit: + format: int32 + type: integer + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + enabled: + type: boolean + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initImage: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + serviceAccountName: + type: string + storages: + additionalProperties: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + annotations: + additionalProperties: + type: string + type: object + azure: + properties: + containerName: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + storageClass: + type: string + required: + - containerName + - credentialsSecret + type: object + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + gcs: + properties: + bucket: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + storageClass: + type: string + required: + - bucket + - credentialsSecret + type: object + labels: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + s3: + properties: + bucket: + type: string + credentialsSecret: + type: string + endpointUrl: + type: string + prefix: + type: string + region: + type: string + storageClass: + type: string + required: + - bucket + - credentialsSecret + type: object + schedulerName: + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + type: + type: string + verifyTLS: + type: boolean + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - type + type: object + type: object + required: + - image + type: object + crVersion: + type: string + ignoreAnnotations: + items: + type: string + type: array + ignoreLabels: + items: + type: string + type: array + initImage: + type: string + mysql: + properties: + affinity: + properties: + advanced: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + antiAffinityTopologyKey: + type: string + type: object + annotations: + additionalProperties: + type: string + type: object + autoRecovery: + type: boolean + clusterType: + type: string + configuration: + type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + expose: + properties: + annotations: + additionalProperties: + type: string + type: object + enabled: + type: boolean + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + labels: + additionalProperties: + type: string + type: object + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + type: + type: string + type: object + gracePeriod: + format: int64 + type: integer + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initImage: + type: string + labels: + additionalProperties: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + schedulerName: + type: string + serviceAccountName: + type: string + sidecarPVCs: + items: + properties: + name: + type: string + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - name + - spec + type: object + type: array + sidecarVolumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + sidecars: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + size: + format: int32 + type: integer + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - image + type: object + orchestrator: + properties: + affinity: + properties: + advanced: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + antiAffinityTopologyKey: + type: string + type: object + annotations: + additionalProperties: + type: string + type: object + configuration: + type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + enabled: + type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + expose: + properties: + annotations: + additionalProperties: + type: string + type: object + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + labels: + additionalProperties: + type: string + type: object + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + type: + type: string + type: object + gracePeriod: + format: int64 + type: integer + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initImage: + type: string + labels: + additionalProperties: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + schedulerName: + type: string + serviceAccountName: + type: string + size: + format: int32 + type: integer + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - image + type: object + pause: + type: boolean + pmm: + properties: + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + enabled: + type: boolean + image: + type: string + imagePullPolicy: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + serverHost: + type: string + serverUser: + type: string + required: + - image + type: object + proxy: + properties: + haproxy: + properties: + affinity: + properties: + advanced: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + antiAffinityTopologyKey: + type: string + type: object + annotations: + additionalProperties: + type: string + type: object + configuration: + type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + enabled: + type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + expose: + properties: + annotations: + additionalProperties: + type: string + type: object + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + labels: + additionalProperties: + type: string + type: object + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + type: + type: string + type: object + gracePeriod: + format: int64 + type: integer + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initImage: + type: string + labels: + additionalProperties: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + schedulerName: + type: string + serviceAccountName: + type: string + size: + format: int32 + type: integer + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - image + type: object + router: + properties: + affinity: + properties: + advanced: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + antiAffinityTopologyKey: + type: string + type: object + annotations: + additionalProperties: + type: string + type: object + configuration: + type: string + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + enabled: + type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + expose: + properties: + annotations: + additionalProperties: + type: string + type: object + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + labels: + additionalProperties: + type: string + type: object + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + type: + type: string + type: object + gracePeriod: + format: int64 + type: integer + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initImage: + type: string + labels: + additionalProperties: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + nodeSelector: + additionalProperties: + type: string + type: object + podSecurityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + priorityClassName: + type: string + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + runtimeClassName: + type: string + schedulerName: + type: string + serviceAccountName: + type: string + size: + format: int32 + type: integer + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + volumeSpec: + properties: + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + persistentVolumeClaim: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + type: object + required: + - image + type: object + type: object + secretsName: + type: string + sslInternalSecretName: + type: string + sslSecretName: + type: string + tls: + properties: + SANs: + items: + type: string + type: array + issuerConf: + properties: + group: + type: string + kind: + type: string + name: + type: string + required: + - name + type: object + type: object + toolkit: + properties: + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + required: + - image + type: object + unsafeFlags: + properties: + mysqlSize: + type: boolean + orchestrator: + type: boolean + orchestratorSize: + type: boolean + proxy: + type: boolean + proxySize: + type: boolean + type: object + updateStrategy: + type: string + upgradeOptions: + properties: + apply: + type: string + versionServiceEndpoint: + type: string + type: object + type: object + status: + properties: + backupVersion: + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + 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 + haproxy: + properties: + ready: + format: int32 + type: integer + size: + format: int32 + type: integer + state: + type: string + version: + type: string + type: object + host: + type: string + mysql: + properties: + ready: + format: int32 + type: integer + size: + format: int32 + type: integer + state: + type: string + version: + type: string + type: object + orchestrator: + properties: + ready: + format: int32 + type: integer + size: + format: int32 + type: integer + state: + type: string + version: + type: string + type: object + pmmVersion: + type: string + router: + properties: + ready: + format: int32 + type: integer + size: + format: int32 + type: integer + state: + type: string + version: + type: string + type: object + state: + type: string + toolkitVersion: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: percona-server-mysql-operator +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: percona-server-mysql-operator-orchestrator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: percona-server-mysql-operator-leaderelection +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: percona-server-mysql-operator-orchestrator +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - patch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: percona-server-mysql-operator +rules: +- apiGroups: + - "" + resources: + - configmaps + - pods + - pods/exec + - secrets + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cert-manager.io + - certmanager.k8s.io + resources: + - certificates + - issuers + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqlbackups + - perconaservermysqlbackups/finalizers + - perconaservermysqlbackups/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqlrestores + - perconaservermysqlrestores/finalizers + - perconaservermysqlrestores/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + - perconaservermysqls/finalizers + - perconaservermysqls/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: percona-server-mysql-operator-leaderelection +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: percona-server-mysql-operator-leaderelection +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: percona-server-mysql-operator-orchestrator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: percona-server-mysql-operator-orchestrator +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator-orchestrator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: percona-server-mysql-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: percona-server-mysql-operator +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator + namespace: ps-operator +--- +apiVersion: v1 +data: + controller_manager_config.yaml: | + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + kind: ControllerManagerConfig + health: + healthProbeBindAddress: :8081 + metrics: + bindAddress: 127.0.0.1:8080 + webhook: + port: 9443 + leaderElection: + leaderElect: true + resourceName: 08db2feb.percona.com +kind: ConfigMap +metadata: + name: percona-server-mysql-operator-config +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: percona-server-mysql-operator + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: percona-server-mysql-operator + spec: + containers: + - args: + - --leader-elect + command: + - /usr/local/bin/percona-server-mysql-operator + env: + - name: LOG_STRUCTURED + value: "false" + - name: LOG_LEVEL + value: INFO + - name: WATCH_NAMESPACE + value: "" + - name: DISABLE_TELEMETRY + value: "false" + image: perconalab/percona-server-mysql-operator:main + imagePullPolicy: Always + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 100m + memory: 20Mi + securityContext: + allowPrivilegeEscalation: false + securityContext: + runAsNonRoot: true + serviceAccountName: percona-server-mysql-operator + terminationGracePeriodSeconds: 10 +--- diff --git a/deploy/cw-operator.yaml b/deploy/cw-operator.yaml new file mode 100644 index 000000000..d6527b616 --- /dev/null +++ b/deploy/cw-operator.yaml @@ -0,0 +1,79 @@ +apiVersion: v1 +data: + controller_manager_config.yaml: | + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + kind: ControllerManagerConfig + health: + healthProbeBindAddress: :8081 + metrics: + bindAddress: 127.0.0.1:8080 + webhook: + port: 9443 + leaderElection: + leaderElect: true + resourceName: 08db2feb.percona.com +kind: ConfigMap +metadata: + name: percona-server-mysql-operator-config +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: percona-server-mysql-operator +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: percona-server-mysql-operator + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: percona-server-mysql-operator + spec: + containers: + - args: + - --leader-elect + command: + - /usr/local/bin/percona-server-mysql-operator + env: + - name: LOG_STRUCTURED + value: "false" + - name: LOG_LEVEL + value: INFO + - name: WATCH_NAMESPACE + value: "" + - name: DISABLE_TELEMETRY + value: "false" + image: perconalab/percona-server-mysql-operator:main + imagePullPolicy: Always + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 100m + memory: 20Mi + securityContext: + allowPrivilegeEscalation: false + securityContext: + runAsNonRoot: true + serviceAccountName: percona-server-mysql-operator + terminationGracePeriodSeconds: 10 +--- diff --git a/deploy/cw-rbac.yaml b/deploy/cw-rbac.yaml new file mode 100644 index 000000000..c745464f3 --- /dev/null +++ b/deploy/cw-rbac.yaml @@ -0,0 +1,238 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: percona-server-mysql-operator +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: percona-server-mysql-operator-orchestrator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: percona-server-mysql-operator-leaderelection +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: percona-server-mysql-operator-orchestrator +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - patch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: percona-server-mysql-operator +rules: +- apiGroups: + - "" + resources: + - configmaps + - pods + - pods/exec + - secrets + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cert-manager.io + - certmanager.k8s.io + resources: + - certificates + - issuers + verbs: + - create + - delete + - deletecollection + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqlbackups + - perconaservermysqlbackups/finalizers + - perconaservermysqlbackups/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqlrestores + - perconaservermysqlrestores/finalizers + - perconaservermysqlrestores/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + - perconaservermysqls/finalizers + - perconaservermysqls/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: percona-server-mysql-operator-leaderelection +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: percona-server-mysql-operator-leaderelection +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: percona-server-mysql-operator-orchestrator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: percona-server-mysql-operator-orchestrator +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator-orchestrator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: percona-server-mysql-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: percona-server-mysql-operator +subjects: +- kind: ServiceAccount + name: percona-server-mysql-operator + namespace: ps-operator +--- diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index 8b1e687e1..cbde49acf 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -47,6 +47,25 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role +metadata: + name: percona-server-mysql-operator-orchestrator +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - patch +- apiGroups: + - ps.percona.com + resources: + - perconaservermysqls + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role metadata: name: percona-server-mysql-operator rules: @@ -169,25 +188,6 @@ rules: - watch --- apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: percona-server-mysql-operator-orchestrator -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: percona-server-mysql-operator-leaderelection @@ -202,24 +202,24 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator + name: percona-server-mysql-operator-orchestrator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator + name: percona-server-mysql-operator-orchestrator subjects: - kind: ServiceAccount - name: percona-server-mysql-operator + name: percona-server-mysql-operator-orchestrator --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator subjects: - kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator --- diff --git a/e2e-tests/functions b/e2e-tests/functions index a045b003c..b903bf1de 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -11,15 +11,27 @@ init_temp_dir() { } deploy_operator() { - kubectl -n "${NAMESPACE}" apply --server-side --force-conflicts -f "${DEPLOY_DIR}/crd.yaml" - kubectl -n "${NAMESPACE}" apply -f "${DEPLOY_DIR}/rbac.yaml" + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply --server-side --force-conflicts -f "${DEPLOY_DIR}/crd.yaml" - yq eval \ - "$(printf 'select(documentIndex==1).spec.template.spec.containers[0].image="%s"' "${IMAGE}")" \ - "${DEPLOY_DIR}/operator.yaml" \ - | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="DISABLE_TELEMETRY").value) = "true"' \ - | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="LOG_LEVEL").value) = "DEBUG"' \ - | kubectl -n "${NAMESPACE}" apply -f - + if [ -n "$OPERATOR_NS" ]; then + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${DEPLOY_DIR}/cw-rbac.yaml" + + yq eval \ + "$(printf 'select(documentIndex==1).spec.template.spec.containers[0].image="%s"' "${IMAGE}")" \ + "${DEPLOY_DIR}/cw-operator.yaml" \ + | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="DISABLE_TELEMETRY").value) = "true"' \ + | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="LOG_LEVEL").value) = "DEBUG"' \ + | kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f - + else + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${DEPLOY_DIR}/rbac.yaml" + + yq eval \ + "$(printf 'select(documentIndex==1).spec.template.spec.containers[0].image="%s"' "${IMAGE}")" \ + "${DEPLOY_DIR}/operator.yaml" \ + | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="DISABLE_TELEMETRY").value) = "true"' \ + | yq eval '(select(documentIndex==1).spec.template.spec.containers[] | select(.name=="manager").env[] | select(.name=="LOG_LEVEL").value) = "DEBUG"' \ + | kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f - + fi } deploy_non_tls_cluster_secrets() { @@ -41,17 +53,17 @@ apply_s3_storage_secrets() { deploy_pmm_server() { if [[ $OPENSHIFT ]]; then - oc create sa pmm-server -n $NAMESPACE || : - oc adm policy add-scc-to-user privileged -z pmm-server -n $NAMESPACE || : - oc create rolebinding pmm-ps-operator-namespace-only --role percona-server-for-mysql-operator-role --serviceaccount=$NAMESPACE:pmm-server -n $NAMESPACE || : - oc patch role/percona-server-for-mysql-operator-role --type json -p='[{"op":"add","path": "/rules/-","value":{"apiGroups":["security.openshift.io"],"resources":["securitycontextconstraints"],"verbs":["use"],"resourceNames":["privileged"]}}]' -n $NAMESPACE || : + oc create sa pmm-server -n "${NAMESPACE}" || : + oc adm policy add-scc-to-user privileged -z pmm-server -n "${NAMESPACE}" || : + oc create rolebinding pmm-ps-operator-namespace-only --role percona-server-for-mysql-operator-role --serviceaccount=$NAMESPACE:pmm-server -n "${NAMESPACE}" || : + oc patch role/percona-server-for-mysql-operator-role --type json -p='[{"op":"add","path": "/rules/-","value":{"apiGroups":["security.openshift.io"],"resources":["securitycontextconstraints"],"verbs":["use"],"resourceNames":["privileged"]}}]' -n "${NAMESPACE}" || : local additional_params="--set platform=openshift --set sa=pmm-server --set supresshttp2=false" fi - helm install monitoring -n $NAMESPACE --set imageTag=${IMAGE_PMM_SERVER#*:} --set imageRepo=${IMAGE_PMM_SERVER%:*} $additional_params https://percona-charts.storage.googleapis.com/pmm-server-$PMM_SERVER_VERSION.tgz + helm install monitoring -n "${NAMESPACE}" --set imageTag=${IMAGE_PMM_SERVER#*:} --set imageRepo=${IMAGE_PMM_SERVER%:*} $additional_params https://percona-charts.storage.googleapis.com/pmm-server-$PMM_SERVER_VERSION.tgz - until kubectl -n $NAMESPACE exec monitoring-0 -- bash -c "ls -l /proc/*/exe 2>/dev/null| grep postgres >/dev/null"; do + until kubectl -n "${NAMESPACE}" exec monitoring-0 -- bash -c "ls -l /proc/*/exe 2>/dev/null| grep postgres >/dev/null"; do echo "Retry $retry" sleep 5 let retry+=1 @@ -140,7 +152,7 @@ retry() { } get_operator_pod() { - kubectl get pods -n "${NAMESPACE}" \ + kubectl get pods -n "${OPERATOR_NS:-$NAMESPACE}" \ --selector=app.kubernetes.io/name=percona-server-mysql-operator \ -o 'jsonpath={.items[].metadata.name}' } @@ -411,7 +423,7 @@ wait_pod() { if [ $retry -ge 360 ]; then kubectl describe pod/$pod -n "${NAMESPACE}" kubectl logs $pod -n "${NAMESPACE}" - kubectl logs $(get_operator_pod) -n "${NAMESPACE}" \ + kubectl logs $(get_operator_pod) -n "${OPERATOR_NS:-$NAMESPACE}" \ | grep -v 'level=info' \ | grep -v 'level=debug' \ | grep -v 'Getting tasks for pod' \ @@ -496,12 +508,12 @@ get_mysql_router_service() { } deploy_version_service() { - kubectl create configmap -n "${NAMESPACE}" versions \ + kubectl create configmap -n "${OPERATOR_NS:-$NAMESPACE}" versions \ --from-file "${TESTS_CONFIG_DIR}/operator.9.9.9.ps-operator.dep.json" \ --from-file "${TESTS_CONFIG_DIR}/operator.9.9.9.ps-operator.json" - kubectl apply -n "${NAMESPACE}" -f "${TESTS_CONFIG_DIR}/vs.yaml" - VS_POD_NAME=$(kubectl -n "${NAMESPACE}" get pods --selector=name=percona-version-service -o 'jsonpath={.items[].metadata.name}') + kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f "${TESTS_CONFIG_DIR}/vs.yaml" + VS_POD_NAME=$(kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get pods --selector=name=percona-version-service -o 'jsonpath={.items[].metadata.name}') wait_pod $VS_POD_NAME } @@ -532,7 +544,7 @@ verify_certificate_sans() { local have=$(mktemp) local want=$(mktemp) - kubectl -n "${NAMESPACE}" get certificate "${certificate}" -o jsonpath='{.spec.dnsNames}' | jq '.' >"${have}" + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get certificate "${certificate}" -o jsonpath='{.spec.dnsNames}' | jq '.' >"${have}" echo "${expected_sans}" | jq '.' >"${want}" diff "${have}" "${want}" @@ -548,7 +560,7 @@ check_passwords_leak() { base64 -d <<<$i echo done) $secrets" - pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') + pods=$(kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') collect_logs() { local containers @@ -606,7 +618,7 @@ destroy_chaos_mesh() { local kind=$(echo "$line" | awk '{print $1}') local name=$(echo "$line" | awk '{print $2}') local namespace=$(echo "$line" | awk '{print $3}') - kubectl patch $kind $name -n $namespace --type=merge -p '{"metadata":{"finalizers":[]}}' || : + kubectl patch $kind $name -n "${namespace}" --type=merge -p '{"metadata":{"finalizers":[]}}' || : done timeout 30 kubectl delete ${i} --all --all-namespaces || : done @@ -669,17 +681,17 @@ renew_certificate() { certificate="$1" local pod_name - pod_name=$(kubectl get -n "${NAMESPACE}" pods --selector=name=cmctl -o 'jsonpath={.items[].metadata.name}') + pod_name=$(kubectl get -n "${OPERATOR_NS:-$NAMESPACE}" pods --selector=name=cmctl -o 'jsonpath={.items[].metadata.name}') local revision - revision=$(kubectl get -n "${NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') + revision=$(kubectl get -n "${OPERATOR_NS:-$NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') - kubectl exec -n "${NAMESPACE}" "$pod_name" -- /tmp/cmctl renew "$certificate" + kubectl exec -n "${OPERATOR_NS:-$NAMESPACE}" "$pod_name" -- /tmp/cmctl renew "$certificate" # wait for new revision for i in {1..10}; do local new_revision - new_revision=$(kubectl get -n "${NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') + new_revision=$(kubectl get -n "${OPERATOR_NS:-$NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') if [ "$((revision + 1))" == "$new_revision" ]; then break fi @@ -692,6 +704,6 @@ deploy_cmctl() { sed -e "s/percona-server-mysql-operator/$service_account/g" "${DEPLOY_DIR}/rbac.yaml" \ | yq '(select(.rules).rules[] | select(contains({"apiGroups": ["cert-manager.io"]}))).resources += "certificates/status"' \ - | kubectl apply -n "${NAMESPACE}" -f - - kubectl apply -n "${NAMESPACE}" -f "${TESTS_CONFIG_DIR}/cmctl.yml" + | kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f - + kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f "${TESTS_CONFIG_DIR}/cmctl.yml" } diff --git a/e2e-tests/tests/demand-backup/01-deploy-operator.yaml b/e2e-tests/tests/demand-backup/01-deploy-operator.yaml index cb9e3c5ab..3bcf780dd 100644 --- a/e2e-tests/tests/demand-backup/01-deploy-operator.yaml +++ b/e2e-tests/tests/demand-backup/01-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions init_temp_dir # do this only in the first TestStep - kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml b/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml index cb9e3c5ab..3bcf780dd 100644 --- a/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml +++ b/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions init_temp_dir # do this only in the first TestStep - kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml b/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml index cb9e3c5ab..3bcf780dd 100644 --- a/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml +++ b/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions init_temp_dir # do this only in the first TestStep - kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets From 19ef3972ce86b0d48be40ca71dc60a4194b0e647 Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Mon, 24 Jun 2024 21:22:37 +0300 Subject: [PATCH 171/192] fix VS test --- e2e-tests/functions | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e-tests/functions b/e2e-tests/functions index b903bf1de..220a377b4 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -515,6 +515,7 @@ deploy_version_service() { kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f "${TESTS_CONFIG_DIR}/vs.yaml" VS_POD_NAME=$(kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get pods --selector=name=percona-version-service -o 'jsonpath={.items[].metadata.name}') wait_pod $VS_POD_NAME + sleep 5 } deploy_cert_manager() { From d3f0575c548a3d0090072d75fcda43935760feed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Tue, 25 Jun 2024 10:27:25 +0300 Subject: [PATCH 172/192] K8SPS-346: Increase default bootstrap timeout to 12 hours (#678) Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 2 +- e2e-tests/tests/limits/01-assert.yaml | 2 +- e2e-tests/tests/limits/03-assert.yaml | 2 +- e2e-tests/tests/limits/05-assert.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index f85113c9f..33d455a7a 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -558,7 +558,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi cr.Spec.MySQL.StartupProbe.SuccessThreshold = 1 } if cr.Spec.MySQL.StartupProbe.TimeoutSeconds == 0 { - cr.Spec.MySQL.StartupProbe.TimeoutSeconds = 300 + cr.Spec.MySQL.StartupProbe.TimeoutSeconds = 12 * 60 * 60 } if cr.Spec.MySQL.LivenessProbe.InitialDelaySeconds == 0 { diff --git a/e2e-tests/tests/limits/01-assert.yaml b/e2e-tests/tests/limits/01-assert.yaml index b40a120e4..c941a07c6 100644 --- a/e2e-tests/tests/limits/01-assert.yaml +++ b/e2e-tests/tests/limits/01-assert.yaml @@ -111,7 +111,7 @@ spec: initialDelaySeconds: 15 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 300 + timeoutSeconds: 43200 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: diff --git a/e2e-tests/tests/limits/03-assert.yaml b/e2e-tests/tests/limits/03-assert.yaml index 066ecd64e..2d533909d 100644 --- a/e2e-tests/tests/limits/03-assert.yaml +++ b/e2e-tests/tests/limits/03-assert.yaml @@ -111,7 +111,7 @@ spec: initialDelaySeconds: 15 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 300 + timeoutSeconds: 43200 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: diff --git a/e2e-tests/tests/limits/05-assert.yaml b/e2e-tests/tests/limits/05-assert.yaml index 9a33aed96..14186575d 100644 --- a/e2e-tests/tests/limits/05-assert.yaml +++ b/e2e-tests/tests/limits/05-assert.yaml @@ -109,7 +109,7 @@ spec: initialDelaySeconds: 15 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 300 + timeoutSeconds: 43200 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: From b9ae2158a21fc49a307c9d7454aff82304446e5a Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Tue, 25 Jun 2024 17:11:46 +0300 Subject: [PATCH 173/192] Fix missprint (#681) --- pkg/controller/ps/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/ps/upgrade.go b/pkg/controller/ps/upgrade.go index 82db50b7d..a0468aee7 100644 --- a/pkg/controller/ps/upgrade.go +++ b/pkg/controller/ps/upgrade.go @@ -33,7 +33,7 @@ func (r *PerconaServerMySQLReconciler) smartUpdate(ctx context.Context, sts *app Namespace: sts.Namespace, }, currentSet) if err != nil { - return errors.Wrap(err, "failed to get current sfs") + return errors.Wrap(err, "failed to get current sts") } pods := corev1.PodList{} From adcac218bc251a15e9e22f6281000cc0ac7b3410 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:40:59 +0300 Subject: [PATCH 174/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.71 to 7.0.72 (#682) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.71 to 7.0.72. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.71...v7.0.72) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ac33f01cc..931b25263 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/google/go-cmp v0.6.0 - github.com/minio/minio-go/v7 v7.0.71 + github.com/minio/minio-go/v7 v7.0.72 github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 079449c94..7b6c09c6a 100644 --- a/go.sum +++ b/go.sum @@ -158,8 +158,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.71 h1:No9XfOKTYi6i0GnBj+WZwD8WP5GZfL7n7GOjRqCdAjA= -github.com/minio/minio-go/v7 v7.0.71/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= +github.com/minio/minio-go/v7 v7.0.72 h1:ZSbxs2BfJensLyHdVOgHv+pfmvxYraaUy07ER04dWnA= +github.com/minio/minio-go/v7 v7.0.72/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= From ca53349d8e9f9af1e2cb778a3eac32be5830fb4b Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Thu, 27 Jun 2024 09:52:10 +0200 Subject: [PATCH 175/192] CLOUD-850 - Update kuttl version to v0.17.0 (#684) --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2db21dd0d..4c0b4f42b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -249,8 +249,8 @@ void prepareNode() { kubectl krew install assert - # v0.16.0 kuttl version - kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/e450fd06ebe9ce200355726b81d13e5e59b9bf47/plugins/kuttl.yaml + # v0.17.0 kuttl version + kubectl krew install --manifest-url https://raw.githubusercontent.com/kubernetes-sigs/krew-index/336ef83542fd2f783bfa2c075b24599e834dcc77/plugins/kuttl.yaml echo \$(kubectl kuttl --version) is installed curl -fsSL https://github.com/kyverno/chainsaw/releases/download/v0.1.7/chainsaw_linux_amd64.tar.gz | sudo tar -C /usr/local/bin -xzf - chainsaw From 56af646a8e838fc55097494399e5cd9bd7f53709 Mon Sep 17 00:00:00 2001 From: Tomislav Plavcic Date: Fri, 28 Jun 2024 11:53:36 +0200 Subject: [PATCH 176/192] Update codeowners (#685) --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b4445512f..fcb580427 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ * @hors @egegunes @inelpandzic @pooknull -/e2e-tests/ @tplavcic @nmarukovich @ptankov -Jenkinsfile @tplavcic @nmarukovich @ptankov +/e2e-tests/ @tplavcic @nmarukovich @ptankov @jvpasinatto @eleo007 +Jenkinsfile @tplavcic @nmarukovich @ptankov @jvpasinatto @eleo007 From fb987e16d335036026c7cc8ead2c6cfac15b92f1 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Mon, 1 Jul 2024 16:39:21 +0200 Subject: [PATCH 177/192] K8SPS-241: Set OPERATOR_NS in default Jenkins pipeline (#680) * Set OPERATOR_NS in defaul Jenkins pipeline. * Create ps-operator namespace. * Properly check for CW mode operator deployment. * Cluster wide orchestrator role. * Create secrets in right namespace for backup tests. * Regenerate cw files. * Regenerate files. * Revert cw generation. * Add destroy cluster gracefully step. * Create orc rbac objects. * Minor refactor. * Remove orchestrator RBAC from deploy files. * Remove copy. * Rbac to namespace. * Regenerate default role. * Regenarete deploy files. * Add rbac perms. * Correct kind for rbac. * Get pods for password leaks. * Fix tls tests. * Add namespace to minio endpoint in tests. * Fix script. * Update tests. * Update smart-update and version-service tests. * Remove rbac/namespace folder and regenerate yaml files. * Refactor. * Cleanup. * Fix version-service test. --- Jenkinsfile | 1 + Makefile | 1 + config/rbac/cluster/kustomization copy.yaml | 14 --- config/rbac/cluster/kustomization.yaml | 3 - config/rbac/cluster/orchestrator_role.yaml | 19 ---- .../cluster/orchestrator_role_binding.yaml | 11 --- .../cluster/orchestrator_service_account.yaml | 4 - config/rbac/cluster/role.yaml | 21 ++++ config/rbac/kustomization.yaml | 3 - config/rbac/orchestrator_role.yaml | 19 ---- config/rbac/orchestrator_role_binding.yaml | 11 --- config/rbac/orchestrator_service_account.yaml | 4 - config/rbac/role.yaml | 30 ++++++ config/rbac/role_binding.yaml | 4 +- deploy/bundle.yaml | 74 +++++++------- deploy/cw-bundle.yaml | 49 ++++------ deploy/cw-rbac.yaml | 49 ++++------ deploy/rbac.yaml | 74 +++++++------- e2e-tests/functions | 54 ++++++++-- .../async-ignore-annotations/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/auto-config/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/config-router/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/config/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../config/99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/demand-backup/01-assert.yaml | 15 ++- .../demand-backup/01-deploy-operator.yaml | 2 +- .../demand-backup/02-create-cluster.yaml | 56 +++++------ .../12-restore-from-minio-backup-source.yaml | 2 +- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ .../gr-demand-backup-haproxy/01-assert.yaml | 15 ++- .../02-create-cluster.yaml | 16 +-- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ .../tests/gr-demand-backup/01-assert.yaml | 15 ++- .../gr-demand-backup/01-deploy-operator.yaml | 2 +- .../gr-demand-backup/02-create-cluster.yaml | 52 +++++----- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-finalizer/01-assert.yaml | 15 ++- .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-haproxy/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ .../gr-ignore-annotations/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-init-deploy/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-one-pod/00-assert.yaml | 15 ++- .../tests/gr-one-pod/01-create-cluster.yaml | 28 +++--- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-recreate/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-scaling/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ .../tests/gr-security-context/01-assert.yaml | 15 ++- .../01-deploy-operator.yaml | 2 +- .../02-create-cluster.yaml | 38 +++---- .../tests/gr-security-context/05-assert.yaml | 1 - ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ .../tests/gr-tls-cert-manager/01-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/gr-users/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/haproxy/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../haproxy/99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/init-deploy/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/limits/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../limits/99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/monitoring/00-assert.yaml | 11 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/one-pod/00-assert.yaml | 15 ++- .../tests/one-pod/01-create-cluster.yaml | 28 +++--- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../one-pod/99-remove-cluster-gracefully.yaml | 16 +++ ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/recreate/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/scaling/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../scaling/99-remove-cluster-gracefully.yaml | 16 +++ .../tests/service-per-pod/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/sidecars/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/smart-update/00-assert.yaml | 98 ++++--------------- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ .../tests/tls-cert-manager/01-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ e2e-tests/tests/users/00-assert.yaml | 15 ++- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../users/99-remove-cluster-gracefully.yaml | 16 +++ .../tests/version-service/00-assert.yaml | 98 ++++--------------- ...-finalizer.yaml => 98-drop-finalizer.yaml} | 0 .../99-remove-cluster-gracefully.yaml | 16 +++ pkg/controller/ps/controller.go | 20 +++- pkg/orchestrator/orchestrator.go | 40 ++++++++ 125 files changed, 1087 insertions(+), 769 deletions(-) delete mode 100644 config/rbac/cluster/kustomization copy.yaml delete mode 100644 config/rbac/cluster/orchestrator_role.yaml delete mode 100644 config/rbac/cluster/orchestrator_role_binding.yaml delete mode 100644 config/rbac/cluster/orchestrator_service_account.yaml delete mode 100644 config/rbac/orchestrator_role.yaml delete mode 100644 config/rbac/orchestrator_role_binding.yaml delete mode 100644 config/rbac/orchestrator_service_account.yaml rename e2e-tests/tests/async-ignore-annotations/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/async-ignore-annotations/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/auto-config/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/auto-config/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/config-router/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/config-router/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/config/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/config/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/demand-backup/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/demand-backup/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-demand-backup-haproxy/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-demand-backup-haproxy/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-demand-backup/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-demand-backup/99-remove-cluster-gracefully.yaml create mode 100644 e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-haproxy/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-haproxy/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-ignore-annotations/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-ignore-annotations/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-init-deploy/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-init-deploy/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-one-pod/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-one-pod/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-recreate/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-recreate/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-scaling/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-scaling/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-security-context/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-security-context/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-self-healing/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-self-healing/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-tls-cert-manager/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/gr-users/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/gr-users/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/haproxy/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/haproxy/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/init-deploy/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/init-deploy/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/limits/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/limits/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/monitoring/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/monitoring/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/one-pod/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/one-pod/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/operator-self-healing/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/operator-self-healing/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/recreate/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/recreate/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/scaling/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/scaling/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/service-per-pod/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/service-per-pod/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/sidecars/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/sidecars/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/smart-update/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/smart-update/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/tls-cert-manager/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/users/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/users/99-remove-cluster-gracefully.yaml rename e2e-tests/tests/version-service/{99-drop-finalizer.yaml => 98-drop-finalizer.yaml} (100%) create mode 100644 e2e-tests/tests/version-service/99-remove-cluster-gracefully.yaml diff --git a/Jenkinsfile b/Jenkinsfile index 4c0b4f42b..03d4bacf7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -280,6 +280,7 @@ pipeline { environment { CLOUDSDK_CORE_DISABLE_PROMPTS = 1 CLEAN_NAMESPACE = 1 + OPERATOR_NS = 'ps-operator' GIT_SHORT_COMMIT = sh(script: 'git rev-parse --short HEAD', , returnStdout: true).trim() VERSION = "${env.GIT_BRANCH}-${env.GIT_SHORT_COMMIT}" CLUSTER_NAME = sh(script: "echo jen-ps-${env.CHANGE_ID}-${GIT_SHORT_COMMIT}-${env.BUILD_NUMBER} | tr '[:upper:]' '[:lower:]'", , returnStdout: true).trim() diff --git a/Makefile b/Makefile index b4332ddbf..3973ea08b 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,7 @@ e2e-test: kuttl-shfmt manifests: kustomize generate $(KUSTOMIZE) build config/crd/ > $(DEPLOYDIR)/crd.yaml echo "---" >> $(DEPLOYDIR)/crd.yaml + $(KUSTOMIZE) build config/rbac/ | sed 's/ClusterRole/Role/g' > $(DEPLOYDIR)/rbac.yaml echo "---" >> $(DEPLOYDIR)/rbac.yaml cd config/manager && $(KUSTOMIZE) edit set image perconalab/percona-server-mysql-operator=$(IMAGE) diff --git a/config/rbac/cluster/kustomization copy.yaml b/config/rbac/cluster/kustomization copy.yaml deleted file mode 100644 index def7ee260..000000000 --- a/config/rbac/cluster/kustomization copy.yaml +++ /dev/null @@ -1,14 +0,0 @@ -resources: -# All RBAC will be applied under this service account in -# the deployment namespace. You may comment out this resource -# if your manager will use a service account that exists at -# runtime. Be sure to update RoleBinding and ClusterRoleBinding -# subjects if changing service account names. -- service_account.yaml -- role.yaml -- role_binding.yaml -- leader_election_role.yaml -- leader_election_role_binding.yaml -- orchestrator_service_account.yaml -- orchestrator_role.yaml -- orchestrator_role_binding.yaml diff --git a/config/rbac/cluster/kustomization.yaml b/config/rbac/cluster/kustomization.yaml index def7ee260..166fe7986 100644 --- a/config/rbac/cluster/kustomization.yaml +++ b/config/rbac/cluster/kustomization.yaml @@ -9,6 +9,3 @@ resources: - role_binding.yaml - leader_election_role.yaml - leader_election_role_binding.yaml -- orchestrator_service_account.yaml -- orchestrator_role.yaml -- orchestrator_role_binding.yaml diff --git a/config/rbac/cluster/orchestrator_role.yaml b/config/rbac/cluster/orchestrator_role.yaml deleted file mode 100644 index ad10528a9..000000000 --- a/config/rbac/cluster/orchestrator_role.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: percona-server-mysql-operator-orchestrator -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get diff --git a/config/rbac/cluster/orchestrator_role_binding.yaml b/config/rbac/cluster/orchestrator_role_binding.yaml deleted file mode 100644 index 9ddf1a2d5..000000000 --- a/config/rbac/cluster/orchestrator_role_binding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: percona-server-mysql-operator-orchestrator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: percona-server-mysql-operator-orchestrator -subjects: -- kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator diff --git a/config/rbac/cluster/orchestrator_service_account.yaml b/config/rbac/cluster/orchestrator_service_account.yaml deleted file mode 100644 index 528b0306a..000000000 --- a/config/rbac/cluster/orchestrator_service_account.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: percona-server-mysql-operator-orchestrator diff --git a/config/rbac/cluster/role.yaml b/config/rbac/cluster/role.yaml index 3448f6d8a..4cae4bb5a 100644 --- a/config/rbac/cluster/role.yaml +++ b/config/rbac/cluster/role.yaml @@ -4,6 +4,16 @@ kind: ClusterRole metadata: name: percona-server-mysql-operator rules: +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - get + - list + - patch + - watch - apiGroups: - "" resources: @@ -133,3 +143,14 @@ rules: - patch - update - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - create + - get + - list + - patch + - watch diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml index def7ee260..166fe7986 100644 --- a/config/rbac/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -9,6 +9,3 @@ resources: - role_binding.yaml - leader_election_role.yaml - leader_election_role_binding.yaml -- orchestrator_service_account.yaml -- orchestrator_role.yaml -- orchestrator_role_binding.yaml diff --git a/config/rbac/orchestrator_role.yaml b/config/rbac/orchestrator_role.yaml deleted file mode 100644 index ad10528a9..000000000 --- a/config/rbac/orchestrator_role.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: percona-server-mysql-operator-orchestrator -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get diff --git a/config/rbac/orchestrator_role_binding.yaml b/config/rbac/orchestrator_role_binding.yaml deleted file mode 100644 index 9ddf1a2d5..000000000 --- a/config/rbac/orchestrator_role_binding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: percona-server-mysql-operator-orchestrator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: percona-server-mysql-operator-orchestrator -subjects: -- kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator diff --git a/config/rbac/orchestrator_service_account.yaml b/config/rbac/orchestrator_service_account.yaml deleted file mode 100644 index 528b0306a..000000000 --- a/config/rbac/orchestrator_service_account.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: percona-server-mysql-operator-orchestrator diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7fc722978..343ea8646 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -39,6 +39,36 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - rolebindings + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - roles + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - get + - list + - patch + - watch - apiGroups: - apps resources: diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index a36f4a194..6a0835e7e 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -1,10 +1,10 @@ apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding +kind: RoleBinding metadata: name: percona-server-mysql-operator roleRef: apiGroup: rbac.authorization.k8s.io - kind: ClusterRole + kind: Role name: percona-server-mysql-operator subjects: - kind: ServiceAccount diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index bd40f1cf7..e88d4743e 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -10075,11 +10075,6 @@ kind: ServiceAccount metadata: name: percona-server-mysql-operator --- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: percona-server-mysql-operator-orchestrator ---- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -10119,25 +10114,6 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role -metadata: - name: percona-server-mysql-operator-orchestrator -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role metadata: name: percona-server-mysql-operator rules: @@ -10176,6 +10152,36 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - rolebindings + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - roles + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - get + - list + - patch + - watch - apiGroups: - apps resources: @@ -10262,35 +10268,23 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator-leaderelection -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: percona-server-mysql-operator-leaderelection -subjects: -- kind: ServiceAccount name: percona-server-mysql-operator ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: percona-server-mysql-operator-orchestrator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator subjects: - kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator + name: percona-server-mysql-operator-leaderelection roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator + name: percona-server-mysql-operator-leaderelection subjects: - kind: ServiceAccount name: percona-server-mysql-operator diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index dc8c410d6..88502a0c3 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -10075,11 +10075,6 @@ kind: ServiceAccount metadata: name: percona-server-mysql-operator --- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: percona-server-mysql-operator-orchestrator ---- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -10118,29 +10113,20 @@ rules: - patch --- apiVersion: rbac.authorization.k8s.io/v1 -kind: Role +kind: ClusterRole metadata: - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator rules: - apiGroups: - "" resources: - - pods + - serviceaccounts verbs: + - create + - get - list - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: percona-server-mysql-operator -rules: + - watch - apiGroups: - "" resources: @@ -10270,6 +10256,17 @@ rules: - patch - update - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - create + - get + - list + - patch + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -10284,18 +10281,6 @@ subjects: name: percona-server-mysql-operator --- apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: percona-server-mysql-operator-orchestrator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: percona-server-mysql-operator-orchestrator -subjects: -- kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: percona-server-mysql-operator diff --git a/deploy/cw-rbac.yaml b/deploy/cw-rbac.yaml index c745464f3..79f5b37e4 100644 --- a/deploy/cw-rbac.yaml +++ b/deploy/cw-rbac.yaml @@ -3,11 +3,6 @@ kind: ServiceAccount metadata: name: percona-server-mysql-operator --- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: percona-server-mysql-operator-orchestrator ---- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -46,29 +41,20 @@ rules: - patch --- apiVersion: rbac.authorization.k8s.io/v1 -kind: Role +kind: ClusterRole metadata: - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator rules: - apiGroups: - "" resources: - - pods + - serviceaccounts verbs: + - create + - get - list - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: percona-server-mysql-operator -rules: + - watch - apiGroups: - "" resources: @@ -198,6 +184,17 @@ rules: - patch - update - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - create + - get + - list + - patch + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -212,18 +209,6 @@ subjects: name: percona-server-mysql-operator --- apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: percona-server-mysql-operator-orchestrator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: percona-server-mysql-operator-orchestrator -subjects: -- kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator ---- -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: percona-server-mysql-operator diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index cbde49acf..7c765ebb4 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -3,11 +3,6 @@ kind: ServiceAccount metadata: name: percona-server-mysql-operator --- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: percona-server-mysql-operator-orchestrator ---- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -47,25 +42,6 @@ rules: --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role -metadata: - name: percona-server-mysql-operator-orchestrator -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - patch -- apiGroups: - - ps.percona.com - resources: - - perconaservermysqls - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role metadata: name: percona-server-mysql-operator rules: @@ -104,6 +80,36 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - rolebindings + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - roles + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - get + - list + - patch + - watch - apiGroups: - apps resources: @@ -190,35 +196,23 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator-leaderelection -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: percona-server-mysql-operator-leaderelection -subjects: -- kind: ServiceAccount name: percona-server-mysql-operator ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: percona-server-mysql-operator-orchestrator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator subjects: - kind: ServiceAccount - name: percona-server-mysql-operator-orchestrator + name: percona-server-mysql-operator --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: percona-server-mysql-operator + name: percona-server-mysql-operator-leaderelection roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: percona-server-mysql-operator + name: percona-server-mysql-operator-leaderelection subjects: - kind: ServiceAccount name: percona-server-mysql-operator diff --git a/e2e-tests/functions b/e2e-tests/functions index 220a377b4..954c98636 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -10,7 +10,35 @@ init_temp_dir() { mkdir -p "$TEMP_DIR" } +create_namespace() { + local namespace=$1 + + if [[ $OPENSHIFT ]]; then + set -o pipefail + if [[ $OPERATOR_NS ]] && (oc get project "$OPERATOR_NS" -o json >/dev/null 2>&1 | jq -r '.metadata.name' >/dev/null 2>&1); then + oc delete --grace-period=0 --force=true project "$namespace" && sleep 120 || : + else + oc delete project "$namespace" && sleep 40 || : + fi + wait_for_delete "project/$namespace" + + oc new-project "$namespace" + oc project "$namespace" + oc adm policy add-scc-to-user hostaccess -z default || : + else + kubectl delete namespace $namespace --ignore-not-found || : + kubectl wait --for=delete namespace "$namespace" || : + kubectl create namespace $namespace + fi +} + deploy_operator() { + destroy_operator + + if [[ $OPERATOR_NS ]]; then + create_namespace "${OPERATOR_NS}" + fi + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply --server-side --force-conflicts -f "${DEPLOY_DIR}/crd.yaml" if [ -n "$OPERATOR_NS" ]; then @@ -34,6 +62,13 @@ deploy_operator() { fi } +destroy_operator() { + kubectl -n "${OPERATOR_NS:-$NAMESPACE}" delete deployment percona-server-mysql-operator --force --grace-period=0 || true + if [[ $OPERATOR_NS ]]; then + kubectl delete namespace $OPERATOR_NS --force --grace-period=0 || true + fi +} + deploy_non_tls_cluster_secrets() { kubectl -n "${NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/secrets.yaml" } @@ -513,8 +548,7 @@ deploy_version_service() { --from-file "${TESTS_CONFIG_DIR}/operator.9.9.9.ps-operator.json" kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f "${TESTS_CONFIG_DIR}/vs.yaml" - VS_POD_NAME=$(kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get pods --selector=name=percona-version-service -o 'jsonpath={.items[].metadata.name}') - wait_pod $VS_POD_NAME + sleep 5 } @@ -545,7 +579,7 @@ verify_certificate_sans() { local have=$(mktemp) local want=$(mktemp) - kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get certificate "${certificate}" -o jsonpath='{.spec.dnsNames}' | jq '.' >"${have}" + kubectl -n "${NAMESPACE}" get certificate "${certificate}" -o jsonpath='{.spec.dnsNames}' | jq '.' >"${have}" echo "${expected_sans}" | jq '.' >"${want}" diff "${have}" "${want}" @@ -561,7 +595,7 @@ check_passwords_leak() { base64 -d <<<$i echo done) $secrets" - pods=$(kubectl -n "${OPERATOR_NS:-$NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') + pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}') collect_logs() { local containers @@ -682,17 +716,17 @@ renew_certificate() { certificate="$1" local pod_name - pod_name=$(kubectl get -n "${OPERATOR_NS:-$NAMESPACE}" pods --selector=name=cmctl -o 'jsonpath={.items[].metadata.name}') + pod_name=$(kubectl get -n "${NAMESPACE}" pods --selector=name=cmctl -o 'jsonpath={.items[].metadata.name}') local revision - revision=$(kubectl get -n "${OPERATOR_NS:-$NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') + revision=$(kubectl get -n "${NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') - kubectl exec -n "${OPERATOR_NS:-$NAMESPACE}" "$pod_name" -- /tmp/cmctl renew "$certificate" + kubectl exec -n "${NAMESPACE}" "$pod_name" -- /tmp/cmctl renew "$certificate" # wait for new revision for i in {1..10}; do local new_revision - new_revision=$(kubectl get -n "${OPERATOR_NS:-$NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') + new_revision=$(kubectl get -n "${NAMESPACE}" certificate "$certificate" -o 'jsonpath={.status.revision}') if [ "$((revision + 1))" == "$new_revision" ]; then break fi @@ -705,6 +739,6 @@ deploy_cmctl() { sed -e "s/percona-server-mysql-operator/$service_account/g" "${DEPLOY_DIR}/rbac.yaml" \ | yq '(select(.rules).rules[] | select(contains({"apiGroups": ["cert-manager.io"]}))).resources += "certificates/status"' \ - | kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f - - kubectl apply -n "${OPERATOR_NS:-$NAMESPACE}" -f "${TESTS_CONFIG_DIR}/cmctl.yml" + | kubectl apply -n "${NAMESPACE}" -f - + kubectl apply -n "${NAMESPACE}" -f "${TESTS_CONFIG_DIR}/cmctl.yml" } diff --git a/e2e-tests/tests/async-ignore-annotations/00-assert.yaml b/e2e-tests/tests/async-ignore-annotations/00-assert.yaml index 1f9a51683..7fb8b8a63 100644 --- a/e2e-tests/tests/async-ignore-annotations/00-assert.yaml +++ b/e2e-tests/tests/async-ignore-annotations/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 \ No newline at end of file diff --git a/e2e-tests/tests/async-ignore-annotations/99-drop-finalizer.yaml b/e2e-tests/tests/async-ignore-annotations/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/async-ignore-annotations/99-drop-finalizer.yaml rename to e2e-tests/tests/async-ignore-annotations/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/async-ignore-annotations/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/async-ignore-annotations/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..b1bfc6309 --- /dev/null +++ b/e2e-tests/tests/async-ignore-annotations/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: async-ignore-annotations +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/auto-config/00-assert.yaml b/e2e-tests/tests/auto-config/00-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/auto-config/00-assert.yaml +++ b/e2e-tests/tests/auto-config/00-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/auto-config/99-drop-finalizer.yaml b/e2e-tests/tests/auto-config/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/auto-config/99-drop-finalizer.yaml rename to e2e-tests/tests/auto-config/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/auto-config/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/auto-config/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..a6e10c6fa --- /dev/null +++ b/e2e-tests/tests/auto-config/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: auto-config +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/config-router/00-assert.yaml b/e2e-tests/tests/config-router/00-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/config-router/00-assert.yaml +++ b/e2e-tests/tests/config-router/00-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/config-router/99-drop-finalizer.yaml b/e2e-tests/tests/config-router/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/config-router/99-drop-finalizer.yaml rename to e2e-tests/tests/config-router/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/config-router/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/config-router/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..2f593b5ee --- /dev/null +++ b/e2e-tests/tests/config-router/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: config-router +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/config/00-assert.yaml b/e2e-tests/tests/config/00-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/config/00-assert.yaml +++ b/e2e-tests/tests/config/00-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/config/99-drop-finalizer.yaml b/e2e-tests/tests/config/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/config/99-drop-finalizer.yaml rename to e2e-tests/tests/config/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/config/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/config/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..7f7ba5f43 --- /dev/null +++ b/e2e-tests/tests/config/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: config +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/demand-backup/01-assert.yaml b/e2e-tests/tests/demand-backup/01-assert.yaml index 30e8e19de..5f346cb51 100644 --- a/e2e-tests/tests/demand-backup/01-assert.yaml +++ b/e2e-tests/tests/demand-backup/01-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/demand-backup/01-deploy-operator.yaml b/e2e-tests/tests/demand-backup/01-deploy-operator.yaml index 3bcf780dd..273c0cc4c 100644 --- a/e2e-tests/tests/demand-backup/01-deploy-operator.yaml +++ b/e2e-tests/tests/demand-backup/01-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions init_temp_dir # do this only in the first TestStep - kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + apply_s3_storage_secrets deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets diff --git a/e2e-tests/tests/demand-backup/02-create-cluster.yaml b/e2e-tests/tests/demand-backup/02-create-cluster.yaml index 5adbd3644..8cb10b271 100644 --- a/e2e-tests/tests/demand-backup/02-create-cluster.yaml +++ b/e2e-tests/tests/demand-backup/02-create-cluster.yaml @@ -9,32 +9,32 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.mysql.clusterType="async"' - \ - | yq eval '.spec.mysql.size=3' - \ - | yq eval '.spec.proxy.haproxy.enabled=true' - \ - | yq eval '.spec.proxy.haproxy.size=3' - \ - | yq eval '.spec.orchestrator.enabled=true' - \ - | yq eval '.spec.orchestrator.size=3' - \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ - | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ - | yq eval '.spec.backup.storages.aws-s3.type="s3"' - \ - | yq eval '.spec.backup.storages.aws-s3.verifyTLS=true' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.credentialsSecret="aws-s3-secret"' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.region="us-east-1"' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.prefix="ps"' - \ - | yq eval '.spec.backup.storages.gcp-cs.type="gcs"' - \ - | yq eval '.spec.backup.storages.gcp-cs.verifyTLS=true' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.credentialsSecret="gcp-cs-secret"' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.endpointUrl="https://storage.googleapis.com"' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.prefix="ps"' - \ - | yq eval '.spec.backup.storages.azure-blob.type="azure"' - \ - | yq eval '.spec.backup.storages.azure-blob.verifyTLS=true' - \ - | yq eval '.spec.backup.storages.azure-blob.azure.containerName="operator-testing"' - \ - | yq eval '.spec.backup.storages.azure-blob.azure.credentialsSecret="azure-secret"' - \ - | yq eval '.spec.backup.storages.azure-blob.azure.prefix="ps"' - \ + | yq eval ".spec.mysql.clusterType=\"async\"" - \ + | yq eval ".spec.mysql.size=3" - \ + | yq eval ".spec.proxy.haproxy.enabled=true" - \ + | yq eval ".spec.proxy.haproxy.size=3" - \ + | yq eval ".spec.orchestrator.enabled=true" - \ + | yq eval ".spec.orchestrator.size=3" - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.minio.s3.credentialsSecret=\"minio-secret\"" - \ + | yq eval ".spec.backup.storages.minio.s3.endpointUrl=\"http://minio-service.${NAMESPACE}:9000\"" - \ + | yq eval ".spec.backup.storages.minio.s3.region=\"us-east-1\"" - \ + | yq eval ".spec.backup.storages.aws-s3.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.aws-s3.verifyTLS=true" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.credentialsSecret=\"aws-s3-secret\"" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.region=\"us-east-1\"" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.prefix=\"ps\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.type=\"gcs\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.verifyTLS=true" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.credentialsSecret=\"gcp-cs-secret\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.endpointUrl=\"https://storage.googleapis.com\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.prefix=\"ps\"" - \ + | yq eval ".spec.backup.storages.azure-blob.type=\"azure\"" - \ + | yq eval ".spec.backup.storages.azure-blob.verifyTLS=true" - \ + | yq eval ".spec.backup.storages.azure-blob.azure.containerName=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.azure-blob.azure.credentialsSecret=\"azure-secret\"" - \ + | yq eval ".spec.backup.storages.azure-blob.azure.prefix=\"ps\"" - \ | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/demand-backup/12-restore-from-minio-backup-source.yaml b/e2e-tests/tests/demand-backup/12-restore-from-minio-backup-source.yaml index a3bca26ea..180c2a84f 100644 --- a/e2e-tests/tests/demand-backup/12-restore-from-minio-backup-source.yaml +++ b/e2e-tests/tests/demand-backup/12-restore-from-minio-backup-source.yaml @@ -21,6 +21,6 @@ commands: | yq eval '.spec.backupSource.storage.type="s3"' - \ | yq eval '.spec.backupSource.storage.s3.bucket="operator-testing"' - \ | yq eval '.spec.backupSource.storage.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backupSource.storage.s3.endpointUrl="http://minio-service:9000"' - \ + | yq eval "$(printf '.spec.backupSource.storage.s3.endpointUrl="http://minio-service.%s:9000"' "${NAMESPACE}")" - \ | yq eval '.spec.backupSource.storage.s3.region="us-east-1"' - \ | kubectl apply -n "${NAMESPACE}" -f - diff --git a/e2e-tests/tests/demand-backup/99-drop-finalizer.yaml b/e2e-tests/tests/demand-backup/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/demand-backup/99-drop-finalizer.yaml rename to e2e-tests/tests/demand-backup/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/demand-backup/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/demand-backup/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..ad7be5598 --- /dev/null +++ b/e2e-tests/tests/demand-backup/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: demand-backup +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml index 30e8e19de..5f346cb51 100644 --- a/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup-haproxy/01-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml index 7e50ded2d..6573d3331 100644 --- a/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml +++ b/e2e-tests/tests/gr-demand-backup-haproxy/02-create-cluster.yaml @@ -9,12 +9,12 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ - | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ - | yq eval '.spec.mysql.clusterType="group-replication"' - \ - | yq eval '.spec.proxy.router.enabled=false' - \ - | yq eval '.spec.proxy.haproxy.enabled=true' - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.minio.s3.credentialsSecret=\"minio-secret\"" - \ + | yq eval ".spec.backup.storages.minio.s3.endpointUrl=\"http://minio-service.${NAMESPACE}:9000\"" - \ + | yq eval ".spec.backup.storages.minio.s3.region=\"us-east-1\"" - \ + | yq eval ".spec.mysql.clusterType=\"group-replication\"" - \ + | yq eval ".spec.proxy.router.enabled=false" - \ + | yq eval ".spec.proxy.haproxy.enabled=true" - \ | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/99-drop-finalizer.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-demand-backup-haproxy/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-demand-backup-haproxy/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-demand-backup-haproxy/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-demand-backup-haproxy/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..1b43659be --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup-haproxy/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-demand-backup-haproxy +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-demand-backup/01-assert.yaml b/e2e-tests/tests/gr-demand-backup/01-assert.yaml index 30e8e19de..5f346cb51 100644 --- a/e2e-tests/tests/gr-demand-backup/01-assert.yaml +++ b/e2e-tests/tests/gr-demand-backup/01-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml b/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml index 3bcf780dd..273c0cc4c 100644 --- a/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml +++ b/e2e-tests/tests/gr-demand-backup/01-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions init_temp_dir # do this only in the first TestStep - kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + apply_s3_storage_secrets deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml b/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml index 27b4cf9ef..99018663e 100644 --- a/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml +++ b/e2e-tests/tests/gr-demand-backup/02-create-cluster.yaml @@ -9,30 +9,30 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.backup.backoffLimit=3' - \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ - | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ - | yq eval '.spec.backup.storages.aws-s3.type="s3"' - \ - | yq eval '.spec.backup.storages.aws-s3.verifyTLS=true' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.credentialsSecret="aws-s3-secret"' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.region="us-east-1"' - \ - | yq eval '.spec.backup.storages.aws-s3.s3.prefix="ps"' - \ - | yq eval '.spec.backup.storages.gcp-cs.type="gcs"' - \ - | yq eval '.spec.backup.storages.gcp-cs.verifyTLS=true' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.credentialsSecret="gcp-cs-secret"' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.endpointUrl="https://storage.googleapis.com"' - \ - | yq eval '.spec.backup.storages.gcp-cs.gcs.prefix="ps"' - \ - | yq eval '.spec.backup.storages.azure-blob.type="azure"' - \ - | yq eval '.spec.backup.storages.azure-blob.verifyTLS=true' - \ - | yq eval '.spec.backup.storages.azure-blob.azure.containerName="operator-testing"' - \ - | yq eval '.spec.backup.storages.azure-blob.azure.credentialsSecret="azure-secret"' - \ - | yq eval '.spec.backup.storages.azure-blob.azure.prefix="ps"' - \ - | yq eval '.spec.mysql.clusterType="group-replication"' - \ - | yq eval '.spec.proxy.router.enabled=true' - \ - | yq eval '.spec.proxy.haproxy.enabled=false' - \ + | yq eval ".spec.backup.backoffLimit=3" - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.minio.s3.credentialsSecret=\"minio-secret\"" - \ + | yq eval ".spec.backup.storages.minio.s3.endpointUrl=\"http://minio-service.${NAMESPACE}:9000\"" - \ + | yq eval ".spec.backup.storages.minio.s3.region=\"us-east-1\"" - \ + | yq eval ".spec.backup.storages.aws-s3.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.aws-s3.verifyTLS=true" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.credentialsSecret=\"aws-s3-secret\"" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.region=\"us-east-1\"" - \ + | yq eval ".spec.backup.storages.aws-s3.s3.prefix=\"ps\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.type=\"gcs\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.verifyTLS=true" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.credentialsSecret=\"gcp-cs-secret\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.endpointUrl=\"https://storage.googleapis.com\"" - \ + | yq eval ".spec.backup.storages.gcp-cs.gcs.prefix=\"ps\"" - \ + | yq eval ".spec.backup.storages.azure-blob.type=\"azure\"" - \ + | yq eval ".spec.backup.storages.azure-blob.verifyTLS=true" - \ + | yq eval ".spec.backup.storages.azure-blob.azure.containerName=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.azure-blob.azure.credentialsSecret=\"azure-secret\"" - \ + | yq eval ".spec.backup.storages.azure-blob.azure.prefix=\"ps\"" - \ + | yq eval ".spec.mysql.clusterType=\"group-replication\"" - \ + | yq eval ".spec.proxy.router.enabled=true" - \ + | yq eval ".spec.proxy.haproxy.enabled=false" - \ | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-demand-backup/99-drop-finalizer.yaml b/e2e-tests/tests/gr-demand-backup/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-demand-backup/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-demand-backup/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-demand-backup/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-demand-backup/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..c49460bfa --- /dev/null +++ b/e2e-tests/tests/gr-demand-backup/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-demand-backup +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-finalizer/01-assert.yaml b/e2e-tests/tests/gr-finalizer/01-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/gr-finalizer/01-assert.yaml +++ b/e2e-tests/tests/gr-finalizer/01-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..140dd8faf --- /dev/null +++ b/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-finalizer +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-haproxy/00-assert.yaml b/e2e-tests/tests/gr-haproxy/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/gr-haproxy/00-assert.yaml +++ b/e2e-tests/tests/gr-haproxy/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-haproxy/99-drop-finalizer.yaml b/e2e-tests/tests/gr-haproxy/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-haproxy/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-haproxy/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-haproxy/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-haproxy/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..19362751e --- /dev/null +++ b/e2e-tests/tests/gr-haproxy/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-haproxy +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-ignore-annotations/00-assert.yaml b/e2e-tests/tests/gr-ignore-annotations/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/gr-ignore-annotations/00-assert.yaml +++ b/e2e-tests/tests/gr-ignore-annotations/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-ignore-annotations/99-drop-finalizer.yaml b/e2e-tests/tests/gr-ignore-annotations/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-ignore-annotations/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-ignore-annotations/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-ignore-annotations/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-ignore-annotations/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..4b18835a2 --- /dev/null +++ b/e2e-tests/tests/gr-ignore-annotations/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-ignore-annotations +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-init-deploy/00-assert.yaml b/e2e-tests/tests/gr-init-deploy/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/gr-init-deploy/00-assert.yaml +++ b/e2e-tests/tests/gr-init-deploy/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-init-deploy/99-drop-finalizer.yaml b/e2e-tests/tests/gr-init-deploy/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-init-deploy/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-init-deploy/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-init-deploy/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-init-deploy/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..2bd9393ea --- /dev/null +++ b/e2e-tests/tests/gr-init-deploy/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-init-deploy +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-one-pod/00-assert.yaml b/e2e-tests/tests/gr-one-pod/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/gr-one-pod/00-assert.yaml +++ b/e2e-tests/tests/gr-one-pod/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml b/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml index 9e0523242..8a1a7a790 100644 --- a/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml +++ b/e2e-tests/tests/gr-one-pod/01-create-cluster.yaml @@ -9,18 +9,18 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.mysql.clusterType="group-replication"' - \ - | yq eval '.spec.proxy.router.enabled=true' - \ - | yq eval '.spec.proxy.haproxy.enabled=false' - \ - | yq eval '.spec.unsafeFlags.mysqlSize=true' - \ - | yq eval '.spec.unsafeFlags.proxySize=true' - \ - | yq eval '.spec.mysql.size=1' - \ - | yq eval '.spec.proxy.haproxy.enabled=false' - \ - | yq eval '.spec.proxy.router.size=1' - \ - | yq eval '.spec.orchestrator.enabled=false' - \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ - | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ + | yq eval ".spec.mysql.clusterType=\"group-replication\"" - \ + | yq eval ".spec.proxy.router.enabled=true" - \ + | yq eval ".spec.proxy.haproxy.enabled=false" - \ + | yq eval ".spec.unsafeFlags.mysqlSize=true" - \ + | yq eval ".spec.unsafeFlags.proxySize=true" - \ + | yq eval ".spec.mysql.size=1" - \ + | yq eval ".spec.proxy.haproxy.enabled=false" - \ + | yq eval ".spec.proxy.router.size=1" - \ + | yq eval ".spec.orchestrator.enabled=false" - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.minio.s3.credentialsSecret=\"minio-secret\"" - \ + | yq eval ".spec.backup.storages.minio.s3.endpointUrl=\"http://minio-service.${NAMESPACE}:9000\"" - \ + | yq eval ".spec.backup.storages.minio.s3.region=\"us-east-1\"" - \ | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-one-pod/99-drop-finalizer.yaml b/e2e-tests/tests/gr-one-pod/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-one-pod/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-one-pod/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-one-pod/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-one-pod/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..69b5a5270 --- /dev/null +++ b/e2e-tests/tests/gr-one-pod/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-one-pod +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-recreate/00-assert.yaml b/e2e-tests/tests/gr-recreate/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/gr-recreate/00-assert.yaml +++ b/e2e-tests/tests/gr-recreate/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-recreate/99-drop-finalizer.yaml b/e2e-tests/tests/gr-recreate/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-recreate/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-recreate/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-recreate/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-recreate/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..00d1c342a --- /dev/null +++ b/e2e-tests/tests/gr-recreate/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-recreate +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-scaling/00-assert.yaml b/e2e-tests/tests/gr-scaling/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/gr-scaling/00-assert.yaml +++ b/e2e-tests/tests/gr-scaling/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-scaling/99-drop-finalizer.yaml b/e2e-tests/tests/gr-scaling/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-scaling/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-scaling/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-scaling/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-scaling/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..2762ca5d0 --- /dev/null +++ b/e2e-tests/tests/gr-scaling/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-scaling +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-security-context/01-assert.yaml b/e2e-tests/tests/gr-security-context/01-assert.yaml index 30e8e19de..5f346cb51 100644 --- a/e2e-tests/tests/gr-security-context/01-assert.yaml +++ b/e2e-tests/tests/gr-security-context/01-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml b/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml index 3bcf780dd..273c0cc4c 100644 --- a/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml +++ b/e2e-tests/tests/gr-security-context/01-deploy-operator.yaml @@ -8,7 +8,7 @@ commands: source ../../functions init_temp_dir # do this only in the first TestStep - kubectl -n "${OPERATOR_NS:-$NAMESPACE}" apply -f "${TESTS_CONFIG_DIR}/cloud-secret.yml" + apply_s3_storage_secrets deploy_operator deploy_non_tls_cluster_secrets deploy_tls_cluster_secrets diff --git a/e2e-tests/tests/gr-security-context/02-create-cluster.yaml b/e2e-tests/tests/gr-security-context/02-create-cluster.yaml index 426830b27..f48b7f768 100644 --- a/e2e-tests/tests/gr-security-context/02-create-cluster.yaml +++ b/e2e-tests/tests/gr-security-context/02-create-cluster.yaml @@ -9,23 +9,23 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ - | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ - | yq eval '.spec.backup.storages.minio.containerSecurityContext.privileged=true' - \ - | yq eval '.spec.backup.storages.minio.podSecurityContext.fsGroup=1001' - \ - | yq eval '.spec.backup.storages.minio.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ - | yq eval '.spec.backup.containerSecurityContext.privileged=false' - \ - | yq eval '.spec.mysql.clusterType="group-replication"' - \ - | yq eval '.spec.mysql.containerSecurityContext.privileged=true' - \ - | yq eval '.spec.mysql.podSecurityContext.fsGroup=1001' - \ - | yq eval '.spec.mysql.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ - | yq eval '.spec.proxy.router.enabled=false' - \ - | yq eval '.spec.proxy.haproxy.enabled=true' - \ - | yq eval '.spec.proxy.haproxy.containerSecurityContext.privileged=true' - \ - | yq eval '.spec.proxy.haproxy.podSecurityContext.fsGroup=1001' - \ - | yq eval '.spec.proxy.haproxy.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]' - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.minio.s3.credentialsSecret=\"minio-secret\"" - \ + | yq eval ".spec.backup.storages.minio.s3.endpointUrl=\"http://minio-service.${NAMESPACE}:9000\"" - \ + | yq eval ".spec.backup.storages.minio.s3.region=\"us-east-1\"" - \ + | yq eval ".spec.backup.storages.minio.containerSecurityContext.privileged=true" - \ + | yq eval ".spec.backup.storages.minio.podSecurityContext.fsGroup=1001" - \ + | yq eval ".spec.backup.storages.minio.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]" - \ + | yq eval ".spec.backup.containerSecurityContext.privileged=false" - \ + | yq eval ".spec.mysql.clusterType=\"group-replication\"" - \ + | yq eval ".spec.mysql.containerSecurityContext.privileged=true" - \ + | yq eval ".spec.mysql.podSecurityContext.fsGroup=1001" - \ + | yq eval ".spec.mysql.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]" - \ + | yq eval ".spec.proxy.router.enabled=false" - \ + | yq eval ".spec.proxy.haproxy.enabled=true" - \ + | yq eval ".spec.proxy.haproxy.containerSecurityContext.privileged=true" - \ + | yq eval ".spec.proxy.haproxy.podSecurityContext.fsGroup=1001" - \ + | yq eval ".spec.proxy.haproxy.podSecurityContext.supplementalGroups |= [1001, 1002, 1003]" - \ | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/gr-security-context/05-assert.yaml b/e2e-tests/tests/gr-security-context/05-assert.yaml index 54c1d9065..b10ca5a0a 100644 --- a/e2e-tests/tests/gr-security-context/05-assert.yaml +++ b/e2e-tests/tests/gr-security-context/05-assert.yaml @@ -20,6 +20,5 @@ status: s3: bucket: operator-testing credentialsSecret: minio-secret - endpointUrl: http://minio-service:9000 region: us-east-1 type: s3 diff --git a/e2e-tests/tests/gr-security-context/99-drop-finalizer.yaml b/e2e-tests/tests/gr-security-context/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-security-context/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-security-context/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-security-context/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-security-context/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..0001c2b7a --- /dev/null +++ b/e2e-tests/tests/gr-security-context/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-security-context +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-self-healing/99-drop-finalizer.yaml b/e2e-tests/tests/gr-self-healing/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-self-healing/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-self-healing/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-self-healing/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-self-healing/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..60cb7a29d --- /dev/null +++ b/e2e-tests/tests/gr-self-healing/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-self-healing +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-tls-cert-manager/01-assert.yaml b/e2e-tests/tests/gr-tls-cert-manager/01-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/01-assert.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/01-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/gr-tls-cert-manager/99-drop-finalizer.yaml b/e2e-tests/tests/gr-tls-cert-manager/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-tls-cert-manager/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-tls-cert-manager/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..f22aab97d --- /dev/null +++ b/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-tls-cert-manager +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/gr-users/00-assert.yaml b/e2e-tests/tests/gr-users/00-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/gr-users/00-assert.yaml +++ b/e2e-tests/tests/gr-users/00-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/gr-users/99-drop-finalizer.yaml b/e2e-tests/tests/gr-users/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/gr-users/99-drop-finalizer.yaml rename to e2e-tests/tests/gr-users/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/gr-users/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-users/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..5315ef624 --- /dev/null +++ b/e2e-tests/tests/gr-users/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: gr-users +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/haproxy/00-assert.yaml b/e2e-tests/tests/haproxy/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/haproxy/00-assert.yaml +++ b/e2e-tests/tests/haproxy/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/haproxy/99-drop-finalizer.yaml b/e2e-tests/tests/haproxy/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/haproxy/99-drop-finalizer.yaml rename to e2e-tests/tests/haproxy/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/haproxy/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/haproxy/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..a83ca4681 --- /dev/null +++ b/e2e-tests/tests/haproxy/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: haproxy +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/init-deploy/00-assert.yaml b/e2e-tests/tests/init-deploy/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/init-deploy/00-assert.yaml +++ b/e2e-tests/tests/init-deploy/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/init-deploy/99-drop-finalizer.yaml b/e2e-tests/tests/init-deploy/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/init-deploy/99-drop-finalizer.yaml rename to e2e-tests/tests/init-deploy/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/init-deploy/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/init-deploy/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..e38775fea --- /dev/null +++ b/e2e-tests/tests/init-deploy/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: init-deploy +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/limits/00-assert.yaml b/e2e-tests/tests/limits/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/limits/00-assert.yaml +++ b/e2e-tests/tests/limits/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/limits/99-drop-finalizer.yaml b/e2e-tests/tests/limits/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/limits/99-drop-finalizer.yaml rename to e2e-tests/tests/limits/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/limits/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/limits/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..6167675ed --- /dev/null +++ b/e2e-tests/tests/limits/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: limits +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/monitoring/00-assert.yaml b/e2e-tests/tests/monitoring/00-assert.yaml index 41a42ab02..d9146fe1b 100644 --- a/e2e-tests/tests/monitoring/00-assert.yaml +++ b/e2e-tests/tests/monitoring/00-assert.yaml @@ -17,9 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - readyReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/monitoring/99-drop-finalizer.yaml b/e2e-tests/tests/monitoring/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/monitoring/99-drop-finalizer.yaml rename to e2e-tests/tests/monitoring/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/monitoring/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/monitoring/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..38aa6ddc4 --- /dev/null +++ b/e2e-tests/tests/monitoring/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: monitoring +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/one-pod/00-assert.yaml b/e2e-tests/tests/one-pod/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/one-pod/00-assert.yaml +++ b/e2e-tests/tests/one-pod/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/one-pod/01-create-cluster.yaml b/e2e-tests/tests/one-pod/01-create-cluster.yaml index 50e3928ff..c1f1fdefc 100644 --- a/e2e-tests/tests/one-pod/01-create-cluster.yaml +++ b/e2e-tests/tests/one-pod/01-create-cluster.yaml @@ -9,18 +9,18 @@ commands: source ../../functions get_cr \ - | yq eval '.spec.mysql.clusterType="async"' - \ - | yq eval '.spec.unsafeFlags.mysqlSize=true' - \ - | yq eval '.spec.unsafeFlags.proxySize=true' - \ - | yq eval '.spec.unsafeFlags.orchestratorSize=true' - \ - | yq eval '.spec.mysql.size=1' - \ - | yq eval '.spec.proxy.haproxy.enabled=true' - \ - | yq eval '.spec.proxy.haproxy.size=1' - \ - | yq eval '.spec.orchestrator.enabled=true' - \ - | yq eval '.spec.orchestrator.size=1' - \ - | yq eval '.spec.backup.storages.minio.type="s3"' - \ - | yq eval '.spec.backup.storages.minio.s3.bucket="operator-testing"' - \ - | yq eval '.spec.backup.storages.minio.s3.credentialsSecret="minio-secret"' - \ - | yq eval '.spec.backup.storages.minio.s3.endpointUrl="http://minio-service:9000"' - \ - | yq eval '.spec.backup.storages.minio.s3.region="us-east-1"' - \ + | yq eval ".spec.mysql.clusterType=\"async\"" - \ + | yq eval ".spec.unsafeFlags.mysqlSize=true" - \ + | yq eval ".spec.unsafeFlags.proxySize=true" - \ + | yq eval ".spec.unsafeFlags.orchestratorSize=true" - \ + | yq eval ".spec.mysql.size=1" - \ + | yq eval ".spec.proxy.haproxy.enabled=true" - \ + | yq eval ".spec.proxy.haproxy.size=1" - \ + | yq eval ".spec.orchestrator.enabled=true" - \ + | yq eval ".spec.orchestrator.size=1" - \ + | yq eval ".spec.backup.storages.minio.type=\"s3\"" - \ + | yq eval ".spec.backup.storages.minio.s3.bucket=\"operator-testing\"" - \ + | yq eval ".spec.backup.storages.minio.s3.credentialsSecret=\"minio-secret\"" - \ + | yq eval ".spec.backup.storages.minio.s3.endpointUrl=\"http://minio-service.${NAMESPACE}:9000\"" - \ + | yq eval ".spec.backup.storages.minio.s3.region=\"us-east-1\"" - \ | kubectl -n "${NAMESPACE}" apply -f - diff --git a/e2e-tests/tests/one-pod/99-drop-finalizer.yaml b/e2e-tests/tests/one-pod/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/one-pod/99-drop-finalizer.yaml rename to e2e-tests/tests/one-pod/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/one-pod/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/one-pod/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..d830841f7 --- /dev/null +++ b/e2e-tests/tests/one-pod/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: one-pod +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/operator-self-healing/99-drop-finalizer.yaml b/e2e-tests/tests/operator-self-healing/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/operator-self-healing/99-drop-finalizer.yaml rename to e2e-tests/tests/operator-self-healing/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/operator-self-healing/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/operator-self-healing/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..361dc650a --- /dev/null +++ b/e2e-tests/tests/operator-self-healing/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: operator-self-healing +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/recreate/00-assert.yaml b/e2e-tests/tests/recreate/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/recreate/00-assert.yaml +++ b/e2e-tests/tests/recreate/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/recreate/99-drop-finalizer.yaml b/e2e-tests/tests/recreate/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/recreate/99-drop-finalizer.yaml rename to e2e-tests/tests/recreate/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/recreate/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/recreate/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..77aa2a53b --- /dev/null +++ b/e2e-tests/tests/recreate/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: recreate +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/scaling/00-assert.yaml b/e2e-tests/tests/scaling/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/scaling/00-assert.yaml +++ b/e2e-tests/tests/scaling/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/scaling/99-drop-finalizer.yaml b/e2e-tests/tests/scaling/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/scaling/99-drop-finalizer.yaml rename to e2e-tests/tests/scaling/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/scaling/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/scaling/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..c7b43f23a --- /dev/null +++ b/e2e-tests/tests/scaling/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: scaling +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/service-per-pod/00-assert.yaml b/e2e-tests/tests/service-per-pod/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/service-per-pod/00-assert.yaml +++ b/e2e-tests/tests/service-per-pod/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/service-per-pod/99-drop-finalizer.yaml b/e2e-tests/tests/service-per-pod/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/service-per-pod/99-drop-finalizer.yaml rename to e2e-tests/tests/service-per-pod/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/service-per-pod/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/service-per-pod/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..5c9fa8169 --- /dev/null +++ b/e2e-tests/tests/service-per-pod/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: service-per-pod +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/sidecars/00-assert.yaml b/e2e-tests/tests/sidecars/00-assert.yaml index 1f9a51683..d9146fe1b 100644 --- a/e2e-tests/tests/sidecars/00-assert.yaml +++ b/e2e-tests/tests/sidecars/00-assert.yaml @@ -17,13 +17,10 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/sidecars/99-drop-finalizer.yaml b/e2e-tests/tests/sidecars/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/sidecars/99-drop-finalizer.yaml rename to e2e-tests/tests/sidecars/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/sidecars/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/sidecars/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..dad8c9250 --- /dev/null +++ b/e2e-tests/tests/sidecars/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: sidecars +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/smart-update/00-assert.yaml b/e2e-tests/tests/smart-update/00-assert.yaml index 0a8381628..3cb457ee5 100644 --- a/e2e-tests/tests/smart-update/00-assert.yaml +++ b/e2e-tests/tests/smart-update/00-assert.yaml @@ -17,93 +17,31 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod metadata: name: mysql-client --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-version-service -spec: - progressDeadlineSeconds: 600 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - name: percona-version-service - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - name: percona-version-service - spec: - containers: - - env: - - name: SERVE_HTTP - value: "true" - imagePullPolicy: Always - name: percona-version-service - ports: - - containerPort: 11000 - name: http - protocol: TCP - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /sources/operator.9.9.9.ps-operator.dep.json - name: versions - subPath: operator.9.9.9.ps-operator.dep.json - - mountPath: /sources/operator.9.9.9.ps-operator.json - name: versions - subPath: operator.9.9.9.ps-operator.json - dnsPolicy: ClusterFirst - restartPolicy: Always - schedulerName: default-scheduler - securityContext: {} - terminationGracePeriodSeconds: 30 - volumes: - - configMap: - defaultMode: 420 - name: versions - name: versions -status: - readyReplicas: 1 + name: check-version-service-svc-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced service percona-version-service -n ${OPERATOR_NS:-$NAMESPACE} --- -apiVersion: v1 -kind: Service +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - labels: - name: percona-version-service - name: percona-version-service -spec: - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - port: 80 - protocol: TCP - targetPort: 11000 - selector: - name: percona-version-service - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} + name: check-version-service-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-version-service -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 diff --git a/e2e-tests/tests/smart-update/99-drop-finalizer.yaml b/e2e-tests/tests/smart-update/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/smart-update/99-drop-finalizer.yaml rename to e2e-tests/tests/smart-update/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/smart-update/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/smart-update/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..12f131b41 --- /dev/null +++ b/e2e-tests/tests/smart-update/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: smart-update +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/tls-cert-manager/01-assert.yaml b/e2e-tests/tests/tls-cert-manager/01-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/tls-cert-manager/01-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/01-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/tls-cert-manager/99-drop-finalizer.yaml b/e2e-tests/tests/tls-cert-manager/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/tls-cert-manager/99-drop-finalizer.yaml rename to e2e-tests/tests/tls-cert-manager/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..69263f983 --- /dev/null +++ b/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: tls-cert-manager +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/users/00-assert.yaml b/e2e-tests/tests/users/00-assert.yaml index b30c7d718..9cffe0eb4 100644 --- a/e2e-tests/tests/users/00-assert.yaml +++ b/e2e-tests/tests/users/00-assert.yaml @@ -17,16 +17,13 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod diff --git a/e2e-tests/tests/users/99-drop-finalizer.yaml b/e2e-tests/tests/users/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/users/99-drop-finalizer.yaml rename to e2e-tests/tests/users/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/users/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/users/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..96f26084d --- /dev/null +++ b/e2e-tests/tests/users/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: users +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/e2e-tests/tests/version-service/00-assert.yaml b/e2e-tests/tests/version-service/00-assert.yaml index 0a8381628..5f235ad00 100644 --- a/e2e-tests/tests/version-service/00-assert.yaml +++ b/e2e-tests/tests/version-service/00-assert.yaml @@ -17,93 +17,31 @@ spec: singular: perconaservermysql scope: Namespaced --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-server-mysql-operator -status: - availableReplicas: 1 - observedGeneration: 1 - readyReplicas: 1 - replicas: 1 - updatedReplicas: 1 + name: check-operator-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 --- apiVersion: v1 kind: Pod metadata: name: mysql-client --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - name: percona-version-service -spec: - progressDeadlineSeconds: 600 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - name: percona-version-service - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - name: percona-version-service - spec: - containers: - - env: - - name: SERVE_HTTP - value: "true" - imagePullPolicy: Always - name: percona-version-service - ports: - - containerPort: 11000 - name: http - protocol: TCP - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /sources/operator.9.9.9.ps-operator.dep.json - name: versions - subPath: operator.9.9.9.ps-operator.dep.json - - mountPath: /sources/operator.9.9.9.ps-operator.json - name: versions - subPath: operator.9.9.9.ps-operator.json - dnsPolicy: ClusterFirst - restartPolicy: Always - schedulerName: default-scheduler - securityContext: {} - terminationGracePeriodSeconds: 30 - volumes: - - configMap: - defaultMode: 420 - name: versions - name: versions -status: - readyReplicas: 1 + name: check-version-service-svc-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced service percona-version-service -n ${OPERATOR_NS:-$NAMESPACE} --- -apiVersion: v1 -kind: Service +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert metadata: - labels: - name: percona-version-service - name: percona-version-service -spec: - ipFamilies: - - IPv4 - ipFamilyPolicy: SingleStack - ports: - - port: 80 - protocol: TCP - targetPort: 11000 - selector: - name: percona-version-service - sessionAffinity: None - type: ClusterIP -status: - loadBalancer: {} + name: check-version-service-deploy-status +timeout: 120 +commands: + - script: kubectl assert exist-enhanced deployment percona-version-service -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 \ No newline at end of file diff --git a/e2e-tests/tests/version-service/99-drop-finalizer.yaml b/e2e-tests/tests/version-service/98-drop-finalizer.yaml similarity index 100% rename from e2e-tests/tests/version-service/99-drop-finalizer.yaml rename to e2e-tests/tests/version-service/98-drop-finalizer.yaml diff --git a/e2e-tests/tests/version-service/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/version-service/99-remove-cluster-gracefully.yaml new file mode 100644 index 000000000..268668e4a --- /dev/null +++ b/e2e-tests/tests/version-service/99-remove-cluster-gracefully.yaml @@ -0,0 +1,16 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: ps.percona.com/v1alpha1 + kind: PerconaServerMySQL + metadata: + name: version-service +commands: + - script: |- + set -o errexit + set -o xtrace + + source ../../functions + + destroy_operator + timeout: 60 diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index c54ce9528..3e530788c 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -71,6 +71,9 @@ type PerconaServerMySQLReconciler struct { //+kubebuilder:rbac:groups="",resources=events,verbs=create;patch //+kubebuilder:rbac:groups=apps,resources=statefulsets;deployments,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=certmanager.k8s.io;cert-manager.io,resources=issuers;certificates,verbs=get;list;watch;create;update;patch;delete;deletecollection +//+kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;patch +//+kubebuilder:rbac:groups="",resources=rolebindings,verbs=get;list;watch;create;patch +//+kubebuilder:rbac:groups="",resources=roles,verbs=get;list;watch;create;patch // SetupWithManager sets up the controller with the Manager. func (r *PerconaServerMySQLReconciler) SetupWithManager(mgr ctrl.Manager) error { @@ -577,6 +580,17 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context return nil } + role, binding, sa := orchestrator.RBAC(cr) + if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, role, r.Scheme); err != nil { + return errors.Wrap(err, "create role") + } + if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, sa, r.Scheme); err != nil { + return errors.Wrap(err, "create service account") + } + if err := k8s.EnsureObjectWithHash(ctx, r.Client, cr, binding, r.Scheme); err != nil { + return errors.Wrap(err, "create role binding") + } + cmap := &corev1.ConfigMap{} err := r.Client.Get(ctx, orchestrator.NamespacedName(cr), cmap) if client.IgnoreNotFound(err) != nil { @@ -897,7 +911,7 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con return nil } -func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL, exposer Exposer) error { +func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Context, exposer Exposer) error { log := logf.FromContext(ctx).WithName("cleanupOutdatedServices") size := int(exposer.Size()) svcNames := make(map[string]struct{}, size) @@ -937,7 +951,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Conte func (r *PerconaServerMySQLReconciler) cleanupMysql(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { if !cr.Spec.Pause { mysqlExposer := mysql.Exposer(*cr) - if err := r.cleanupOutdatedServices(ctx, cr, &mysqlExposer); err != nil { + if err := r.cleanupOutdatedServices(ctx, &mysqlExposer); err != nil { return errors.Wrap(err, "cleanup MySQL services") } } @@ -951,7 +965,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOrchestrator(ctx context.Context, } orcExposer := orchestrator.Exposer(*cr) - if err := r.cleanupOutdatedServices(ctx, cr, &orcExposer); err != nil { + if err := r.cleanupOutdatedServices(ctx, &orcExposer); err != nil { return errors.Wrap(err, "cleanup Orchestrator services") } } diff --git a/pkg/orchestrator/orchestrator.go b/pkg/orchestrator/orchestrator.go index e1bfea8b8..84d87bdb3 100644 --- a/pkg/orchestrator/orchestrator.go +++ b/pkg/orchestrator/orchestrator.go @@ -8,6 +8,7 @@ import ( "github.com/pkg/errors" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" @@ -479,3 +480,42 @@ func ConfigMapData(cr *apiv1alpha1.PerconaServerMySQL) (map[string]string, error return cmData, nil } + +func RBAC(cr *apiv1alpha1.PerconaServerMySQL) (*rbacv1.Role, *rbacv1.RoleBinding, *corev1.ServiceAccount) { + meta := metav1.ObjectMeta{ + Namespace: cr.Namespace, + Name: "percona-server-mysql-operator-orchestrator", + } + + account := &corev1.ServiceAccount{ObjectMeta: meta} + account.SetGroupVersionKind(corev1.SchemeGroupVersion.WithKind("ServiceAccount")) + + role := &rbacv1.Role{ObjectMeta: meta} + role.SetGroupVersionKind(rbacv1.SchemeGroupVersion.WithKind("Role")) + role.Rules = []rbacv1.PolicyRule{ + { + APIGroups: []string{corev1.SchemeGroupVersion.Group}, + Resources: []string{"pods"}, + Verbs: []string{"list", "patch"}, + }, + { + APIGroups: []string{cr.GroupVersionKind().Group}, + Resources: []string{"perconaservermysqls"}, + Verbs: []string{"get"}, + }, + } + + binding := &rbacv1.RoleBinding{ObjectMeta: meta} + binding.SetGroupVersionKind(rbacv1.SchemeGroupVersion.WithKind("RoleBinding")) + binding.RoleRef = rbacv1.RoleRef{ + APIGroup: rbacv1.SchemeGroupVersion.Group, + Kind: role.Kind, + Name: role.Name, + } + binding.Subjects = []rbacv1.Subject{{ + Kind: account.Kind, + Name: account.Name, + }} + + return role, binding, account +} From 64f1d7180875ec123c55eb292906ec97fe2d81c2 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Mon, 1 Jul 2024 18:06:47 +0200 Subject: [PATCH 178/192] Log async replication not ready. (#688) --- pkg/controller/ps/status.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index 34c9c1d3c..15cced88e 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -85,6 +85,7 @@ func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr if !ready { mysqlStatus.State = apiv1alpha1.StateInitializing + log.Info(fmt.Sprintf("Async replication not ready: %s", msg)) r.Recorder.Event(cr, "Warning", "AsyncReplicationNotReady", msg) } From 57bb5426228304f69723a705c45c8391fee79a05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:07:32 +0300 Subject: [PATCH 179/192] CLOUD-727: Bump aquasecurity/trivy-action from 0.22.0 to 0.23.0 (#687) Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.22.0...0.23.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- .github/workflows/scan.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 8598d488a..20cb475b4 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -31,7 +31,7 @@ jobs: ./e2e-tests/build - name: Run Trivy vulnerability scanner image (linux/arm64) - uses: aquasecurity/trivy-action@0.22.0 + uses: aquasecurity/trivy-action@0.23.0 with: image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64' format: 'table' @@ -49,7 +49,7 @@ jobs: ./e2e-tests/build - name: Run Trivy vulnerability scanner image (linux/amd64) - uses: aquasecurity/trivy-action@0.22.0 + uses: aquasecurity/trivy-action@0.23.0 with: image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64' format: 'table' From 4253b9d8aa177d104571b9f5719563e83515e660 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Tue, 2 Jul 2024 10:36:23 +0200 Subject: [PATCH 180/192] Correct apigroup for role/rolebingins perms in single-namespace rbac files. (#691) --- config/rbac/role.yaml | 40 ++++++++++++++++----------------- deploy/bundle.yaml | 40 ++++++++++++++++----------------- deploy/rbac.yaml | 40 ++++++++++++++++----------------- pkg/controller/ps/controller.go | 4 ++-- 4 files changed, 62 insertions(+), 62 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 343ea8646..af27bdfb5 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -39,26 +39,6 @@ rules: - patch - update - watch -- apiGroups: - - "" - resources: - - rolebindings - verbs: - - create - - get - - list - - patch - - watch -- apiGroups: - - "" - resources: - - roles - verbs: - - create - - get - - list - - patch - - watch - apiGroups: - "" resources: @@ -151,3 +131,23 @@ rules: - patch - update - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + verbs: + - create + - get + - list + - patch + - watch diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index e88d4743e..0f7e26367 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -10152,26 +10152,6 @@ rules: - patch - update - watch -- apiGroups: - - "" - resources: - - rolebindings - verbs: - - create - - get - - list - - patch - - watch -- apiGroups: - - "" - resources: - - roles - verbs: - - create - - get - - list - - patch - - watch - apiGroups: - "" resources: @@ -10264,6 +10244,26 @@ rules: - patch - update - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + verbs: + - create + - get + - list + - patch + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index 7c765ebb4..4ad6271a5 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -80,26 +80,6 @@ rules: - patch - update - watch -- apiGroups: - - "" - resources: - - rolebindings - verbs: - - create - - get - - list - - patch - - watch -- apiGroups: - - "" - resources: - - roles - verbs: - - create - - get - - list - - patch - - watch - apiGroups: - "" resources: @@ -192,6 +172,26 @@ rules: - patch - update - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + verbs: + - create + - get + - list + - patch + - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + verbs: + - create + - get + - list + - patch + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 3e530788c..66108464c 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -72,8 +72,8 @@ type PerconaServerMySQLReconciler struct { //+kubebuilder:rbac:groups=apps,resources=statefulsets;deployments,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=certmanager.k8s.io;cert-manager.io,resources=issuers;certificates,verbs=get;list;watch;create;update;patch;delete;deletecollection //+kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;patch -//+kubebuilder:rbac:groups="",resources=rolebindings,verbs=get;list;watch;create;patch -//+kubebuilder:rbac:groups="",resources=roles,verbs=get;list;watch;create;patch +//+kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;patch +//+kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;patch // SetupWithManager sets up the controller with the Manager. func (r *PerconaServerMySQLReconciler) SetupWithManager(mgr ctrl.Manager) error { From 3eee82e4e0f2011217f3d7c49ad7a72044f9facc Mon Sep 17 00:00:00 2001 From: Viacheslav Sarzhan Date: Tue, 2 Jul 2024 16:34:42 +0300 Subject: [PATCH 181/192] K8SPS-328 destroy cert-manager (#692) * destroy cert-manager * Update e2e-tests/functions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- e2e-tests/functions | 5 +++++ .../tests/gr-finalizer/99-remove-cluster-gracefully.yaml | 1 + .../gr-tls-cert-manager/99-remove-cluster-gracefully.yaml | 1 + .../tests/tls-cert-manager/99-remove-cluster-gracefully.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/e2e-tests/functions b/e2e-tests/functions index 954c98636..a8316683b 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -558,6 +558,11 @@ deploy_cert_manager() { kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v${CERT_MANAGER_VER}/cert-manager.yaml --validate=false || : 2>/dev/null } +destroy_cert_manager() { + kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v${CERT_MANAGER_VER}/cert-manager.yaml --validate=false || : 2>/dev/null + kubectl delete --grace-period=0 --force=true namespace cert-manager +} + get_primary_from_label() { kubectl -n "${NAMESPACE}" get pods -l mysql.percona.com/primary=true -ojsonpath="{.items[0].metadata.name}" } diff --git a/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml index 140dd8faf..8eca97cee 100644 --- a/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml +++ b/e2e-tests/tests/gr-finalizer/99-remove-cluster-gracefully.yaml @@ -12,5 +12,6 @@ commands: source ../../functions + destroy_cert_manager destroy_operator timeout: 60 diff --git a/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml index f22aab97d..4742d4588 100644 --- a/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml +++ b/e2e-tests/tests/gr-tls-cert-manager/99-remove-cluster-gracefully.yaml @@ -12,5 +12,6 @@ commands: source ../../functions + destroy_cert_manager destroy_operator timeout: 60 diff --git a/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml b/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml index 69263f983..580d0b392 100644 --- a/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml +++ b/e2e-tests/tests/tls-cert-manager/99-remove-cluster-gracefully.yaml @@ -12,5 +12,6 @@ commands: source ../../functions + destroy_cert_manager destroy_operator timeout: 60 From 59c524c707024460ffede9bd9cd64d58bf14a8a3 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Wed, 3 Jul 2024 17:37:31 +0200 Subject: [PATCH 182/192] Reconcile status only on a non-nil CR. (#696) --- pkg/controller/ps/status.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index 15cced88e..b8f3b5632 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -29,6 +29,10 @@ import ( ) func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL, reconcileErr error) error { + if cr == nil || cr.ObjectMeta.DeletionTimestamp != nil { + return nil + } + clusterCondition := metav1.Condition{ Status: metav1.ConditionTrue, Type: apiv1alpha1.StateInitializing.String(), @@ -56,10 +60,6 @@ func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr log := logf.FromContext(ctx).WithName("reconcileCRStatus") - if cr == nil || cr.ObjectMeta.DeletionTimestamp != nil { - return nil - } - mysqlStatus, err := r.appStatus(ctx, cr, mysql.Name(cr), cr.MySQLSpec().Size, mysql.MatchLabels(cr), cr.Status.MySQL.Version) if err != nil { return errors.Wrap(err, "get MySQL status") From e6c3ed5d980eaefe04e91877b2b4ba880ffec4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Wed, 3 Jul 2024 21:45:16 +0300 Subject: [PATCH 183/192] K8SPS-370: Unsafe improvements (#690) * K8SPS-370: Unsafe improvements * fix tests * fix haproxy check in async * address review comments * fix tls-cert-manager --------- Co-authored-by: Viacheslav Sarzhan --- api/v1alpha1/perconaservermysql_types.go | 91 ++++++++++--------- deploy/cr.yaml | 2 +- .../tests/tls-cert-manager/02-assert.yaml | 2 +- .../tests/tls-cert-manager/04-assert.yaml | 2 +- .../tests/tls-cert-manager/06-assert.yaml | 2 +- pkg/controller/ps/controller_test.go | 1 + pkg/controller/ps/version_test.go | 10 ++ 7 files changed, 61 insertions(+), 49 deletions(-) diff --git a/api/v1alpha1/perconaservermysql_types.go b/api/v1alpha1/perconaservermysql_types.go index 33d455a7a..7d9ee26b9 100644 --- a/api/v1alpha1/perconaservermysql_types.go +++ b/api/v1alpha1/perconaservermysql_types.go @@ -33,7 +33,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" - logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/percona/percona-server-mysql-operator/pkg/naming" "github.com/percona/percona-server-mysql-operator/pkg/platform" @@ -93,6 +92,7 @@ const ( MinSafeProxySize = 2 MinSafeGRSize = 3 MaxSafeGRSize = 9 + MinSafeAsyncSize = 2 ) // Checks if the provided ClusterType is valid. @@ -526,7 +526,6 @@ func (cr *PerconaServerMySQL) SetVersion() { // CheckNSetDefaults validates and sets default values for the PerconaServerMySQL custom resource. func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersion *platform.ServerVersion) error { - log := logf.FromContext(ctx).WithName("CheckNSetDefaults") if len(cr.Spec.MySQL.ClusterType) == 0 { cr.Spec.MySQL.ClusterType = ClusterTypeAsync } @@ -691,25 +690,59 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi cr.Spec.MySQL.reconcileAffinityOpts() cr.Spec.Orchestrator.reconcileAffinityOpts() - if oSize := int(cr.Spec.Orchestrator.Size); cr.OrchestratorEnabled() && (oSize < 3 || oSize%2 == 0) && oSize != 0 && !cr.Spec.Unsafe.OrchestratorSize { - return errors.New("Orchestrator size must be 3 or greater and an odd number for raft setup. Enable spec.unsafeFlags.orchestratorSize to bypass this check") + if cr.Spec.MySQL.Size == 1 { + cr.Spec.UpdateStrategy = appsv1.RollingUpdateStatefulSetStrategyType } - if cr.Spec.MySQL.ClusterType == ClusterTypeGR && cr.Spec.Proxy.Router == nil { - return errors.New("router section is needed for group replication") + if cr.Spec.MySQL.ClusterType == ClusterTypeGR { + if !cr.Spec.Proxy.Router.Enabled && !cr.Spec.Proxy.HAProxy.Enabled && !cr.Spec.Unsafe.Proxy { + return errors.New("MySQL Router or HAProxy must be enabled for Group Replication. Enable spec.unsafeFlags.proxy to bypass this check") + } + + if cr.RouterEnabled() && !cr.Spec.Unsafe.ProxySize { + if cr.Spec.Proxy.Router.Size < MinSafeProxySize { + return errors.Errorf("Router size should be %d or greater. Enable spec.unsafeFlags.proxySize to set a lower size", MinSafeProxySize) + } + } + + if !cr.Spec.Unsafe.MySQLSize { + if cr.Spec.MySQL.Size < MinSafeGRSize { + return errors.Errorf("MySQL size should be %d or greater for Group Replication. Enable spec.unsafeFlags.mysqlSize to set a lower size", MinSafeGRSize) + } + + if cr.Spec.MySQL.Size > MaxSafeGRSize { + return errors.Errorf("MySQL size should be %d or lower for Group Replication. Enable spec.unsafeFlags.mysqlSize to set a higher size", MaxSafeGRSize) + } + + if cr.Spec.MySQL.Size%2 == 0 { + return errors.New("MySQL size should be an odd number for Group Replication. Enable spec.unsafeFlags.mysqlSize to set an even number") + } + } } - if cr.Spec.MySQL.ClusterType == ClusterTypeGR && !cr.Spec.Unsafe.MySQLSize { - if cr.Spec.MySQL.Size < MinSafeGRSize { - return errors.Errorf("MySQL size should be %d or greater for Group Replication. Enable spec.unsafeFlags.mysqlSize to set a lower size", MinSafeGRSize) + if cr.Spec.MySQL.ClusterType == ClusterTypeAsync { + if !cr.Spec.Unsafe.MySQLSize && cr.Spec.MySQL.Size < MinSafeAsyncSize { + return errors.Errorf("MySQL size should be %d or greater for asynchronous replication. Enable spec.unsafeFlags.mysqlSize to set a lower size", MinSafeAsyncSize) + } + + if !cr.Spec.Unsafe.Orchestrator && !cr.Spec.Orchestrator.Enabled { + return errors.New("Orchestrator must be enabled for asynchronous replication. Enable spec.unsafeFlags.orchestrator to bypass this check") + } + + if oSize := int(cr.Spec.Orchestrator.Size); cr.OrchestratorEnabled() && (oSize < 3 || oSize%2 == 0) && oSize != 0 && !cr.Spec.Unsafe.OrchestratorSize { + return errors.New("Orchestrator size must be 3 or greater and an odd number for raft setup. Enable spec.unsafeFlags.orchestratorSize to bypass this check") + } + + if !cr.Spec.Orchestrator.Enabled && cr.Spec.UpdateStrategy == SmartUpdateStatefulSetStrategyType { + return errors.Errorf("Orchestrator must be enabled to use SmartUpdate. Either enable Orchestrator or set spec.updateStrategy to %s", appsv1.RollingUpdateStatefulSetStrategyType) } - if cr.Spec.MySQL.Size > MaxSafeGRSize { - return errors.Errorf("MySQL size should be %d or lower for Group Replication. Enable spec.unsafeFlags.mysqlSize to set a higher size", MaxSafeGRSize) + if !cr.Spec.Unsafe.Proxy && !cr.HAProxyEnabled() { + return errors.New("HAProxy must be enabled for asynchronous replication. Enable spec.unsafeFlags.proxy to bypass this check") } - if cr.Spec.MySQL.Size%2 == 0 { - return errors.New("MySQL size should be an odd number for Group Replication. Enable spec.unsafeFlags.mysqlSize to set an even number") + if cr.RouterEnabled() { + return errors.New("MySQL Router can't be enabled for asynchronous replication") } } @@ -717,12 +750,6 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi return errors.New("MySQL Router and HAProxy can't be enabled at the same time") } - if cr.RouterEnabled() && !cr.Spec.Unsafe.ProxySize { - if cr.Spec.Proxy.Router.Size < MinSafeProxySize { - return errors.Errorf("Router size should be %d or greater. Enable spec.unsafeFlags.proxySize to set a lower size", MinSafeProxySize) - } - } - if cr.Spec.Proxy.HAProxy == nil { cr.Spec.Proxy.HAProxy = new(HAProxySpec) } @@ -733,18 +760,6 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi } } - if cr.Spec.MySQL.ClusterType != ClusterTypeGR && !cr.OrchestratorEnabled() { - switch cr.Generation { - case 1: - if cr.Spec.MySQL.Size > 1 { - return errors.New("mysql size should be 1 when orchestrator is disabled") - } - default: - cr.Spec.Orchestrator.Enabled = true - log.Info("orchestrator can't be disabled on an existing cluster") - } - } - if cr.Spec.PMM == nil { cr.Spec.PMM = new(PMMSpec) } @@ -764,12 +779,6 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi cr.Spec.SSLSecretName = cr.Name + "-ssl" } - if cr.Spec.UpdateStrategy == SmartUpdateStatefulSetStrategyType && - !cr.HAProxyEnabled() && - !cr.RouterEnabled() { - return errors.Errorf("MySQL Router or HAProxy should be enabled if SmartUpdate set") - } - return nil } @@ -960,19 +969,11 @@ func (pmm *PMMSpec) HasSecret(secret *corev1.Secret) bool { // RouterEnabled checks if the router is enabled, considering the MySQL configuration. func (cr *PerconaServerMySQL) RouterEnabled() bool { - if cr.MySQLSpec().IsAsync() { - return false - } - return cr.Spec.Proxy.Router != nil && cr.Spec.Proxy.Router.Enabled } // HAProxyEnabled verifies if HAProxy is enabled based on MySQL configuration and safety settings. func (cr *PerconaServerMySQL) HAProxyEnabled() bool { - if cr.MySQLSpec().IsAsync() && !cr.Spec.Unsafe.Proxy { - return true - } - return cr.Spec.Proxy.HAProxy != nil && cr.Spec.Proxy.HAProxy.Enabled } diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 75c44276e..4b134df0f 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -305,7 +305,7 @@ spec: # - 10.0.0.0/8 orchestrator: - enabled: false + enabled: true image: perconalab/percona-server-mysql-operator:main-orchestrator imagePullPolicy: Always diff --git a/e2e-tests/tests/tls-cert-manager/02-assert.yaml b/e2e-tests/tests/tls-cert-manager/02-assert.yaml index a7c8a4765..1ffc732a6 100644 --- a/e2e-tests/tests/tls-cert-manager/02-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/02-assert.yaml @@ -76,7 +76,7 @@ spec: haproxy: enabled: true orchestrator: - enabled: false + enabled: true status: haproxy: ready: 3 diff --git a/e2e-tests/tests/tls-cert-manager/04-assert.yaml b/e2e-tests/tests/tls-cert-manager/04-assert.yaml index 33754f38b..563c754d0 100644 --- a/e2e-tests/tests/tls-cert-manager/04-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/04-assert.yaml @@ -76,7 +76,7 @@ spec: haproxy: enabled: true orchestrator: - enabled: false + enabled: true status: haproxy: ready: 3 diff --git a/e2e-tests/tests/tls-cert-manager/06-assert.yaml b/e2e-tests/tests/tls-cert-manager/06-assert.yaml index ee854bdca..d2589da27 100644 --- a/e2e-tests/tests/tls-cert-manager/06-assert.yaml +++ b/e2e-tests/tests/tls-cert-manager/06-assert.yaml @@ -76,7 +76,7 @@ spec: haproxy: enabled: true orchestrator: - enabled: false + enabled: true status: haproxy: ready: 3 diff --git a/pkg/controller/ps/controller_test.go b/pkg/controller/ps/controller_test.go index 5d9f93bca..7a141e29c 100644 --- a/pkg/controller/ps/controller_test.go +++ b/pkg/controller/ps/controller_test.go @@ -378,6 +378,7 @@ var _ = Describe("Reconcile HAProxy", Ordered, func() { cr, err := readDefaultCR(crName, ns) cr.Spec.MySQL.ClusterType = psv1alpha1.ClusterTypeAsync cr.Spec.Proxy.HAProxy.Enabled = true + cr.Spec.Orchestrator.Enabled = true cr.Spec.UpdateStrategy = appsv1.RollingUpdateStatefulSetStrategyType It("should read and create defautl cr.yaml", func() { Expect(err).NotTo(HaveOccurred()) diff --git a/pkg/controller/ps/version_test.go b/pkg/controller/ps/version_test.go index 23f4aa164..f8a2d25b8 100644 --- a/pkg/controller/ps/version_test.go +++ b/pkg/controller/ps/version_test.go @@ -73,6 +73,7 @@ func TestReconcileVersions(t *testing.T) { Image: "some-image", }, MySQL: apiv1alpha1.MySQLSpec{ + ClusterType: apiv1alpha1.ClusterTypeGR, PodSpec: apiv1alpha1.PodSpec{ Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ @@ -88,6 +89,7 @@ func TestReconcileVersions(t *testing.T) { }, Proxy: apiv1alpha1.ProxySpec{ HAProxy: &apiv1alpha1.HAProxySpec{ + Enabled: true, PodSpec: apiv1alpha1.PodSpec{ Size: 2, }, @@ -115,6 +117,7 @@ func TestReconcileVersions(t *testing.T) { Image: "some-image", }, MySQL: apiv1alpha1.MySQLSpec{ + ClusterType: apiv1alpha1.ClusterTypeGR, PodSpec: apiv1alpha1.PodSpec{ Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ @@ -130,6 +133,7 @@ func TestReconcileVersions(t *testing.T) { }, Proxy: apiv1alpha1.ProxySpec{ HAProxy: &apiv1alpha1.HAProxySpec{ + Enabled: true, PodSpec: apiv1alpha1.PodSpec{ Size: 2, }, @@ -157,6 +161,7 @@ func TestReconcileVersions(t *testing.T) { Image: "some-image", }, MySQL: apiv1alpha1.MySQLSpec{ + ClusterType: apiv1alpha1.ClusterTypeGR, PodSpec: apiv1alpha1.PodSpec{ Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ @@ -172,6 +177,7 @@ func TestReconcileVersions(t *testing.T) { }, Proxy: apiv1alpha1.ProxySpec{ HAProxy: &apiv1alpha1.HAProxySpec{ + Enabled: true, PodSpec: apiv1alpha1.PodSpec{ Size: 2, }, @@ -200,6 +206,7 @@ func TestReconcileVersions(t *testing.T) { Image: "some-image", }, MySQL: apiv1alpha1.MySQLSpec{ + ClusterType: apiv1alpha1.ClusterTypeGR, PodSpec: apiv1alpha1.PodSpec{ Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ @@ -215,6 +222,7 @@ func TestReconcileVersions(t *testing.T) { }, Proxy: apiv1alpha1.ProxySpec{ HAProxy: &apiv1alpha1.HAProxySpec{ + Enabled: true, PodSpec: apiv1alpha1.PodSpec{ Size: 2, }, @@ -340,6 +348,7 @@ func TestGetVersion(t *testing.T) { Image: "some-image", }, MySQL: apiv1alpha1.MySQLSpec{ + ClusterType: apiv1alpha1.ClusterTypeGR, PodSpec: apiv1alpha1.PodSpec{ Size: 3, VolumeSpec: &apiv1alpha1.VolumeSpec{ @@ -355,6 +364,7 @@ func TestGetVersion(t *testing.T) { }, Proxy: apiv1alpha1.ProxySpec{ HAProxy: &apiv1alpha1.HAProxySpec{ + Enabled: true, PodSpec: apiv1alpha1.PodSpec{ Size: 2, }, From 29b00accb4153d1ec9fc0fe490a4a47f841bc8c4 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Thu, 4 Jul 2024 18:18:43 +0200 Subject: [PATCH 184/192] Get pods, services and PVCs within a specific namespace. (#697) --- cmd/orc-handler/main.go | 2 +- pkg/controller/ps/controller.go | 16 ++++++++-------- pkg/controller/ps/crash_recovery.go | 14 +++++++------- pkg/controller/ps/status.go | 4 ++-- pkg/controller/psrestore/controller.go | 2 +- pkg/k8s/utils.go | 21 +++++++++++++++------ 6 files changed, 34 insertions(+), 25 deletions(-) diff --git a/cmd/orc-handler/main.go b/cmd/orc-handler/main.go index ad7ca0f84..5ff7cd481 100644 --- a/cmd/orc-handler/main.go +++ b/cmd/orc-handler/main.go @@ -107,7 +107,7 @@ func setPrimaryLabel(ctx context.Context, primary string) error { primaryName := strings.TrimSuffix(strings.TrimSuffix(primary, "."+ns), "."+mysql.ServiceName(cr)) - pods, err := k8s.PodsByLabels(ctx, cl, mysql.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, cl, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return errors.Wrap(err, "get MySQL pods") } diff --git a/pkg/controller/ps/controller.go b/pkg/controller/ps/controller.go index 66108464c..94f5bd5b6 100644 --- a/pkg/controller/ps/controller.go +++ b/pkg/controller/ps/controller.go @@ -169,7 +169,7 @@ func (r *PerconaServerMySQLReconciler) applyFinalizers(ctx context.Context, cr * func (r *PerconaServerMySQLReconciler) deleteMySQLPods(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { log := logf.FromContext(ctx).WithName("deleteMySQLPods") - pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return errors.Wrap(err, "get pods") } @@ -838,7 +838,7 @@ func (r *PerconaServerMySQLReconciler) reconcileReplication(ctx context.Context, // In the case of a cluster downscale, we need to forget replicas that are not part of the cluster if len(clusterInstances) > int(cr.MySQLSpec().Size) { - mysqlPods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) + mysqlPods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return errors.Wrap(err, "get mysql pods") } @@ -911,7 +911,7 @@ func (r *PerconaServerMySQLReconciler) reconcileGroupReplication(ctx context.Con return nil } -func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Context, exposer Exposer) error { +func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Context, exposer Exposer, ns string) error { log := logf.FromContext(ctx).WithName("cleanupOutdatedServices") size := int(exposer.Size()) svcNames := make(map[string]struct{}, size) @@ -929,7 +929,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Conte svcLabels := exposer.Labels() svcLabels[naming.LabelExposed] = "true" - services, err := k8s.ServicesByLabels(ctx, r.Client, svcLabels) + services, err := k8s.ServicesByLabels(ctx, r.Client, svcLabels, ns) if err != nil { return errors.Wrap(err, "get exposed services") } @@ -951,7 +951,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOutdatedServices(ctx context.Conte func (r *PerconaServerMySQLReconciler) cleanupMysql(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { if !cr.Spec.Pause { mysqlExposer := mysql.Exposer(*cr) - if err := r.cleanupOutdatedServices(ctx, &mysqlExposer); err != nil { + if err := r.cleanupOutdatedServices(ctx, &mysqlExposer, cr.Namespace); err != nil { return errors.Wrap(err, "cleanup MySQL services") } } @@ -965,7 +965,7 @@ func (r *PerconaServerMySQLReconciler) cleanupOrchestrator(ctx context.Context, } orcExposer := orchestrator.Exposer(*cr) - if err := r.cleanupOutdatedServices(ctx, &orcExposer); err != nil { + if err := r.cleanupOutdatedServices(ctx, &orcExposer, cr.Namespace); err != nil { return errors.Wrap(err, "cleanup Orchestrator services") } } @@ -1216,7 +1216,7 @@ func (r *PerconaServerMySQLReconciler) startAsyncReplication(ctx context.Context } func getReadyMySQLPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaServerMySQL) (*corev1.Pod, error) { - pods, err := k8s.PodsByLabels(ctx, cl, mysql.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, cl, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return nil, errors.Wrap(err, "get pods") } @@ -1241,7 +1241,7 @@ func getMySQLPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaS } func getReadyOrcPod(ctx context.Context, cl client.Reader, cr *apiv1alpha1.PerconaServerMySQL) (*corev1.Pod, error) { - pods, err := k8s.PodsByLabels(ctx, cl, orchestrator.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, cl, orchestrator.MatchLabels(cr), cr.Namespace) if err != nil { return nil, errors.Wrap(err, "get pods") } diff --git a/pkg/controller/ps/crash_recovery.go b/pkg/controller/ps/crash_recovery.go index 6b79759ba..fc2f8ee35 100644 --- a/pkg/controller/ps/crash_recovery.go +++ b/pkg/controller/ps/crash_recovery.go @@ -19,7 +19,7 @@ import ( func (r *PerconaServerMySQLReconciler) reconcileFullClusterCrash(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { log := logf.FromContext(ctx).WithName("Crash recovery") - pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return errors.Wrap(err, "get pods") } @@ -35,11 +35,6 @@ func (r *PerconaServerMySQLReconciler) reconcileFullClusterCrash(ctx context.Con } } - operatorPass, err := k8s.UserPassword(ctx, r.Client, cr, apiv1alpha1.UserOperator) - if err != nil { - return errors.Wrap(err, "get operator password") - } - var outb, errb bytes.Buffer cmd := []string{"cat", "/var/lib/mysql/full-cluster-crash"} @@ -62,6 +57,11 @@ func (r *PerconaServerMySQLReconciler) reconcileFullClusterCrash(ctx context.Con continue } + operatorPass, err := k8s.UserPassword(ctx, r.Client, cr, apiv1alpha1.UserOperator) + if err != nil { + return errors.Wrap(err, "get operator password") + } + podFQDN := fmt.Sprintf("%s.%s.%s", pod.Name, mysql.ServiceName(cr), cr.Namespace) podUri := fmt.Sprintf("%s:%s@%s", apiv1alpha1.UserOperator, operatorPass, podFQDN) @@ -97,7 +97,7 @@ func (r *PerconaServerMySQLReconciler) reconcileFullClusterCrash(ctx context.Con func (r *PerconaServerMySQLReconciler) cleanupFullClusterCrashFile(ctx context.Context, cr *apiv1alpha1.PerconaServerMySQL) error { log := logf.FromContext(ctx) - pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return errors.Wrap(err, "get pods") } diff --git a/pkg/controller/ps/status.go b/pkg/controller/ps/status.go index b8f3b5632..cbd3f79af 100644 --- a/pkg/controller/ps/status.go +++ b/pkg/controller/ps/status.go @@ -142,7 +142,7 @@ func (r *PerconaServerMySQLReconciler) reconcileCRStatus(ctx context.Context, cr } if cr.Spec.MySQL.IsGR() { - pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr)) + pods, err := k8s.PodsByLabels(ctx, r.Client, mysql.MatchLabels(cr), cr.Namespace) if err != nil { return errors.Wrap(err, "get pods") } @@ -377,7 +377,7 @@ func (r *PerconaServerMySQLReconciler) appStatus(ctx context.Context, cr *apiv1a return status, err } - pods, err := k8s.PodsByLabels(ctx, r.Client, labels) + pods, err := k8s.PodsByLabels(ctx, r.Client, labels, cr.Namespace) if err != nil { return status, errors.Wrap(err, "get pod list") } diff --git a/pkg/controller/psrestore/controller.go b/pkg/controller/psrestore/controller.go index 97b1a0143..62819ddeb 100644 --- a/pkg/controller/psrestore/controller.go +++ b/pkg/controller/psrestore/controller.go @@ -257,7 +257,7 @@ func (r *PerconaServerMySQLRestoreReconciler) Reconcile(ctx context.Context, req func (r *PerconaServerMySQLRestoreReconciler) deletePVCs(ctx context.Context, cluster *apiv1alpha1.PerconaServerMySQL) error { log := logf.FromContext(ctx) - pvcs, err := k8s.PVCsByLabels(ctx, r.Client, mysql.MatchLabels(cluster)) + pvcs, err := k8s.PVCsByLabels(ctx, r.Client, mysql.MatchLabels(cluster), cluster.Namespace) if err != nil { return errors.Wrap(err, "get PVC list") } diff --git a/pkg/k8s/utils.go b/pkg/k8s/utils.go index 606da9dbd..e5368fc3c 100644 --- a/pkg/k8s/utils.go +++ b/pkg/k8s/utils.go @@ -338,10 +338,13 @@ func ObjectHash(obj runtime.Object) (string, error) { return hex.EncodeToString(hash[:]), nil } -func PodsByLabels(ctx context.Context, cl client.Reader, l map[string]string) ([]corev1.Pod, error) { +func PodsByLabels(ctx context.Context, cl client.Reader, l map[string]string, namespace string) ([]corev1.Pod, error) { podList := &corev1.PodList{} - opts := &client.ListOptions{LabelSelector: labels.SelectorFromSet(l)} + opts := &client.ListOptions{ + LabelSelector: labels.SelectorFromSet(l), + Namespace: namespace, + } if err := cl.List(ctx, podList, opts); err != nil { return nil, err } @@ -349,10 +352,13 @@ func PodsByLabels(ctx context.Context, cl client.Reader, l map[string]string) ([ return podList.Items, nil } -func ServicesByLabels(ctx context.Context, cl client.Reader, l map[string]string) ([]corev1.Service, error) { +func ServicesByLabels(ctx context.Context, cl client.Reader, l map[string]string, namespace string) ([]corev1.Service, error) { svcList := &corev1.ServiceList{} - opts := &client.ListOptions{LabelSelector: labels.SelectorFromSet(l)} + opts := &client.ListOptions{ + LabelSelector: labels.SelectorFromSet(l), + Namespace: namespace, + } if err := cl.List(ctx, svcList, opts); err != nil { return nil, err } @@ -360,10 +366,13 @@ func ServicesByLabels(ctx context.Context, cl client.Reader, l map[string]string return svcList.Items, nil } -func PVCsByLabels(ctx context.Context, cl client.Reader, l map[string]string) ([]corev1.PersistentVolumeClaim, error) { +func PVCsByLabels(ctx context.Context, cl client.Reader, l map[string]string, namespace string) ([]corev1.PersistentVolumeClaim, error) { pvcList := &corev1.PersistentVolumeClaimList{} - opts := &client.ListOptions{LabelSelector: labels.SelectorFromSet(l)} + opts := &client.ListOptions{ + LabelSelector: labels.SelectorFromSet(l), + Namespace: namespace, + } if err := cl.List(ctx, pvcList, opts); err != nil { return nil, err } From e2e59b81ec53a918d274f286ac7f6c50c9947f61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:19:11 +0300 Subject: [PATCH 185/192] CLOUD-727: Bump github.com/cert-manager/cert-manager (#695) Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.15.0 to 1.15.1. - [Release notes](https://github.com/cert-manager/cert-manager/releases) - [Changelog](https://github.com/cert-manager/cert-manager/blob/master/RELEASE.md) - [Commits](https://github.com/cert-manager/cert-manager/compare/v1.15.0...v1.15.1) --- updated-dependencies: - dependency-name: github.com/cert-manager/cert-manager dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viacheslav Sarzhan --- go.mod | 14 +++++++------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 931b25263..b0fe093c1 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.22.3 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 - github.com/cert-manager/cert-manager v1.15.0 + github.com/cert-manager/cert-manager v1.15.1 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 github.com/go-logr/logr v1.4.2 github.com/go-openapi/errors v0.22.0 @@ -41,8 +41,8 @@ require ( require ( filippo.io/edwards25519 v1.1.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 // indirect github.com/Percona-Lab/percona-version-service v0.0.0-20230324081000-27de445df239 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -107,12 +107,12 @@ require ( go.opentelemetry.io/otel/metric v1.26.0 // indirect go.opentelemetry.io/otel/trace v1.26.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 7b6c09c6a..2d05bade4 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 h1:1nGuui+4POelzDwI7RG56yfQJHCnKvwfMoU7VsEp+Zg= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0/go.mod h1:99EvauvlcJ1U06amZiksfYz/3aFGyIhWGHVyiZXtBAI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 h1:U2rTu3Ef+7w9FHKIAXM6ZyqF3UOWJZ12zIm8zECAFfg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 h1:H+U3Gk9zY56G3u872L82bk4thcsy2Gghb9ExT4Zvm1o= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0/go.mod h1:mgrmMSgaLp9hmax62XQTd0N4aAqSE5E0DulSpVYK7vc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM= @@ -28,8 +28,8 @@ github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8 github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cert-manager/cert-manager v1.15.0 h1:xVL8tzdQECMypoYQa9rv4DLjkn2pJXJLTqH4JUsxfko= -github.com/cert-manager/cert-manager v1.15.0/go.mod h1:Vxq6yNKAbgQeMtzu5gqU8n0vXDiZcGTa5LDyCJRbmXE= +github.com/cert-manager/cert-manager v1.15.1 h1:HSG4k2GlJ2YgTLkZfQzrArNaQpM9+ehDDg550IxAD94= +github.com/cert-manager/cert-manager v1.15.1/go.mod h1:p98JoGv3J9JhdKU9ngsj2EhWGI6/GlU7kpjWu5lf2js= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -268,8 +268,8 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -287,8 +287,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -306,10 +306,10 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= From 268c64e855f200b36f47e6e4181b927bfe10592d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:03:19 +0300 Subject: [PATCH 186/192] CLOUD-727: Bump google.golang.org/grpc from 1.64.0 to 1.65.0 (#694) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.65.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.65.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b0fe093c1..27b1cf9e9 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 - google.golang.org/grpc v1.64.0 + google.golang.org/grpc v1.65.0 k8s.io/api v0.30.2 k8s.io/apimachinery v0.30.2 k8s.io/client-go v0.30.2 @@ -116,7 +116,7 @@ require ( golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 2d05bade4..2a06ee18d 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 h1:4HZJ3Xv1cmrJ+0aFo304Zn79ur1HMxptAE7aCPNLSqc= -google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -347,8 +347,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 0ce134c658981aa68b70454acb8f4acfaa138800 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 12:55:04 +0300 Subject: [PATCH 187/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.72 to 7.0.73 (#693) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.72 to 7.0.73. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.72...v7.0.73) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 27b1cf9e9..fbd49e2f2 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/google/go-cmp v0.6.0 - github.com/minio/minio-go/v7 v7.0.72 + github.com/minio/minio-go/v7 v7.0.73 github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 @@ -35,8 +35,9 @@ require ( ) require ( + github.com/go-ini/ini v1.67.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect + github.com/goccy/go-json v0.10.3 // indirect ) require ( @@ -75,8 +76,8 @@ require ( github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.6 // indirect - github.com/klauspost/cpuid/v2 v2.2.6 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -120,7 +121,6 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.30.1 // indirect diff --git a/go.sum b/go.sum index 2a06ee18d..f3e55e277 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,8 @@ github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu4 github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= +github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -90,8 +92,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04vbmDOc3yuruGvVO+LOa7cVER3yWw= github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -135,11 +137,11 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= -github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= -github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= +github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -158,8 +160,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.72 h1:ZSbxs2BfJensLyHdVOgHv+pfmvxYraaUy07ER04dWnA= -github.com/minio/minio-go/v7 v7.0.72/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo= +github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo= +github.com/minio/minio-go/v7 v7.0.73/go.mod h1:qydcVzV8Hqtj1VtEocfxbmVFa2siu6HGa+LDEPogjD8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= @@ -359,8 +361,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 18d5131a8a4dff3f7d1fa24b67fc9b0679dd5779 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Mon, 8 Jul 2024 20:20:34 +0300 Subject: [PATCH 188/192] K8SPS-340: fix `gr-security-context` test (#699) https://perconadev.atlassian.net/browse/K8SPS-340 --- e2e-tests/tests/gr-security-context/04-assert.yaml | 1 - e2e-tests/tests/gr-security-context/07-assert.yaml | 3 --- 2 files changed, 4 deletions(-) diff --git a/e2e-tests/tests/gr-security-context/04-assert.yaml b/e2e-tests/tests/gr-security-context/04-assert.yaml index 8cf3feb93..e3472a1df 100644 --- a/e2e-tests/tests/gr-security-context/04-assert.yaml +++ b/e2e-tests/tests/gr-security-context/04-assert.yaml @@ -33,7 +33,6 @@ spec: containers: - command: - /opt/percona/run-backup.sh - image: perconalab/percona-server-mysql-operator:main-backup imagePullPolicy: Always name: xtrabackup resources: {} diff --git a/e2e-tests/tests/gr-security-context/07-assert.yaml b/e2e-tests/tests/gr-security-context/07-assert.yaml index 924bf5013..615dbb27a 100644 --- a/e2e-tests/tests/gr-security-context/07-assert.yaml +++ b/e2e-tests/tests/gr-security-context/07-assert.yaml @@ -5,8 +5,6 @@ timeout: 500 apiVersion: batch/v1 kind: Job metadata: - annotations: - batch.kubernetes.io/job-tracking: "" generation: 1 labels: app.kubernetes.io/component: xtrabackup @@ -26,7 +24,6 @@ spec: containers: - command: - /opt/percona/run-restore.sh - image: perconalab/percona-server-mysql-operator:main-backup imagePullPolicy: Always name: xtrabackup resources: {} From 03e98a678addfb5397cb5e7f58b6de443047c27e Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Fri, 5 Jul 2024 17:47:48 +0300 Subject: [PATCH 189/192] K8SPS-343 Update images and versions for 0.8.0 release --- config/manager/cluster/kustomization.yaml | 4 ++-- config/manager/kustomization.yaml | 4 ++-- config/manager/manager.yaml | 2 +- deploy/bundle.yaml | 2 +- deploy/cr.yaml | 14 +++++++------- deploy/cw-bundle.yaml | 2 +- deploy/cw-operator.yaml | 2 +- deploy/operator.yaml | 2 +- e2e-tests/vars.sh | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/config/manager/cluster/kustomization.yaml b/config/manager/cluster/kustomization.yaml index 43d283c3e..6291028f1 100644 --- a/config/manager/cluster/kustomization.yaml +++ b/config/manager/cluster/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: perconalab/percona-server-mysql-operator - newName: perconalab/percona-server-mysql-operator - newTag: main + newName: percona/percona-server-mysql-operator + newTag: 0.8.0 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 43d283c3e..6291028f1 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: perconalab/percona-server-mysql-operator - newName: perconalab/percona-server-mysql-operator - newTag: main + newName: percona/percona-server-mysql-operator + newTag: 0.8.0 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index dad3a3fbb..5b8e9bd1b 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -36,7 +36,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.8.0 imagePullPolicy: Always name: manager securityContext: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 0f7e26367..f2f995b87 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -10342,7 +10342,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.8.0 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 4b134df0f..a5fbee27a 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -38,7 +38,7 @@ spec: mysql: clusterType: group-replication autoRecovery: true - image: perconalab/percona-server-mysql-operator:main-psmysql + image: percona/percona-server:8.0.36-28 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.8.0 @@ -145,7 +145,7 @@ spec: size: 3 - image: perconalab/percona-server-mysql-operator:main-haproxy + image: percona/haproxy:2.8.5 imagePullPolicy: Always resources: @@ -253,7 +253,7 @@ spec: router: enabled: false - image: perconalab/percona-server-mysql-operator:main-router + image: percona/percona-mysql-router:8.0.36 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.8.0 @@ -307,7 +307,7 @@ spec: orchestrator: enabled: true - image: perconalab/percona-server-mysql-operator:main-orchestrator + image: percona/percona-orchestrator:3.2.6-12 imagePullPolicy: Always # serviceAccountName: percona-server-mysql-operator-orchestrator # initImage: percona/percona-server-mysql-operator:0.8.0 @@ -361,7 +361,7 @@ spec: pmm: enabled: false - image: percona/pmm-client:2.41.2 + image: percona/pmm-client:2.42.0 imagePullPolicy: Always resources: @@ -377,7 +377,7 @@ spec: backup: enabled: true - image: perconalab/percona-server-mysql-operator:main-backup + image: percona/percona-xtrabackup:8.0.35-31 # backoffLimit: 6 imagePullPolicy: Always # initImage: percona/percona-server-mysql-operator:0.8.0 @@ -433,7 +433,7 @@ spec: # prefix: "" toolkit: - image: perconalab/percona-server-mysql-operator:main-toolkit + image: percona/percona-toolkit:3.5.7 imagePullPolicy: Always # resources: # requests: diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index 88502a0c3..1abef1d31 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -10343,7 +10343,7 @@ spec: value: "" - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.8.0 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cw-operator.yaml b/deploy/cw-operator.yaml index d6527b616..90cc3fb50 100644 --- a/deploy/cw-operator.yaml +++ b/deploy/cw-operator.yaml @@ -48,7 +48,7 @@ spec: value: "" - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.8.0 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 43f942675..dd88dcb84 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -51,7 +51,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: perconalab/percona-server-mysql-operator:main + image: percona/percona-server-mysql-operator:0.8.0 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/e2e-tests/vars.sh b/e2e-tests/vars.sh index 4424d66f8..32c75a53b 100644 --- a/e2e-tests/vars.sh +++ b/e2e-tests/vars.sh @@ -20,7 +20,7 @@ export IMAGE_HAPROXY=${IMAGE_HAPROXY:-"perconalab/percona-server-mysql-operator: export PMM_SERVER_VERSION=${PMM_SERVER_VERSION:-"9.9.9"} export IMAGE_PMM_CLIENT=${IMAGE_PMM_CLIENT:-"perconalab/pmm-client:dev-latest"} export IMAGE_PMM_SERVER=${IMAGE_PMM_SERVER:-"perconalab/pmm-server:dev-latest"} -export CERT_MANAGER_VER="1.14.4" +export CERT_MANAGER_VER="1.15.1" date=$(which gdate || which date) From 3111a65068ea743d404a844d9d2c20da45456d0d Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Tue, 9 Jul 2024 16:02:11 +0300 Subject: [PATCH 190/192] K8SPS-343: 0.8.0 release - use 3.6.0 PT version --- deploy/cr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/cr.yaml b/deploy/cr.yaml index a5fbee27a..670023d4b 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -433,7 +433,7 @@ spec: # prefix: "" toolkit: - image: percona/percona-toolkit:3.5.7 + image: percona/percona-toolkit:3.6.0 imagePullPolicy: Always # resources: # requests: From 96ef1c18bca29cb92f2fc37743dfc014a9a57ec0 Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Thu, 18 Jul 2024 11:25:48 +0300 Subject: [PATCH 191/192] K8SPS-343 Update image tags back to main (related to 0.8.0 release) (#703) * K8SPS-343 Update image tags back to main (related to 0.8.0 release) * K8SPS-343 Fix cluster-version --- Jenkinsfile | 2 +- config/manager/cluster/kustomization.yaml | 4 ++-- config/manager/kustomization.yaml | 4 ++-- config/manager/manager.yaml | 2 +- deploy/bundle.yaml | 2 +- deploy/cr.yaml | 26 +++++++++++------------ deploy/cw-bundle.yaml | 2 +- deploy/cw-operator.yaml | 2 +- deploy/operator.yaml | 2 +- pkg/version/version.go | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 03d4bacf7..f7059229b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ void createCluster(String CLUSTER_SUFFIX, String SUBNETWORK = CLUSTER_SUFFIX) { gcloud auth activate-service-account --key-file $CLIENT_SECRET_FILE gcloud config set project $GCP_PROJECT gcloud container clusters list --filter $CLUSTER_NAME-${CLUSTER_SUFFIX} --zone $region --format='csv[no-heading](name)' | xargs gcloud container clusters delete --zone $region --quiet || true - gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.26 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ + gcloud container clusters create --zone $region $CLUSTER_NAME-${CLUSTER_SUFFIX} --cluster-version=1.28 --machine-type=n1-standard-4 --preemptible --num-nodes=\$NODES_NUM --network=jenkins-ps-vpc --subnetwork=jenkins-ps-${SUBNETWORK} --no-enable-autoupgrade --cluster-ipv4-cidr=/21 --labels delete-cluster-after-hours=6 && \ kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user jenkins@"$GCP_PROJECT".iam.gserviceaccount.com || ret_val=\$? if [ \${ret_val} -eq 0 ]; then break; fi ret_num=\$((ret_num + 1)) diff --git a/config/manager/cluster/kustomization.yaml b/config/manager/cluster/kustomization.yaml index 6291028f1..43d283c3e 100644 --- a/config/manager/cluster/kustomization.yaml +++ b/config/manager/cluster/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: perconalab/percona-server-mysql-operator - newName: percona/percona-server-mysql-operator - newTag: 0.8.0 + newName: perconalab/percona-server-mysql-operator + newTag: main diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 6291028f1..43d283c3e 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: perconalab/percona-server-mysql-operator - newName: percona/percona-server-mysql-operator - newTag: 0.8.0 + newName: perconalab/percona-server-mysql-operator + newTag: main diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 5b8e9bd1b..dad3a3fbb 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -36,7 +36,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.8.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always name: manager securityContext: diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index f2f995b87..0f7e26367 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -10342,7 +10342,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.8.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 670023d4b..20fa9d29e 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -13,14 +13,14 @@ spec: # proxy: false # proxySize: false # pause: false - crVersion: 0.8.0 + crVersion: 0.9.0 secretsName: cluster1-secrets sslSecretName: cluster1-ssl updateStrategy: SmartUpdate upgradeOptions: versionServiceEndpoint: https://check.percona.com apply: disabled -# initImage: percona/percona-server-mysql-operator:0.8.0 +# initImage: perconalab/percona-server-mysql-operator:main # ignoreAnnotations: # - service.beta.kubernetes.io/aws-load-balancer-backend-protocol # ignoreLabels: @@ -38,9 +38,9 @@ spec: mysql: clusterType: group-replication autoRecovery: true - image: percona/percona-server:8.0.36-28 + image: perconalab/percona-server-mysql-operator:main-psmysql imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.8.0 +# initImage: perconalab/percona-server-mysql-operator:main size: 3 @@ -145,7 +145,7 @@ spec: size: 3 - image: percona/haproxy:2.8.5 + image: perconalab/percona-server-mysql-operator:main-haproxy imagePullPolicy: Always resources: @@ -253,9 +253,9 @@ spec: router: enabled: false - image: percona/percona-mysql-router:8.0.36 + image: perconalab/percona-server-mysql-operator:main-router imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.8.0 +# initImage: perconalab/percona-server-mysql-operator:main size: 3 @@ -307,10 +307,10 @@ spec: orchestrator: enabled: true - image: percona/percona-orchestrator:3.2.6-12 + image: perconalab/percona-server-mysql-operator:main-orchestrator imagePullPolicy: Always # serviceAccountName: percona-server-mysql-operator-orchestrator -# initImage: percona/percona-server-mysql-operator:0.8.0 +# initImage: perconalab/percona-server-mysql-operator:main size: 3 @@ -361,7 +361,7 @@ spec: pmm: enabled: false - image: percona/pmm-client:2.42.0 + image: perconalab/pmm-client:dev-latest imagePullPolicy: Always resources: @@ -377,10 +377,10 @@ spec: backup: enabled: true - image: percona/percona-xtrabackup:8.0.35-31 + image: perconalab/percona-server-mysql-operator:main-backup # backoffLimit: 6 imagePullPolicy: Always -# initImage: percona/percona-server-mysql-operator:0.8.0 +# initImage: perconalab/percona-server-mysql-operator:main # containerSecurityContext: # privileged: true storages: @@ -433,7 +433,7 @@ spec: # prefix: "" toolkit: - image: percona/percona-toolkit:3.6.0 + image: perconalab/percona-server-mysql-operator:main-toolkit imagePullPolicy: Always # resources: # requests: diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index 1abef1d31..88502a0c3 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -10343,7 +10343,7 @@ spec: value: "" - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.8.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/cw-operator.yaml b/deploy/cw-operator.yaml index 90cc3fb50..d6527b616 100644 --- a/deploy/cw-operator.yaml +++ b/deploy/cw-operator.yaml @@ -48,7 +48,7 @@ spec: value: "" - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.8.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index dd88dcb84..43f942675 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -51,7 +51,7 @@ spec: fieldPath: metadata.namespace - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-server-mysql-operator:0.8.0 + image: perconalab/percona-server-mysql-operator:main imagePullPolicy: Always livenessProbe: httpGet: diff --git a/pkg/version/version.go b/pkg/version/version.go index f17ed2ed3..6e73a937d 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.8.0" +const Version = "0.9.0" From 109623628154896d2c1496b9c82df95bcd163279 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:51:02 +0300 Subject: [PATCH 192/192] CLOUD-727: Bump github.com/minio/minio-go/v7 from 7.0.73 to 7.0.74 (#702) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.73 to 7.0.74. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.73...v7.0.74) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fbd49e2f2..1ff276b5c 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/google/go-cmp v0.6.0 - github.com/minio/minio-go/v7 v7.0.73 + github.com/minio/minio-go/v7 v7.0.74 github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index f3e55e277..468f58b91 100644 --- a/go.sum +++ b/go.sum @@ -160,8 +160,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo= -github.com/minio/minio-go/v7 v7.0.73/go.mod h1:qydcVzV8Hqtj1VtEocfxbmVFa2siu6HGa+LDEPogjD8= +github.com/minio/minio-go/v7 v7.0.74 h1:fTo/XlPBTSpo3BAMshlwKL5RspXRv9us5UeHEGYCFe0= +github.com/minio/minio-go/v7 v7.0.74/go.mod h1:qydcVzV8Hqtj1VtEocfxbmVFa2siu6HGa+LDEPogjD8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=