Skip to content

Commit

Permalink
Cancel concurrent CI runs for same pr/commit (#873)
Browse files Browse the repository at this point in the history
Signed-off-by: 1gtm <1gtm@appscode.com>
  • Loading branch information
1gtm committed Mar 1, 2022
1 parent 1bcca11 commit a4fb055
Show file tree
Hide file tree
Showing 31 changed files with 95 additions and 109 deletions.
4 changes: 2 additions & 2 deletions apis/catalog/v1alpha1/mysql_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type MySQLVersionSpec struct {
InitContainer MySQLVersionInitContainer `json:"initContainer"`
// PSP names
PodSecurityPolicies MySQLVersionPodSecurityPolicy `json:"podSecurityPolicies"`
//upgrade constraints
// upgrade constraints
UpgradeConstraints MySQLUpgradeConstraints `json:"upgradeConstraints"`
// Stash defines backup and restore task definitions.
// +optional
Expand Down Expand Up @@ -105,7 +105,7 @@ type MySQLVersionInitContainer struct {
}

// MySQLVersionRouter is the MySQL Router lightweight middleware
//that provides transparent routing between your application and back-end MySQL Servers
// that provides transparent routing between your application and back-end MySQL Servers
type MySQLVersionRouter struct {
Image string `json:"image"`
}
Expand Down
2 changes: 1 addition & 1 deletion apis/catalog/v1alpha1/postgres_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type PostgresVersionSpec struct {
Version string `json:"version"`
// Distribution
Distribution PostgresDistro `json:"distribution,omitempty"`
//init container image
// init container image
InitContainer PostgresVersionInitContainer `json:"initContainer,omitempty"`
// Database Image
DB PostgresVersionDatabase `json:"db"`
Expand Down
2 changes: 1 addition & 1 deletion apis/catalog/v1alpha1/redis_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type RedisVersion struct {
type RedisVersionSpec struct {
// Version
Version string `json:"version"`
//init container image
// init container image
InitContainer RedisVersionInitContainer `json:"initContainer,omitempty"`
// Database Image
DB RedisVersionDatabase `json:"db"`
Expand Down
20 changes: 9 additions & 11 deletions apis/dashboard/v1alpha1/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var (
DefaultResources = core.ResourceRequirements{
Requests: core.ResourceList{
core.ResourceCPU: resource.MustParse(".500"),
core.ResourceMemory: resource.MustParse("1024Mi"),
},
Limits: core.ResourceList{
core.ResourceMemory: resource.MustParse("1024Mi"),
},
}
)
var DefaultResources = core.ResourceRequirements{
Requests: core.ResourceList{
core.ResourceCPU: resource.MustParse(".500"),
core.ResourceMemory: resource.MustParse("1024Mi"),
},
Limits: core.ResourceList{
core.ResourceMemory: resource.MustParse("1024Mi"),
},
}

const (
ES_USER_ENV = "ELASTICSEARCH_USERNAME"
Expand Down
5 changes: 5 additions & 0 deletions apis/dashboard/v1alpha1/elasticsearchdashboard_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ var _ apis.ResourceInfo = &ElasticsearchDashboard{}
func (ed ElasticsearchDashboard) OffshootName() string {
return ed.Name
}

func (ed ElasticsearchDashboard) ServiceName() string {
return ed.OffshootName()
}

func (ed ElasticsearchDashboard) DeploymentName() string {
return ed.OffshootName()
}

func (ed ElasticsearchDashboard) DashboardContainerName() string {
return meta_util.NameWithSuffix(ed.Name, "dashboard")
}
Expand Down Expand Up @@ -145,13 +148,15 @@ func (ed *ElasticsearchDashboard) getLabels(extraLabels ...map[string]string) ma
func (ed *ElasticsearchDashboard) PodLabels(extraLabels ...map[string]string) map[string]string {
return meta_util.OverwriteKeys(ed.OffshootSelectors(), extraLabels...)
}

func (ed *ElasticsearchDashboard) PodControllerLabels(extraLabels ...map[string]string) map[string]string {
return ed.offshootLabels(meta_util.OverwriteKeys(ed.OffshootSelectors(), extraLabels...), ed.Spec.PodTemplate.Controller.Labels)
}

func (ed *ElasticsearchDashboard) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string {
return meta_util.OverwriteKeys(ed.OffshootSelectors(), extraLabels...)
}

func (ed *ElasticsearchDashboard) GetServiceSelectors() map[string]string {
extraSelectors := map[string]string{
"app.kubernetes.io/instance": ed.Name,
Expand Down
5 changes: 1 addition & 4 deletions apis/dashboard/v1alpha1/elasticsearchdashboard_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ var _ webhook.Defaulter = &ElasticsearchDashboard{}

// Default implements webhook.Defaulter so a webhook will be registered for the type
func (ed *ElasticsearchDashboard) Default() {

if ed.Spec.Replicas == nil {
ed.Spec.Replicas = pointer.Int32P(1)
edLog.Info(".Spec.Replicas have been set to default")
Expand Down Expand Up @@ -114,7 +113,6 @@ func (ed *ElasticsearchDashboard) ValidateCreate() error {

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (ed *ElasticsearchDashboard) ValidateUpdate(old runtime.Object) error {

// Skip validation, if UPDATE operation is called after deletion.
// Case: Removing Finalizer
if ed.DeletionTimestamp != nil {
Expand Down Expand Up @@ -145,10 +143,9 @@ func (ed *ElasticsearchDashboard) ValidateDelete() error {
}

func (ed *ElasticsearchDashboard) Validate() error {

var allErr field.ErrorList

//database ref is required
// database ref is required
if ed.Spec.DatabaseRef == nil {
allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("databaseref"), ed.Name,
"spec.databaseref can't be empty"))
Expand Down
2 changes: 1 addition & 1 deletion apis/kubedb/v1alpha2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ const (
ProxySQLCustomConfigMountPath = "/etc/custom-config"
// =========================== Redis Constants ============================
RedisConfigKey = "redis.conf" // RedisConfigKey is going to create for the customize redis configuration
//DefaultConfigKey is going to create for the default redis configuration
// DefaultConfigKey is going to create for the default redis configuration
DefaultConfigKey = "default.conf"
RedisShardKey = RedisKey + "/shard"
RedisDatabasePortName = "db"
Expand Down
1 change: 0 additions & 1 deletion apis/kubedb/v1alpha2/mongodb_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func TestMongoDB_HostAddress(t *testing.T) {

repsetDSN := mongodb.HostAddress()
t.Log(repsetDSN)

}

func TestMongoDB_ShardDSN(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion apis/kubedb/v1alpha2/mysql_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ type MySQLRouterSpec struct {
}

type MySQLReadReplicaSpec struct {
//SourceRef specifies the source object
// SourceRef specifies the source object
SourceRef core.ObjectReference `json:"sourceRef" protobuf:"bytes,1,opt,name=sourceRef"`
}

Expand Down
6 changes: 3 additions & 3 deletions apis/kubedb/v1alpha2/postgres_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ func (p *Postgres) SetDefaults(postgresVersion *catalog.PostgresVersion, topolog
ElectionTick: 10,
// this value should be one.
HeartbeatTick: 1,
//we have set this default to 67108864. if the difference between primary and replica is more then this,
//the replica node is going to manually sync itself.
// we have set this default to 67108864. if the difference between primary and replica is more then this,
// the replica node is going to manually sync itself.
MaximumLagBeforeFailover: 64 * 1024 * 1024,
}
}
Expand Down Expand Up @@ -355,7 +355,7 @@ func GetSharedBufferSizeForPostgres(resource *resource.Quantity) string {
ret = (resource.Value() / 100) * 25
}
// the shared buffer value can't be less then this
//128 MB is the minimum
// 128 MB is the minimum
if ret < minSharedBuffer {
ret = minSharedBuffer
}
Expand Down
12 changes: 4 additions & 8 deletions apis/ops/v1alpha1/etcd_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ type EtcdOpsRequestSpec struct {

// EtcdReplicaReadinessCriteria is the criteria for checking readiness of a Etcd pod
// after updating, horizontal scaling etc.
type EtcdReplicaReadinessCriteria struct {
}
type EtcdReplicaReadinessCriteria struct{}

type EtcdUpgradeSpec struct {
// Specifies the target version name from catalog
Expand All @@ -82,20 +81,17 @@ type EtcdUpgradeSpec struct {
}

// HorizontalScaling is the spec for Etcd horizontal scaling
type EtcdHorizontalScalingSpec struct {
}
type EtcdHorizontalScalingSpec struct{}

// EtcdVerticalScalingSpec is the spec for Etcd vertical scaling
type EtcdVerticalScalingSpec struct {
ReadinessCriteria *EtcdReplicaReadinessCriteria `json:"readinessCriteria,omitempty"`
}

// EtcdVolumeExpansionSpec is the spec for Etcd volume expansion
type EtcdVolumeExpansionSpec struct {
}
type EtcdVolumeExpansionSpec struct{}

type EtcdCustomConfigurationSpec struct {
}
type EtcdCustomConfigurationSpec struct{}

type EtcdCustomConfiguration struct {
ConfigMap *core.LocalObjectReference `json:"configMap,omitempty"`
Expand Down
12 changes: 4 additions & 8 deletions apis/ops/v1alpha1/memcached_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ type MemcachedOpsRequestSpec struct {

// MemcachedReplicaReadinessCriteria is the criteria for checking readiness of a Memcached pod
// after updating, horizontal scaling etc.
type MemcachedReplicaReadinessCriteria struct {
}
type MemcachedReplicaReadinessCriteria struct{}

type MemcachedUpgradeSpec struct {
// Specifies the target version name from catalog
Expand All @@ -82,20 +81,17 @@ type MemcachedUpgradeSpec struct {
}

// HorizontalScaling is the spec for Memcached horizontal scaling
type MemcachedHorizontalScalingSpec struct {
}
type MemcachedHorizontalScalingSpec struct{}

// MemcachedVerticalScalingSpec is the spec for Memcached vertical scaling
type MemcachedVerticalScalingSpec struct {
ReadinessCriteria *MemcachedReplicaReadinessCriteria `json:"readinessCriteria,omitempty"`
}

// MemcachedVolumeExpansionSpec is the spec for Memcached volume expansion
type MemcachedVolumeExpansionSpec struct {
}
type MemcachedVolumeExpansionSpec struct{}

type MemcachedCustomConfigurationSpec struct {
}
type MemcachedCustomConfigurationSpec struct{}

type MemcachedCustomConfiguration struct {
ConfigMap *core.LocalObjectReference `json:"configMap,omitempty"`
Expand Down
3 changes: 1 addition & 2 deletions apis/ops/v1alpha1/mysql_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ type MySQLOpsRequestSpec struct {

// MySQLReplicaReadinessCriteria is the criteria for checking readiness of a MySQL pod
// after updating, horizontal scaling etc.
type MySQLReplicaReadinessCriteria struct {
}
type MySQLReplicaReadinessCriteria struct{}

type MySQLUpgradeSpec struct {
// Specifies the target version name from catalog
Expand Down
12 changes: 4 additions & 8 deletions apis/ops/v1alpha1/perconaxtradb_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ type PerconaXtraDBOpsRequestSpec struct {

// PerconaXtraDBReplicaReadinessCriteria is the criteria for checking readiness of a PerconaXtraDB pod
// after updating, horizontal scaling etc.
type PerconaXtraDBReplicaReadinessCriteria struct {
}
type PerconaXtraDBReplicaReadinessCriteria struct{}

type PerconaXtraDBUpgradeSpec struct {
// Specifies the target version name from catalog
Expand All @@ -82,20 +81,17 @@ type PerconaXtraDBUpgradeSpec struct {
}

// HorizontalScaling is the spec for PerconaXtraDB horizontal scaling
type PerconaXtraDBHorizontalScalingSpec struct {
}
type PerconaXtraDBHorizontalScalingSpec struct{}

// PerconaXtraDBVerticalScalingSpec is the spec for PerconaXtraDB vertical scaling
type PerconaXtraDBVerticalScalingSpec struct {
ReadinessCriteria *PerconaXtraDBReplicaReadinessCriteria `json:"readinessCriteria,omitempty"`
}

// PerconaXtraDBVolumeExpansionSpec is the spec for PerconaXtraDB volume expansion
type PerconaXtraDBVolumeExpansionSpec struct {
}
type PerconaXtraDBVolumeExpansionSpec struct{}

type PerconaXtraDBCustomConfigurationSpec struct {
}
type PerconaXtraDBCustomConfigurationSpec struct{}

type PerconaXtraDBCustomConfiguration struct {
ConfigMap *core.LocalObjectReference `json:"configMap,omitempty"`
Expand Down
12 changes: 4 additions & 8 deletions apis/ops/v1alpha1/pgbouncer_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ type PgBouncerOpsRequestSpec struct {

// PgBouncerReplicaReadinessCriteria is the criteria for checking readiness of a PgBouncer pod
// after updating, horizontal scaling etc.
type PgBouncerReplicaReadinessCriteria struct {
}
type PgBouncerReplicaReadinessCriteria struct{}

type PgBouncerUpgradeSpec struct {
// Specifies the target version name from catalog
Expand All @@ -82,20 +81,17 @@ type PgBouncerUpgradeSpec struct {
}

// HorizontalScaling is the spec for PgBouncer horizontal scaling
type PgBouncerHorizontalScalingSpec struct {
}
type PgBouncerHorizontalScalingSpec struct{}

// PgBouncerVerticalScalingSpec is the spec for PgBouncer vertical scaling
type PgBouncerVerticalScalingSpec struct {
ReadinessCriteria *PgBouncerReplicaReadinessCriteria `json:"readinessCriteria,omitempty"`
}

// PgBouncerVolumeExpansionSpec is the spec for PgBouncer volume expansion
type PgBouncerVolumeExpansionSpec struct {
}
type PgBouncerVolumeExpansionSpec struct{}

type PgBouncerCustomConfigurationSpec struct {
}
type PgBouncerCustomConfigurationSpec struct{}

type PgBouncerCustomConfiguration struct {
ConfigMap *core.LocalObjectReference `json:"configMap,omitempty"`
Expand Down
12 changes: 4 additions & 8 deletions apis/ops/v1alpha1/proxysql_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ type ProxySQLOpsRequestSpec struct {

// ProxySQLReplicaReadinessCriteria is the criteria for checking readiness of a ProxySQL pod
// after updating, horizontal scaling etc.
type ProxySQLReplicaReadinessCriteria struct {
}
type ProxySQLReplicaReadinessCriteria struct{}

type ProxySQLUpgradeSpec struct {
// Specifies the target version name from catalog
Expand All @@ -81,20 +80,17 @@ type ProxySQLUpgradeSpec struct {
}

// HorizontalScaling is the spec for ProxySQL horizontal scaling
type ProxySQLHorizontalScalingSpec struct {
}
type ProxySQLHorizontalScalingSpec struct{}

// ProxySQLVerticalScalingSpec is the spec for ProxySQL vertical scaling
type ProxySQLVerticalScalingSpec struct {
ReadinessCriteria *ProxySQLReplicaReadinessCriteria `json:"readinessCriteria,omitempty"`
}

// ProxySQLVolumeExpansionSpec is the spec for ProxySQL volume expansion
type ProxySQLVolumeExpansionSpec struct {
}
type ProxySQLVolumeExpansionSpec struct{}

type ProxySQLCustomConfigurationSpec struct {
}
type ProxySQLCustomConfigurationSpec struct{}

type ProxySQLCustomConfiguration struct {
ConfigMap *core.LocalObjectReference `json:"configMap,omitempty"`
Expand Down
3 changes: 1 addition & 2 deletions apis/ops/v1alpha1/redis_ops_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ type RedisOpsRequestSpec struct {

// RedisReplicaReadinessCriteria is the criteria for checking readiness of a Redis pod
// after updating, horizontal scaling etc.
type RedisReplicaReadinessCriteria struct {
}
type RedisReplicaReadinessCriteria struct{}

type RedisUpgradeSpec struct {
// Specifies the target version name from catalog
Expand Down
12 changes: 5 additions & 7 deletions apis/ops/v1alpha1/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ const (
PrepareSecureCustomConfig = "PrepareSecureCustomConfig"
ReconfigureSecurityAdmin = "ReconfigureSecurityAdmin"

//Redis Constants
// Redis Constants
PatchedSecret = "patchedSecret"
ConfigKeyRedis = "redis.conf"
RedisTLSArg = "--tls-port 6379"
DBReady = "DBReady"
RestartedPods = "RestartedPods"

//Stash Constants
// Stash Constants
PauseBackupConfiguration = "PauseBackupConfiguration"
ResumeBackupConfiguration = "ResumeBackupConfiguration"
//Postgres Constants
// Postgres Constants
UpdatePrimaryPodImage = "UpdatePrimaryImage"
UpdateStandbyPodImage = "UpdateStandbyPodImage"
// PausePgCoordinator is used when need to pause postgres failover with pg coordinator.
Expand Down Expand Up @@ -253,11 +253,9 @@ const (
VolumeExpansionModeOffline VolumeExpansionMode = "Offline"
)

type RestartSpec struct {
}
type RestartSpec struct{}

type Reprovision struct {
}
type Reprovision struct{}

type TLSSpec struct {
// TLSConfig contains updated tls configurations for client and server.
Expand Down
Loading

0 comments on commit a4fb055

Please sign in to comment.