forked from carvel-dev/kapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consider batch/x/CronJob always done applying
- Loading branch information
1 parent
1058432
commit d948f75
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package resourcesmisc | ||
|
||
import ( | ||
ctlres "github.com/k14s/kapp/pkg/kapp/resources" | ||
) | ||
|
||
type BatchvxCronJob struct { | ||
resource ctlres.Resource | ||
} | ||
|
||
func NewBatchvxCronJob(resource ctlres.Resource) *BatchvxCronJob { | ||
matcher := ctlres.APIGroupKindMatcher{ | ||
APIGroup: "batch", | ||
Kind: "CronJob", | ||
} | ||
if matcher.Matches(resource) { | ||
return &BatchvxCronJob{resource} | ||
} | ||
return nil | ||
} | ||
|
||
func (s BatchvxCronJob) IsDoneApplying() DoneApplyState { | ||
// Always return success as we do not want to pick up associated | ||
// pods that might have previously failed | ||
return DoneApplyState{Done: true, Successful: true} | ||
} |