Git Product home page Git Product logo

Comments (5)

hrist0stoichev avatar hrist0stoichev commented on June 14, 2024 1

To be honest @danielpacak, I don't really know whether it has better support. When I researched this, I saw that it has native support for Sentinel but I haven't really looked at the implementation because harbor-scanner-trivy already uses redigo. I will take a quick look and update if anything comes up!

from harbor-scanner-trivy.

bitsf avatar bitsf commented on June 14, 2024

Hi @danielpacak
I would like to make the env in harbor configured as

  • for in cluster redis
    SCANNER_STORE_REDIS_URL=redis://redis:6379/5
  • for sentinel redis
    SCANNER_STORE_REDIS_URL=redis+sentinel://redis-cluster_sentinel_1:26379,redis-cluster_sentinel_2:26379,redis-cluster_sentinel_3:26379/mymaster/5

Is that OK?

from harbor-scanner-trivy.

danielpacak avatar danielpacak commented on June 14, 2024

Hi @danielpacak
I would like to make the env in harbor configured as

  • for in cluster redis
    SCANNER_STORE_REDIS_URL=redis://redis:6379/5
  • for sentinel redis
    SCANNER_STORE_REDIS_URL=redis+sentinel://redis-cluster_sentinel_1:26379,redis-cluster_sentinel_2:26379,redis-cluster_sentinel_3:26379/mymaster/5

Is that OK?

Hi @bitsf . Yes, I think we can support such URL schema

from harbor-scanner-trivy.

hrist0stoichev avatar hrist0stoichev commented on June 14, 2024

I was trying to implement Redis Sentinel support for harbor-scanner-trivy for quite some time but there isn't a good library that can be readily used. harbor-scanner-trivy uses redigo, which itself doesn't provide Sentinel support. Sentinel is a library that is an extension to redigo for Sentinel support but it implements the protocol described here only partially. What I mean is that the library manages to identify the master and read from/write to it. In case of a failover, the new master is also identified properly. Yet, the library doesn't make use of the slaves. All queries are sent to the master (both read and write), as opposed to writing only to master and load balancing the read queries to the slaves.

from harbor-scanner-trivy.

danielpacak avatar danielpacak commented on June 14, 2024

I was trying to implement Redis Sentinel support for harbor-scanner-trivy for quite some time but there isn't a good library that can be readily used. harbor-scanner-trivy uses redigo, which itself doesn't provide Sentinel support. Sentinel is a library that is an extension to redigo for Sentinel support but it implements the protocol described here only partially. What I mean is that the library manages to identify the master and read from/write to it. In case of a failover, the new master is also identified properly. Yet, the library doesn't make use of the slaves. All queries are sent to the master (both read and write), as opposed to writing only to master and load balancing the read queries to the slaves.

That's great feedback @hrist0stoichev Do you happen to know if this one https://github.com/go-redis/redis has by any chance a better support for Sentinel?

from harbor-scanner-trivy.

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.