Giter Club home page Giter Club logo

Comments (9)

sana-jawad avatar sana-jawad commented on July 1, 2024

@DarthSlider we already have this option of ""max-look-back" Please refer https://github.com/salesforce/sloop/blob/master/pkg/sloop/server/internal/config/config.go#L82

from sloop.

DarthSlider avatar DarthSlider commented on July 1, 2024

@DarthSlider we already have this option of ""max-look-back" Please refer https://github.com/salesforce/sloop/blob/master/pkg/sloop/server/internal/config/config.go#L82

Are these settings configurable via ENV?

from sloop.

DarthSlider avatar DarthSlider commented on July 1, 2024

So, I could use all this

type SloopConfig struct {
settings in sloop.json, am I?

from sloop.

DarthSlider avatar DarthSlider commented on July 1, 2024

@sana-jawad
Ok, looks like some settings at sloop.json are just ignored.

This is my config file:
sloop.json: |-
{
defaultNamespace: "default",
defaultKind: "Pod",
defaultLookback: "1h",
MaxLookback: 302400000000000,
MaxDiskMb: 9216,
WatchCrds: false,
leftBarLinks: [
],
resourceLinks: [
]
}

Changing default namespace works, but changing MaxLoockback, MaxDiscMB or WatchCrd doesn't.

Also I`m 100% sure that sloop reading this file, because if I put incorrect values it fails to start.

from sloop.

sana-jawad avatar sana-jawad commented on July 1, 2024

yes all the variables are configurable. They can be specified in config file as well as runtime arguments. The issue with above sloop.json file is the casing. I have set it to 1hr for example
image

The configs can be checked via UI as well. Click on Sloop Debug Menu which appears on the left side of Sloop Instance UI.
image

Then click Config from Menu
image

Then the configs would be shown. The look back time is 1 hr here (the value is displayed in nanoseconds)
image

from sloop.

DarthSlider avatar DarthSlider commented on July 1, 2024

@sana-jawad
Fixed to no avail.
Here is my config:
image
and it says: "panic: failed to unmarshal /sloopconfig/sloop.json. error unmarshaling JSON: json: cannot unmarshal string into Go struct field SloopConfig.maxLookBack of type time.Duration"

Changing it to the integer values with propper casing doesn't help:
image

image

from sloop.

sana-jawad avatar sana-jawad commented on July 1, 2024

@DarthSlider how are you running sloop? Try with run time arguments like:

image

from sloop.

DarthSlider avatar DarthSlider commented on July 1, 2024

@sana-jawad running it in k8s via provided helm chart.
sloop.json is defined via configmap.
Running it with args says "flag provided but not defined: -max-look-back 4h"
Here are my args:
image

Which is weird because it also says:
"-max-look-back duration
Max history data to keep (default 336h0m0s)"

But "docker run sloopimage/sloop:latest sloop -max-look-back 4h" seems to work.

from sloop.

mallow111 avatar mallow111 commented on July 1, 2024

@DarthSlider thanks for reporting the issue, we will put it on our backlog, but feel free to send out a PR with a fix.

from sloop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.