diff --git a/api/bases/cinder.openstack.org_cinders.yaml b/api/bases/cinder.openstack.org_cinders.yaml index e16970fc..eca93898 100644 --- a/api/bases/cinder.openstack.org_cinders.yaml +++ b/api/bases/cinder.openstack.org_cinders.yaml @@ -353,12 +353,6 @@ spec: default: 1 0 * * * type: string type: object - debug: - properties: - dbPurge: - default: false - type: boolean - type: object extraMounts: items: properties: diff --git a/api/v1beta1/cinder_types.go b/api/v1beta1/cinder_types.go index 70709b93..3353e5d5 100644 --- a/api/v1beta1/cinder_types.go +++ b/api/v1beta1/cinder_types.go @@ -72,11 +72,6 @@ type CinderSpecBase struct { // Memcached instance name. MemcachedInstance string `json:"memcachedInstance"` - // +kubebuilder:validation:Optional - // Debug - enable debug for different deploy stages. If an init container is used, it runs and the - // actual action pod gets started with sleep infinity - Debug CinderDebug `json:"debug,omitempty"` - // +kubebuilder:validation:Optional // +kubebuilder:default=false // PreserveJobs - do not delete jobs after they finished e.g. to check logs @@ -204,15 +199,6 @@ type DBPurge struct { Schedule string `json:"schedule"` } -// CinderDebug contains flags related to multiple debug activities. See the -// individual comments for what this means for each flag. -type CinderDebug struct { - // +kubebuilder:validation:Optional - // +kubebuilder:default=false - // DBPurge increases log verbosity by executing the db_purge command with "--debug". - DBPurge bool `json:"dbPurge"` -} - //+kubebuilder:object:root=true // CinderList contains a list of Cinder diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 4b9ce231..e9fc1f73 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -432,21 +432,6 @@ func (in *CinderBackupTemplateCore) DeepCopy() *CinderBackupTemplateCore { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CinderDebug) DeepCopyInto(out *CinderDebug) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CinderDebug. -func (in *CinderDebug) DeepCopy() *CinderDebug { - if in == nil { - return nil - } - out := new(CinderDebug) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CinderDefaults) DeepCopyInto(out *CinderDefaults) { *out = *in @@ -744,7 +729,6 @@ func (in *CinderSpec) DeepCopy() *CinderSpec { func (in *CinderSpecBase) DeepCopyInto(out *CinderSpecBase) { *out = *in out.CinderTemplate = in.CinderTemplate - out.Debug = in.Debug if in.ExtraMounts != nil { in, out := &in.ExtraMounts, &out.ExtraMounts *out = make([]CinderExtraVolMounts, len(*in)) diff --git a/config/crd/bases/cinder.openstack.org_cinders.yaml b/config/crd/bases/cinder.openstack.org_cinders.yaml index e16970fc..eca93898 100644 --- a/config/crd/bases/cinder.openstack.org_cinders.yaml +++ b/config/crd/bases/cinder.openstack.org_cinders.yaml @@ -353,12 +353,6 @@ spec: default: 1 0 * * * type: string type: object - debug: - properties: - dbPurge: - default: false - type: boolean - type: object extraMounts: items: properties: diff --git a/pkg/cinder/cronjob.go b/pkg/cinder/cronjob.go index 53e4f551..c39bd504 100644 --- a/pkg/cinder/cronjob.go +++ b/pkg/cinder/cronjob.go @@ -37,14 +37,8 @@ func CronJob( cinderGroup := int64(cinderv1.CinderGroupID) config0644AccessMode := int32(0644) - debugArg := "" - if instance.Spec.Debug.DBPurge { - debugArg = " --debug" - } - dbPurgeCommand := fmt.Sprintf( - "/usr/bin/cinder-manage%s --config-dir /etc/cinder/cinder.conf.d db purge %d", - debugArg, + "/usr/bin/cinder-manage --debug --config-dir /etc/cinder/cinder.conf.d db purge %d", instance.Spec.DBPurge.Age) args := []string{"-c", dbPurgeCommand}