From 978c8fd32830ff32e1f2523f35f586f55cdb14dc Mon Sep 17 00:00:00 2001 From: Arnob kumar saha Date: Mon, 6 Nov 2023 10:25:15 +0600 Subject: [PATCH] Add support for init with git-sync; Add const Signed-off-by: Arnob kumar saha --- .../v1alpha1/elasticsearch_version_types.go | 2 + apis/catalog/v1alpha1/etcd_version_types.go | 2 + .../catalog/v1alpha1/mariadb_version_types.go | 2 + .../catalog/v1alpha1/mongodb_version_types.go | 2 + apis/catalog/v1alpha1/openapi_generated.go | 56 ++++++++++++++++--- .../v1alpha1/perconaxtradb_version_types.go | 2 + .../v1alpha1/postgres_version_types.go | 2 + apis/catalog/v1alpha1/redis_version_types.go | 2 + .../catalog/v1alpha1/zz_generated.deepcopy.go | 7 +++ apis/kubedb/v1alpha2/constants.go | 8 +++ ...alog.kubedb.com_elasticsearchversions.yaml | 7 +++ crds/catalog.kubedb.com_etcdversions.yaml | 7 +++ crds/catalog.kubedb.com_mariadbversions.yaml | 7 +++ crds/catalog.kubedb.com_mongodbversions.yaml | 7 +++ ...alog.kubedb.com_perconaxtradbversions.yaml | 7 +++ crds/catalog.kubedb.com_postgresversions.yaml | 7 +++ crds/catalog.kubedb.com_redisversions.yaml | 7 +++ openapi/swagger.json | 24 ++++++++ 18 files changed, 151 insertions(+), 7 deletions(-) diff --git a/apis/catalog/v1alpha1/elasticsearch_version_types.go b/apis/catalog/v1alpha1/elasticsearch_version_types.go index 1b3e96b52c..5cbe95a0db 100644 --- a/apis/catalog/v1alpha1/elasticsearch_version_types.go +++ b/apis/catalog/v1alpha1/elasticsearch_version_types.go @@ -82,6 +82,8 @@ type ElasticsearchVersionSpec struct { SecurityContext ElasticsearchSecurityContext `json:"securityContext"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // ElasticsearchVersionDatabase is the Elasticsearch Database image diff --git a/apis/catalog/v1alpha1/etcd_version_types.go b/apis/catalog/v1alpha1/etcd_version_types.go index 07eebfd1ce..96308c35db 100644 --- a/apis/catalog/v1alpha1/etcd_version_types.go +++ b/apis/catalog/v1alpha1/etcd_version_types.go @@ -62,6 +62,8 @@ type EtcdVersionSpec struct { // Stash defines backup and restore task definitions. // +optional Stash appcat.StashAddonSpec `json:"stash,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // EtcdVersionDatabase is the Etcd Database image diff --git a/apis/catalog/v1alpha1/mariadb_version_types.go b/apis/catalog/v1alpha1/mariadb_version_types.go index d4a5d807b3..cdd52e32ed 100644 --- a/apis/catalog/v1alpha1/mariadb_version_types.go +++ b/apis/catalog/v1alpha1/mariadb_version_types.go @@ -71,6 +71,8 @@ type MariaDBVersionSpec struct { Stash appcat.StashAddonSpec `json:"stash,omitempty"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // MariaDBVersionDatabase is the mariadb image diff --git a/apis/catalog/v1alpha1/mongodb_version_types.go b/apis/catalog/v1alpha1/mongodb_version_types.go index 00a2ed9eed..3426634b6b 100644 --- a/apis/catalog/v1alpha1/mongodb_version_types.go +++ b/apis/catalog/v1alpha1/mongodb_version_types.go @@ -73,6 +73,8 @@ type MongoDBVersionSpec struct { Stash appcat.StashAddonSpec `json:"stash,omitempty"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // MongoDBVersionDatabase is the MongoDB Database image diff --git a/apis/catalog/v1alpha1/openapi_generated.go b/apis/catalog/v1alpha1/openapi_generated.go index af1f56e0f8..c04097c883 100644 --- a/apis/catalog/v1alpha1/openapi_generated.go +++ b/apis/catalog/v1alpha1/openapi_generated.go @@ -22342,12 +22342,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_ElasticsearchVersionSpec(ref comm Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "authPlugin", "db", "exporter", "initContainer", "podSecurityPolicies"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchDashboardVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionDashboardInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchDashboardVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionDashboardInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ElasticsearchVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } @@ -22525,12 +22531,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_EtcdVersionSpec(ref common.Refere Ref: ref("kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "db", "exporter"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.EtcdVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.EtcdVersionExporter"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.EtcdVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.EtcdVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"}, } } @@ -23017,12 +23029,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_MariaDBVersionSpec(ref common.Ref Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MariaDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } @@ -23481,12 +23499,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_MongoDBVersionSpec(ref common.Ref Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies", "replicationModeDetector"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ReplicationModeDetector", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.MongoDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ReplicationModeDetector", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } @@ -24216,12 +24240,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_PerconaXtraDBVersionSpec(ref comm Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "db", "exporter", "initContainer", "podSecurityPolicies"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PerconaXtraDBVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } @@ -24775,12 +24805,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_PostgresVersionSpec(ref common.Re Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "db", "exporter", "podSecurityPolicies"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PostgresVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } @@ -25259,12 +25295,18 @@ func schema_apimachinery_apis_catalog_v1alpha1_RedisVersionSpec(ref common.Refer Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), }, }, + "gitSyncer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer"), + }, + }, }, Required: []string{"version", "db", "exporter", "podSecurityPolicies"}, }, }, Dependencies: []string{ - "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, + "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1.StashAddonSpec", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.GitSyncer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionCoordinator", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionPodSecurityPolicy", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } diff --git a/apis/catalog/v1alpha1/perconaxtradb_version_types.go b/apis/catalog/v1alpha1/perconaxtradb_version_types.go index fb511c0622..fa5af4c313 100644 --- a/apis/catalog/v1alpha1/perconaxtradb_version_types.go +++ b/apis/catalog/v1alpha1/perconaxtradb_version_types.go @@ -71,6 +71,8 @@ type PerconaXtraDBVersionSpec struct { Stash appcat.StashAddonSpec `json:"stash,omitempty"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // PerconaXtraDBVersionDatabase is the perconaxtradb image diff --git a/apis/catalog/v1alpha1/postgres_version_types.go b/apis/catalog/v1alpha1/postgres_version_types.go index cce3d616f6..9e6d2ff2c5 100644 --- a/apis/catalog/v1alpha1/postgres_version_types.go +++ b/apis/catalog/v1alpha1/postgres_version_types.go @@ -76,6 +76,8 @@ type PostgresVersionSpec struct { SecurityContext PostgresSecurityContext `json:"securityContext"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // PostgresVersionInitContainer is the Postgres init container image diff --git a/apis/catalog/v1alpha1/redis_version_types.go b/apis/catalog/v1alpha1/redis_version_types.go index a21f18eefe..c85c88d8de 100644 --- a/apis/catalog/v1alpha1/redis_version_types.go +++ b/apis/catalog/v1alpha1/redis_version_types.go @@ -70,6 +70,8 @@ type RedisVersionSpec struct { Stash appcat.StashAddonSpec `json:"stash,omitempty"` // update constraints UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // +optional + GitSyncer GitSyncer `json:"gitSyncer,omitempty"` } // RedisVersionInitContainer is the Redis init container image diff --git a/apis/catalog/v1alpha1/zz_generated.deepcopy.go b/apis/catalog/v1alpha1/zz_generated.deepcopy.go index dd18911de3..896d7fb8e9 100644 --- a/apis/catalog/v1alpha1/zz_generated.deepcopy.go +++ b/apis/catalog/v1alpha1/zz_generated.deepcopy.go @@ -230,6 +230,7 @@ func (in *ElasticsearchVersionSpec) DeepCopyInto(out *ElasticsearchVersionSpec) in.Stash.DeepCopyInto(&out.Stash) in.SecurityContext.DeepCopyInto(&out.SecurityContext) in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + out.GitSyncer = in.GitSyncer return } @@ -341,6 +342,7 @@ func (in *EtcdVersionSpec) DeepCopyInto(out *EtcdVersionSpec) { out.DB = in.DB out.Exporter = in.Exporter in.Stash.DeepCopyInto(&out.Stash) + out.GitSyncer = in.GitSyncer return } @@ -633,6 +635,7 @@ func (in *MariaDBVersionSpec) DeepCopyInto(out *MariaDBVersionSpec) { out.PodSecurityPolicies = in.PodSecurityPolicies in.Stash.DeepCopyInto(&out.Stash) in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + out.GitSyncer = in.GitSyncer return } @@ -907,6 +910,7 @@ func (in *MongoDBVersionSpec) DeepCopyInto(out *MongoDBVersionSpec) { out.ReplicationModeDetector = in.ReplicationModeDetector in.Stash.DeepCopyInto(&out.Stash) in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + out.GitSyncer = in.GitSyncer return } @@ -1339,6 +1343,7 @@ func (in *PerconaXtraDBVersionSpec) DeepCopyInto(out *PerconaXtraDBVersionSpec) out.PodSecurityPolicies = in.PodSecurityPolicies in.Stash.DeepCopyInto(&out.Stash) in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + out.GitSyncer = in.GitSyncer return } @@ -1673,6 +1678,7 @@ func (in *PostgresVersionSpec) DeepCopyInto(out *PostgresVersionSpec) { in.Stash.DeepCopyInto(&out.Stash) in.SecurityContext.DeepCopyInto(&out.SecurityContext) in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + out.GitSyncer = in.GitSyncer return } @@ -1968,6 +1974,7 @@ func (in *RedisVersionSpec) DeepCopyInto(out *RedisVersionSpec) { out.PodSecurityPolicies = in.PodSecurityPolicies in.Stash.DeepCopyInto(&out.Stash) in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) + out.GitSyncer = in.GitSyncer return } diff --git a/apis/kubedb/v1alpha2/constants.go b/apis/kubedb/v1alpha2/constants.go index fad6318b5a..a66b7f8879 100644 --- a/apis/kubedb/v1alpha2/constants.go +++ b/apis/kubedb/v1alpha2/constants.go @@ -691,3 +691,11 @@ var ( }, } ) + +const ( + InitFromGit = "init-from-git" + InitFromGitMountPath = "/git" + GitSecretVolume = "git-secret" + GitSecretMountPath = "/etc/git-secret" + GitSyncContainerName = "git-sync" +) diff --git a/crds/catalog.kubedb.com_elasticsearchversions.yaml b/crds/catalog.kubedb.com_elasticsearchversions.yaml index 20a0965b7f..a0f366a0c7 100644 --- a/crds/catalog.kubedb.com_elasticsearchversions.yaml +++ b/crds/catalog.kubedb.com_elasticsearchversions.yaml @@ -93,6 +93,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object initContainer: properties: image: diff --git a/crds/catalog.kubedb.com_etcdversions.yaml b/crds/catalog.kubedb.com_etcdversions.yaml index 27ee2f754a..4e22f6153a 100644 --- a/crds/catalog.kubedb.com_etcdversions.yaml +++ b/crds/catalog.kubedb.com_etcdversions.yaml @@ -61,6 +61,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object stash: properties: addon: diff --git a/crds/catalog.kubedb.com_mariadbversions.yaml b/crds/catalog.kubedb.com_mariadbversions.yaml index 836b599e0f..01c2d90d2a 100644 --- a/crds/catalog.kubedb.com_mariadbversions.yaml +++ b/crds/catalog.kubedb.com_mariadbversions.yaml @@ -68,6 +68,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object initContainer: properties: image: diff --git a/crds/catalog.kubedb.com_mongodbversions.yaml b/crds/catalog.kubedb.com_mongodbversions.yaml index 73eb5d0aba..6db277b023 100644 --- a/crds/catalog.kubedb.com_mongodbversions.yaml +++ b/crds/catalog.kubedb.com_mongodbversions.yaml @@ -71,6 +71,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object initContainer: properties: image: diff --git a/crds/catalog.kubedb.com_perconaxtradbversions.yaml b/crds/catalog.kubedb.com_perconaxtradbversions.yaml index 87cae295ab..115fb1ddd4 100644 --- a/crds/catalog.kubedb.com_perconaxtradbversions.yaml +++ b/crds/catalog.kubedb.com_perconaxtradbversions.yaml @@ -68,6 +68,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object initContainer: properties: image: diff --git a/crds/catalog.kubedb.com_postgresversions.yaml b/crds/catalog.kubedb.com_postgresversions.yaml index 7353a457ec..106b7ffd5f 100644 --- a/crds/catalog.kubedb.com_postgresversions.yaml +++ b/crds/catalog.kubedb.com_postgresversions.yaml @@ -81,6 +81,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object initContainer: properties: image: diff --git a/crds/catalog.kubedb.com_redisversions.yaml b/crds/catalog.kubedb.com_redisversions.yaml index 6f1442ab7c..25a68430fc 100644 --- a/crds/catalog.kubedb.com_redisversions.yaml +++ b/crds/catalog.kubedb.com_redisversions.yaml @@ -68,6 +68,13 @@ spec: required: - image type: object + gitSyncer: + properties: + image: + type: string + required: + - image + type: object initContainer: properties: image: diff --git a/openapi/swagger.json b/openapi/swagger.json index db73af70eb..cf8d671e99 100644 --- a/openapi/swagger.json +++ b/openapi/swagger.json @@ -28619,6 +28619,10 @@ "default": {}, "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.ElasticsearchVersionExporter" }, + "gitSyncer": { + "default": {}, + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.GitSyncer" + }, "initContainer": { "description": "Init container Image", "default": {}, @@ -28761,6 +28765,10 @@ "default": {}, "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.EtcdVersionExporter" }, + "gitSyncer": { + "default": {}, + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.GitSyncer" + }, "stash": { "description": "Stash defines backup and restore task definitions.", "default": {}, @@ -29065,6 +29073,10 @@ "default": {}, "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.MongoDBVersionExporter" }, + "gitSyncer": { + "default": {}, + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.GitSyncer" + }, "initContainer": { "description": "Init container Image", "default": {}, @@ -29541,6 +29553,10 @@ "default": {}, "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.PerconaXtraDBVersionExporter" }, + "gitSyncer": { + "default": {}, + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.GitSyncer" + }, "initContainer": { "description": "Init container Image", "default": {}, @@ -29745,6 +29761,10 @@ "default": {}, "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.PostgresVersionExporter" }, + "gitSyncer": { + "default": {}, + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.GitSyncer" + }, "initContainer": { "description": "init container image", "default": {}, @@ -30071,6 +30091,10 @@ "default": {}, "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.RedisVersionExporter" }, + "gitSyncer": { + "default": {}, + "$ref": "#/definitions/dev.kubedb.apimachinery.apis.catalog.v1alpha1.GitSyncer" + }, "initContainer": { "description": "init container image", "default": {},