Skip to content

Commit

Permalink
[minor] Create CronJob from Config's scheduler (#44)
Browse files Browse the repository at this point in the history
* Create CronJob from Config's scheduler

* change container image

* change container image

* rename function/variable

* assign s2hConfig/s2hExternalUrl
  • Loading branch information
sunny299 authored Jul 9, 2020
1 parent f90f38c commit c970245
Show file tree
Hide file tree
Showing 10 changed files with 516 additions and 27 deletions.
2 changes: 2 additions & 0 deletions api/v1beta1/config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ type Component struct {
Source *UpdatingSource `json:"source,omitempty"`
// +optional
Dependencies []*Component `json:"dependencies,omitempty"`
// +optional
Schedules []string `json:"schedules,omitempty"`
}

// ComponentImage represents an image repository, tag and pattern which is a regex of tag
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions config/crds/env.samsahai.io_configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ spec:
type: string
parent:
type: string
schedules:
items:
type: string
type: array
source:
description: UpdatingSource represents source for checking desired
version of components
Expand Down
18 changes: 16 additions & 2 deletions docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-06-26 16:35:33.345858 +0700 +07 m=+0.159096294
// 2020-07-09 14:36:35.052052 +0700 +07 m=+0.132228334

package docs

Expand Down Expand Up @@ -723,7 +723,7 @@ var doc = `{
"type": "object",
"properties": {
"promotedBy": {
"description": "ActivePromotedBy represents a person who promoted the ActivePromotion\n+optional",
"description": "PromotedBy represents a person who promoted the ActivePromotion\n+optional",
"type": "string"
},
"skipTestRunner": {
Expand Down Expand Up @@ -856,6 +856,13 @@ var doc = `{
"description": "+optional",
"type": "string"
},
"schedules": {
"description": "+optional",
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"description": "+optional",
"type": "string"
Expand Down Expand Up @@ -1827,6 +1834,13 @@ var doc = `{
"description": "+optional",
"type": "string"
},
"schedules": {
"description": "+optional",
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"description": "+optional",
"type": "string"
Expand Down
16 changes: 15 additions & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@
"type": "object",
"properties": {
"promotedBy": {
"description": "ActivePromotedBy represents a person who promoted the ActivePromotion\n+optional",
"description": "PromotedBy represents a person who promoted the ActivePromotion\n+optional",
"type": "string"
},
"skipTestRunner": {
Expand Down Expand Up @@ -835,6 +835,13 @@
"description": "+optional",
"type": "string"
},
"schedules": {
"description": "+optional",
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"description": "+optional",
"type": "string"
Expand Down Expand Up @@ -1806,6 +1813,13 @@
"description": "+optional",
"type": "string"
},
"schedules": {
"description": "+optional",
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"description": "+optional",
"type": "string"
Expand Down
12 changes: 11 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ definitions:
properties:
promotedBy:
description: |-
ActivePromotedBy represents a person who promoted the ActivePromotion
PromotedBy represents a person who promoted the ActivePromotion
+optional
type: string
skipTestRunner:
Expand Down Expand Up @@ -190,6 +190,11 @@ definitions:
parent:
description: +optional
type: string
schedules:
description: +optional
items:
type: string
type: array
source:
description: +optional
type: string
Expand Down Expand Up @@ -961,6 +966,11 @@ definitions:
parent:
description: +optional
type: string
schedules:
description: +optional
items:
type: string
type: array
source:
description: +optional
type: string
Expand Down
Loading

0 comments on commit c970245

Please sign in to comment.