Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate builtin check commands to Plugin crd #347

Merged
merged 6 commits into from
Apr 17, 2018
Merged

Conversation

mirshahriar
Copy link
Contributor

No description provided.

@mirshahriar mirshahriar changed the base branch from prototype to master April 13, 2018 09:24
@mirshahriar mirshahriar self-assigned this Apr 13, 2018
@codecov-io
Copy link

codecov-io commented Apr 13, 2018

Codecov Report

Merging #347 into master will decrease coverage by 0.09%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #347     +/-   ##
=========================================
- Coverage   32.36%   32.27%   -0.1%     
=========================================
  Files          15       15             
  Lines        1001     1004      +3     
=========================================
  Hits          324      324             
- Misses        623      626      +3     
  Partials       54       54
Impacted Files Coverage Δ
plugins/notifier/lib.go 1.43% <ø> (ø) ⬆️
plugins/check_event/lib.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5f6c49...78877df. Read the comment docs.

@@ -260,5 +260,8 @@ for crd in "${crds[@]}"; do
$ONESSL wait-until-ready crd ${crd}.monitoring.appscode.com || { echo "$crd crd failed to be ready"; exit 1; }
done

echo "creating built-in plugins"
${SCRIPT_LOCATION}docs/examples/plugins/plugins.yaml| kubectl apply -f -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inside hack deploy

@@ -123,6 +123,11 @@ func (op *Operator) RunWatchers(stopCh <-chan struct{}) {
}

func (op *Operator) Run(stopCh <-chan struct{}) error {
err := op.MigrateAlerts()
if err != nil {
log.Fatalln("Failed alert migrations:", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return err

}

if len(errs) > 0 {
return utilerrors.NewAggregate(errs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check not needed

return nil
}

func (op *Operator) MigrateNodeAlert() error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mountPoint ?

@@ -42,7 +42,7 @@ type options struct {
contextName string
// Event check information
namespace string
checkInterval time.Duration
checkInterval int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkIntervalSecs

@@ -99,7 +104,16 @@ type serviceOutput struct {
func (p *plugin) Check() (icinga.State, interface{}) {
opts := p.options

checkTime := time.Now().Add(-(opts.checkInterval + opts.clockSkew))
var checkInterval time.Duration = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 1 time.Sec

@tamalsaha tamalsaha merged commit b2a75ec into master Apr 17, 2018
@tamalsaha tamalsaha changed the title Add builtin plugin Migrate builtin check commands to Plugin crd Apr 17, 2018
@mirshahriar mirshahriar deleted the add-builtin-plugin branch May 21, 2018 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants