Skip to content

HELP WANTED : Easy way to run Clair V4 in kubernetes and scan images #1276

Description

@efiegehen93

Description of Problem / Feature Request

Hey guys, is there an easy way to run Clair v4 in k8s, justo clair in combo mode, postgres DB and clairctl.
Not able to find a good tutorial, i'm using this docker image : quay.io/coreos/clair:v4.1.0

The following config.yaml

introspection_addr: localhost:8089
http_listen_addr: localhost:8080
log_level: debug
indexer:
  connstring: 'postgresql://postgres:postgres@clairv4-postgres/clair'
  scanlock_retry: 10
  layer_scan_concurrency: 5
  migrations: true
matcher:
  indexer_addr: "localhost:8080"
  connstring: 'postgresql://postgres:postgres@clairv4-postgres/clair'
  max_conn_pool: 100
  run: ""
  migrations: true
  updater_sets:
  - "alpine"
  - "aws"
  - "debian"
  - "oracle"
  - "photon"
  - "pyupio"
  - "rhel"
  - "suse"
  - "ubuntu"
notifier:
  indexer_addr: http://clairv4/
  matcher_addr: http://clairv4/
  connstring: 'postgresql://postgres:postgres@clairv4-postgres/clair'
  migrations: true
  delivery_interval: 1m
  poll_interval: 5m
trace:
  name: "jaeger"
  probability: 1
  jaeger:
    agent:
      endpoint: "localhost:6831"
    service_name: "clairv4"
metrics:
  name: "prometheus"

Andi'm trying also to install into a golang image, clairctl with :
GO111MODULE=on go get github.com/quay/clair/v4/cmd/clairctl@latest

But it doesn't work.....

Getting some errors also in clair logs :

{"level":"error","component":"libvuln/updates/Manager.Start","error":"updating errors:\nRHEL8-rhvh-4: unexpected EOF\nRHEL6-satellite-6.2: bzip2 data invalid: bad magic value in continuation file\nRHEL6-satellite-5.8: bzip2 data invalid: bad magic value in continuation file\n","time":"2021-05-31T22:39:17Z","message":"errors encountered during updater run"}
{"level":"error","component":"notifier/keymanager/Manager.loop","time":"2021-05-31T22:45:14Z","message":"received error when bumping public key expiration"}

I know that clair V2 has a healthcheck but does V4 also got one ?
What is the easy way to install clairctl for V4 and run a report ?

Expected Outcome

Run Clair V4 in k8s easy mode

Actual Outcome

None

Environment

  • Clair version/image: quay.io/coreos/clair:v4.1.0
  • Clair client name/version: quay.io/coreos/clair:v4.1.0
  • Host OS: quay.io/coreos/clair:v4.1.0
  • Kernel (e.g. uname -a): quay.io/coreos/clair:v4.1.0
  • Kubernetes version (use kubectl version): Client Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.4-dirty", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"dirty", BuildDate:"2021-03-15T10:03:32Z", GoVersion:"go1.16.2", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
  • Network/Firewall setup:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions