mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-28 14:34:34 +08:00
conf/config-dev.yaml mirrored the production default, so a local run had no builder entry in the menu and no way to create builds without editing the file. Enable it there: the development config is the one used when running against a local builder. Verification: - helm/conf not affected; loaded by `go run . server -c conf/config-dev.yaml`
217 lines
6.1 KiB
YAML
217 lines
6.1 KiB
YAML
# this file used for local development.
|
|
|
|
log:
|
|
level: debug
|
|
proxyLevel: info
|
|
|
|
database:
|
|
# The database type to use. Supported types are: sqlite3, turso, mysql, postgresql
|
|
type: turso
|
|
sqlite3:
|
|
path: sigma.db
|
|
turso:
|
|
dsn: sigma-turso.db
|
|
mysql:
|
|
host: localhost
|
|
port: 3306
|
|
username: sigma
|
|
password: sigma
|
|
database: sigma
|
|
postgresql:
|
|
host: localhost
|
|
port: 5432
|
|
username: sigma
|
|
password: sigma
|
|
database: sigma
|
|
sslMode: disable
|
|
|
|
redis:
|
|
# redis type available: none, external. Following all of redis config just use reference here.
|
|
# none: means never use redis
|
|
# external: means use the specific redis instance
|
|
type: external
|
|
url: redis://:sigma@localhost:6379/0
|
|
|
|
cache:
|
|
# the cache type available is: redis, inmemory
|
|
# please attention in multi-node mode, you should use redis
|
|
type: inmemory
|
|
# cache key prefix
|
|
prefix: sigma-cache
|
|
inmemory:
|
|
size: 10240
|
|
redis:
|
|
ttl: 72h
|
|
|
|
workqueue:
|
|
# the workqueue type available: redis, database, inmemory
|
|
type: inmemory
|
|
redis:
|
|
concurrency: 10
|
|
# reject new messages when redis queue backlog reaches this value; 0 means unlimited
|
|
maxBacklog: 0
|
|
database: {}
|
|
inmemory:
|
|
concurrency: 1024
|
|
maxBacklog: 1000
|
|
|
|
locker:
|
|
# the locker type available: redis, inmemory
|
|
type: inmemory
|
|
prefix: sigma-locker
|
|
inmemory: {}
|
|
redis: {}
|
|
|
|
namespace:
|
|
# push image to registry, if namespace not exist, it will be created automatically
|
|
autoCreate: true
|
|
# the automatic created namespace visibility, available: public, private
|
|
visibility: public
|
|
# namespaces created at startup; each entry is created when missing,
|
|
# and each entry may set its own visibility (public or private)
|
|
initialize:
|
|
- name: library
|
|
visibility: public
|
|
|
|
http:
|
|
# endpoint can be a domain or domain with port, eg: http://sigma.test.io, https://sigma.test.io:30080, http://127.0.0.1:3000
|
|
# this endpoint will be used to generate the token service url in auth middleware,
|
|
# you can leave it blank and it will use http://127.0.0.1:3000 as internal domain by default,
|
|
# because the front page need show this endpoint.
|
|
endpoint:
|
|
# in some cases, daemon may pull image and scan it, but we don't want to pull image from public registry domain,
|
|
# so use this internal domain to pull image from registry.
|
|
# you can leave it blank and it will use http://127.0.0.1:3000 as internal domain by default.
|
|
# in k8s cluster, it will be set to the distribution service which is used to pull image from registry, eg: http://registry.default.svc.cluster.local:3000
|
|
# in docker-compose, it will be set to the registry service which is used to pull image from registry, eg: http://registry:3000
|
|
# if http.tls.enabled is true, internalEndpoint should start with https://
|
|
# eg: http://sigma.test.io, http://sigma.test.io:3000, https://sigma.test.io:30080
|
|
internalEndpoint: http://127.0.0.1:3000
|
|
# eg: http://sigma-distribution:3000
|
|
internalDistributionEndpoint:
|
|
timeout:
|
|
readHeader: 30s
|
|
# read and write cover full push/pull transfers; increase them for very large images or slow links
|
|
read: 1h
|
|
write: 1h
|
|
idle: 2m
|
|
bodyLimit:
|
|
# request body size limits in bytes; 0 disables the limit for that route class
|
|
enabled: true
|
|
# default applies to regular API requests
|
|
default: 10485760
|
|
# manifest applies to PUT /v2/<name>/manifests/<reference>
|
|
manifest: 104857600
|
|
# blob applies to /v2/<name>/blobs/uploads requests; increase for large image pushes
|
|
blob: 10737418240
|
|
tls:
|
|
enabled: false
|
|
certificate: ./conf/sigma.test.io.crt
|
|
key: ./conf/sigma.test.io.key
|
|
|
|
storage:
|
|
rootdirectory: ./storage
|
|
redirect: true
|
|
type: s3
|
|
filesystem:
|
|
path: /var/lib/sigma/oci/
|
|
s3:
|
|
ak: sigma
|
|
sk: sigma-sigma
|
|
endpoint: http://127.0.0.1:9000
|
|
region: cn-north-1
|
|
bucket: sigma
|
|
forcePathStyle: true
|
|
operateObjectWithoutMD5: true
|
|
checksumValidation: when_required
|
|
cos:
|
|
ak: sigma
|
|
sk: sigma-sigma
|
|
endpoint: https://hack-1251887554.cos.na-toronto.myqcloud.com
|
|
oss:
|
|
ak: sigma
|
|
sk: sigma-sigma
|
|
endpoint: http://127.0.0.1:9000
|
|
forcePathStyle: true
|
|
|
|
# Notice: the tag never update after the first pulled from remote registry, unless you delete the image and pull again.
|
|
proxy:
|
|
enabled: false
|
|
endpoint: https://registry-1.docker.io
|
|
tlsVerify: true
|
|
username: ""
|
|
password: ""
|
|
|
|
# daemon task config
|
|
daemon:
|
|
builder:
|
|
enabled: true
|
|
image: docker.io/tosone/sigma-builder:latest
|
|
type: docker
|
|
tlsVerify: true
|
|
docker:
|
|
sock:
|
|
network: sigma
|
|
kubernetes:
|
|
kubeconfig:
|
|
namespace: sigma-builder
|
|
podman:
|
|
uri: unix:///run/podman/podman.sock
|
|
vulnerability:
|
|
staleTimeout: 6h
|
|
grype:
|
|
dbCacheDir: ""
|
|
|
|
auth:
|
|
anonymous:
|
|
enabled: true
|
|
admin:
|
|
username: sigma
|
|
password: Admin@123
|
|
email: sigma@sigma.io
|
|
token:
|
|
realm: ""
|
|
service: ""
|
|
jwt:
|
|
ttl: 6h
|
|
refreshTTL: 72h
|
|
# generate the key with: openssl genpkey -algorithm ED25519 | base64
|
|
privateKey: "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1DNENBUUF3QlFZREsyVndCQ0lFSUFZY0NvYldvT2V2dnNjOWRlcStab1JFS2lyWW52MW1MRUFpZzlySDNmOHMKLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo="
|
|
oauth2:
|
|
github:
|
|
enabled: true
|
|
clientId: "e5f9fa9e372dfac66aed"
|
|
clientSecret: "49ab83f4d0665f8579516f7a3f2f753a6a57189b"
|
|
gitlab:
|
|
enabled: true
|
|
clientId: "4df6efcf8c319efb73e8116c72d881c559ccaf822096220a13cee3047b05ed70"
|
|
clientSecret: "94ceddf22fc1560f33caec6be32c9c61a91719bd2df3b5127ccd43187192f95b"
|
|
loginRateLimit:
|
|
enabled: true
|
|
maxFailures: 5
|
|
window: 5m
|
|
delay: 1s
|
|
|
|
audit:
|
|
enabled: true
|
|
recordListGet: false
|
|
cleanup:
|
|
softDeleteAfterMonths: 3
|
|
hardDeleteAfterMonths: 6
|
|
interval: 168h
|
|
batchSize: 1000
|
|
|
|
trace:
|
|
# enable OpenTelemetry tracing; disabled by default
|
|
enabled: false
|
|
# OTLP collector endpoint (e.g. "localhost:4317" for gRPC, "localhost:4318" for HTTP)
|
|
endpoint: ""
|
|
# otlp transport: "grpc" or "http"
|
|
protocol: grpc
|
|
# disable TLS when the collector is reached over plaintext
|
|
insecure: true
|
|
# sample ratio in [0, 1]; root spans are sampled at this ratio
|
|
sampleRatio: 1.0
|
|
# service name reported to the tracer
|
|
serviceName: sigma
|