Skip to content

Commit 7b9a066

Browse files
committed
Changed reason to more broadly applicable message.
Signed-off-by: Travis Mattera <[email protected]>
1 parent 8483b45 commit 7b9a066

23 files changed

+62
-65
lines changed

cmd/flux/resume_alert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ func (obj alertAdapter) getObservedGeneration() int64 {
4949

5050
func (obj alertAdapter) setUnsuspended() {
5151
obj.Alert.Spec.Suspend = false
52-
if _, ok := obj.Alert.Annotations[SuspendReasonAnnotation]; ok {
53-
delete(obj.Alert.Annotations, SuspendReasonAnnotation)
52+
if _, ok := obj.Alert.Annotations[SuspendMessageAnnotation]; ok {
53+
delete(obj.Alert.Annotations, SuspendMessageAnnotation)
5454
}
5555
}
5656

cmd/flux/resume_helmrelease.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ func (obj helmReleaseAdapter) getObservedGeneration() int64 {
5252

5353
func (obj helmReleaseAdapter) setUnsuspended() {
5454
obj.HelmRelease.Spec.Suspend = false
55-
if _, ok := obj.HelmRelease.Annotations[SuspendReasonAnnotation]; ok {
56-
delete(obj.HelmRelease.Annotations, SuspendReasonAnnotation)
55+
if _, ok := obj.HelmRelease.Annotations[SuspendMessageAnnotation]; ok {
56+
delete(obj.HelmRelease.Annotations, SuspendMessageAnnotation)
5757
}
5858
}
5959

cmd/flux/resume_image_repository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func (obj imageRepositoryAdapter) getObservedGeneration() int64 {
4848

4949
func (obj imageRepositoryAdapter) setUnsuspended() {
5050
obj.ImageRepository.Spec.Suspend = false
51-
if _, ok := obj.ImageRepository.Annotations[SuspendReasonAnnotation]; ok {
52-
delete(obj.ImageRepository.Annotations, SuspendReasonAnnotation)
51+
if _, ok := obj.ImageRepository.Annotations[SuspendMessageAnnotation]; ok {
52+
delete(obj.ImageRepository.Annotations, SuspendMessageAnnotation)
5353
}
5454
}
5555

cmd/flux/resume_image_updateauto.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func init() {
4444

4545
func (obj imageUpdateAutomationAdapter) setUnsuspended() {
4646
obj.ImageUpdateAutomation.Spec.Suspend = false
47-
if _, ok := obj.ImageUpdateAutomation.Annotations[SuspendReasonAnnotation]; ok {
48-
delete(obj.ImageUpdateAutomation.Annotations, SuspendReasonAnnotation)
47+
if _, ok := obj.ImageUpdateAutomation.Annotations[SuspendMessageAnnotation]; ok {
48+
delete(obj.ImageUpdateAutomation.Annotations, SuspendMessageAnnotation)
4949
}
5050
}
5151

cmd/flux/resume_kustomization.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ func (obj kustomizationAdapter) getObservedGeneration() int64 {
5151
}
5252

5353
func (obj kustomizationAdapter) setUnsuspended() {
54-
obj.Kustomization.Spec.Suspend = false
55-
if _, ok := obj.Kustomization.Annotations[SuspendReasonAnnotation]; ok {
56-
delete(obj.Kustomization.Annotations, SuspendReasonAnnotation)
57-
}
54+
delete(obj.Kustomization.Annotations, Suspended)
5855
}
5956

6057
func (obj kustomizationAdapter) successMessage() string {

cmd/flux/resume_receiver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ func (obj receiverAdapter) getObservedGeneration() int64 {
4949

5050
func (obj receiverAdapter) setUnsuspended() {
5151
obj.Receiver.Spec.Suspend = false
52-
if _, ok := obj.Receiver.Annotations[SuspendReasonAnnotation]; ok {
53-
delete(obj.Receiver.Annotations, SuspendReasonAnnotation)
52+
if _, ok := obj.Receiver.Annotations[SuspendMessageAnnotation]; ok {
53+
delete(obj.Receiver.Annotations, SuspendMessageAnnotation)
5454
}
5555
}
5656

cmd/flux/resume_source_bucket.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func (obj bucketAdapter) getObservedGeneration() int64 {
4848

4949
func (obj bucketAdapter) setUnsuspended() {
5050
obj.Bucket.Spec.Suspend = false
51-
if _, ok := obj.Bucket.Annotations[SuspendReasonAnnotation]; ok {
52-
delete(obj.Bucket.Annotations, SuspendReasonAnnotation)
51+
if _, ok := obj.Bucket.Annotations[SuspendMessageAnnotation]; ok {
52+
delete(obj.Bucket.Annotations, SuspendMessageAnnotation)
5353
}
5454
}
5555

cmd/flux/resume_source_chart.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ func (obj helmChartAdapter) getObservedGeneration() int64 {
5050

5151
func (obj helmChartAdapter) setUnsuspended() {
5252
obj.HelmChart.Spec.Suspend = false
53-
if _, ok := obj.HelmChart.Annotations[SuspendReasonAnnotation]; ok {
54-
delete(obj.HelmChart.Annotations, SuspendReasonAnnotation)
53+
if _, ok := obj.HelmChart.Annotations[SuspendMessageAnnotation]; ok {
54+
delete(obj.HelmChart.Annotations, SuspendMessageAnnotation)
5555
}
5656
}
5757

cmd/flux/resume_source_git.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func (obj gitRepositoryAdapter) getObservedGeneration() int64 {
4848

4949
func (obj gitRepositoryAdapter) setUnsuspended() {
5050
obj.GitRepository.Spec.Suspend = false
51-
if _, ok := obj.GitRepository.Annotations[SuspendReasonAnnotation]; ok {
52-
delete(obj.GitRepository.Annotations, SuspendReasonAnnotation)
51+
if _, ok := obj.GitRepository.Annotations[SuspendMessageAnnotation]; ok {
52+
delete(obj.GitRepository.Annotations, SuspendMessageAnnotation)
5353
}
5454
}
5555

cmd/flux/resume_source_helm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func (obj helmRepositoryAdapter) getObservedGeneration() int64 {
4848

4949
func (obj helmRepositoryAdapter) setUnsuspended() {
5050
obj.HelmRepository.Spec.Suspend = false
51-
if _, ok := obj.HelmRepository.Annotations[SuspendReasonAnnotation]; ok {
52-
delete(obj.HelmRepository.Annotations, SuspendReasonAnnotation)
51+
if _, ok := obj.HelmRepository.Annotations[SuspendMessageAnnotation]; ok {
52+
delete(obj.HelmRepository.Annotations, SuspendMessageAnnotation)
5353
}
5454
}
5555

0 commit comments

Comments
 (0)