diff --git a/go.mod b/go.mod index 543a114ab..07cafefb3 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027 kmodules.xyz/resource-metadata v0.5.8-0.20210829123359-8f6a3d706da5 // indirect kmodules.xyz/webhook-runtime v0.0.0-20210829120758-f6ab57afa7e4 - stash.appscode.dev/apimachinery v0.15.0 + stash.appscode.dev/apimachinery v0.15.1-0.20210916061209-8cbe8b9ddbfb ) replace bitbucket.org/ww/goautoneg => gomodules.xyz/goautoneg v0.0.0-20120707110453-a547fc61f48d diff --git a/go.sum b/go.sum index b3492daa1..f1c16bbe8 100644 --- a/go.sum +++ b/go.sum @@ -1225,11 +1225,9 @@ kmodules.xyz/client-go v0.0.0-20210909114628-15cac6c74063/go.mod h1:0gkPeALtYjB2 kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278 h1:sFmqh4EaiZ4K2FkkGvrDFddstq8GSf6ogH24IAsuKew= kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA= -kmodules.xyz/custom-resources v0.0.0-20210618003440-c6bb400da153/go.mod h1:/NLuNSf299U0XVuNEh2swtw3EczWFRL3Sx24WhNoWCM= kmodules.xyz/custom-resources v0.0.0-20210829135624-c63be82e13c0 h1:sCzXaZ9wWsKjOF/j4mTd8zeAXhd6BWZrdKJ8Dr6c++U= kmodules.xyz/custom-resources v0.0.0-20210829135624-c63be82e13c0/go.mod h1:VYtz1fgHgLqCk+sdSUGBClfZfJ6z4873wB5MYOXxpS8= kmodules.xyz/monitoring-agent-api v0.0.0-20210618005119-a8c212adc2bf/go.mod h1:QsbPe5SefM7XmLzJgdMX/1iXxwqAC1Do1eHa98TCq3k= -kmodules.xyz/objectstore-api v0.0.0-20210618005912-71f8a80f48f9/go.mod h1:8sCfgZQImwjTLh2mDxYiim6+GecFN+DamkPSF9joyu4= kmodules.xyz/objectstore-api v0.0.0-20210829122106-d39859fc2d56 h1:hAROzfrhdJPMDJ8tKnwSSt4WIe+OdQobS0gmSo+VhyA= kmodules.xyz/objectstore-api v0.0.0-20210829122106-d39859fc2d56/go.mod h1:Tkcf9uTplnrJ6C8o0zlw2kpgS1SaWAiMO5P2YgLjTo8= kmodules.xyz/offshoot-api v0.0.0-20210618005544-5217a24765da/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns= @@ -1271,5 +1269,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -stash.appscode.dev/apimachinery v0.15.0 h1:vpwPKV6LP4ieZ87/2ri3ms4r3ZnE8bES24y8bbLYxqE= -stash.appscode.dev/apimachinery v0.15.0/go.mod h1:ColOw+Y5IeI3DO5bu1WZWw2AAhinz99K6fKKVLNkd2U= +stash.appscode.dev/apimachinery v0.15.1-0.20210916061209-8cbe8b9ddbfb h1:npmpqegjv1Wuf7WPqhp2p9AAp8zXrBmGacq7318qmWg= +stash.appscode.dev/apimachinery v0.15.1-0.20210916061209-8cbe8b9ddbfb/go.mod h1:iyBZuC+pUvE9q0ZH2UsvDHEhxLBjOh7/LuhQYccClcg= diff --git a/pkg/controller/backup_configuration.go b/pkg/controller/backup_configuration.go index d2ed85aa1..033e42e20 100644 --- a/pkg/controller/backup_configuration.go +++ b/pkg/controller/backup_configuration.go @@ -355,7 +355,7 @@ func (c *StashController) EnsureBackupTriggeringCronJob(inv invoker.BackupInvoke // ServiceAccount has been specified, so use it. serviceAccountName = inv.RuntimeSettings.Pod.ServiceAccountName } else { - // ServiceAccount hasn't been specified. so create new one with same name as BackupConfiguration object prefixed with stash-backup. + // ServiceAccount hasn't been specified. so create new one with same name as BackupConfiguration object prefixed with stash-trigger. serviceAccountName = meta.Name _, _, err := core_util.CreateOrPatchServiceAccount( @@ -404,7 +404,7 @@ func (c *StashController) EnsureBackupTriggeringCronJob(inv invoker.BackupInvoke in.Spec.JobTemplate.Spec.Template.Labels = core_util.UpsertMap(in.Spec.JobTemplate.Spec.Template.Labels, inv.Labels) container := core.Container{ - Name: apis.StashContainer, + Name: apis.StashCronJobContainer, ImagePullPolicy: core.PullIfNotPresent, Image: image.ToContainerImage(), Args: []string{ @@ -469,7 +469,7 @@ func (c *StashController) EnsureBackupTriggeringCronJobDeleted(inv invoker.Backu } func getBackupCronJobName(name string) string { - return meta2.ValidCronJobNameWithPrefix(apis.PrefixStashBackup, strings.ReplaceAll(name, ".", "-")) + return meta2.ValidCronJobNameWithPrefix(apis.PrefixStashTrigger, strings.ReplaceAll(name, ".", "-")) } func (c *StashController) handleCronJobCreationFailure(ref *core.ObjectReference, err error) error { diff --git a/vendor/modules.txt b/vendor/modules.txt index fe9cc8b74..32bf068ac 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1478,7 +1478,7 @@ sigs.k8s.io/structured-merge-diff/v4/typed sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml -# stash.appscode.dev/apimachinery v0.15.0 +# stash.appscode.dev/apimachinery v0.15.1-0.20210916061209-8cbe8b9ddbfb ## explicit stash.appscode.dev/apimachinery/apis stash.appscode.dev/apimachinery/apis/repositories diff --git a/vendor/stash.appscode.dev/apimachinery/apis/constants.go b/vendor/stash.appscode.dev/apimachinery/apis/constants.go index c965ab893..f6f83db71 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/constants.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/constants.go @@ -105,14 +105,16 @@ const ( PrefixStashBackup = "stash-backup" PrefixStashRestore = "stash-restore" PrefixStashVolumeSnapshot = "stash-vs" - - StashContainer = "stash" - StashInitContainer = "stash-init" - LocalVolumeName = "stash-local" - ScratchDirVolumeName = "stash-scratchdir" - TmpDirVolumeName = "tmp-dir" - TmpDirMountPath = "/tmp" - PodinfoVolumeName = "stash-podinfo" + PrefixStashTrigger = "stash-trigger" + + StashContainer = "stash" + StashInitContainer = "stash-init" + StashCronJobContainer = "stash-trigger" + LocalVolumeName = "stash-local" + ScratchDirVolumeName = "stash-scratchdir" + TmpDirVolumeName = "tmp-dir" + TmpDirMountPath = "/tmp" + PodinfoVolumeName = "stash-podinfo" RecoveryJobPrefix = "stash-recovery-" ScaledownCronPrefix = "stash-scaledown-cron-" diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go index 608de4cde..938957f4b 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -338,6 +339,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), + "kmodules.xyz/client-go/api/v1.ObjectReference": schema_kmodulesxyz_client_go_api_v1_ObjectReference(ref), "kmodules.xyz/client-go/api/v1.ResourceID": schema_kmodulesxyz_client_go_api_v1_ResourceID(ref), "kmodules.xyz/client-go/api/v1.TLSConfig": schema_kmodulesxyz_client_go_api_v1_TLSConfig(ref), "kmodules.xyz/client-go/api/v1.X509Subject": schema_kmodulesxyz_client_go_api_v1_X509Subject(ref), @@ -16687,6 +16689,35 @@ func schema_kmodulesxyz_client_go_api_v1_Condition(ref common.ReferenceCallback) } } +func schema_kmodulesxyz_client_go_api_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + func schema_kmodulesxyz_client_go_api_v1_ResourceID(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.conversion.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.conversion.go index 21d0e777f..bc14d58c6 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.conversion.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.conversion.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.deepcopy.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.deepcopy.go index 8b00ff170..8a5d97f1d 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.defaults.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.defaults.go index 77dbb9141..ce88c5559 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.defaults.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/zz_generated.defaults.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/zz_generated.deepcopy.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/zz_generated.deepcopy.go index c12bc933d..bcb2e303d 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/zz_generated.deepcopy.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go index 7ea40b936..26095da29 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -338,6 +339,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), + "kmodules.xyz/client-go/api/v1.ObjectReference": schema_kmodulesxyz_client_go_api_v1_ObjectReference(ref), "kmodules.xyz/client-go/api/v1.ResourceID": schema_kmodulesxyz_client_go_api_v1_ResourceID(ref), "kmodules.xyz/client-go/api/v1.TLSConfig": schema_kmodulesxyz_client_go_api_v1_TLSConfig(ref), "kmodules.xyz/client-go/api/v1.X509Subject": schema_kmodulesxyz_client_go_api_v1_X509Subject(ref), @@ -16699,6 +16701,35 @@ func schema_kmodulesxyz_client_go_api_v1_Condition(ref common.ReferenceCallback) } } +func schema_kmodulesxyz_client_go_api_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + func schema_kmodulesxyz_client_go_api_v1_ResourceID(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/zz_generated.deepcopy.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/zz_generated.deepcopy.go index 7330dae13..0f554b352 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go index b77064c24..95108ab24 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -338,6 +339,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), + "kmodules.xyz/client-go/api/v1.ObjectReference": schema_kmodulesxyz_client_go_api_v1_ObjectReference(ref), "kmodules.xyz/client-go/api/v1.ResourceID": schema_kmodulesxyz_client_go_api_v1_ResourceID(ref), "kmodules.xyz/client-go/api/v1.TLSConfig": schema_kmodulesxyz_client_go_api_v1_TLSConfig(ref), "kmodules.xyz/client-go/api/v1.X509Subject": schema_kmodulesxyz_client_go_api_v1_X509Subject(ref), @@ -16733,6 +16735,35 @@ func schema_kmodulesxyz_client_go_api_v1_Condition(ref common.ReferenceCallback) } } +func schema_kmodulesxyz_client_go_api_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + func schema_kmodulesxyz_client_go_api_v1_ResourceID(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go index 58785997d..15159caad 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /*