diff --git a/app/controlplane/pkg/auditor/nats.go b/app/controlplane/pkg/auditor/nats.go index 67f776f76..e32480997 100644 --- a/app/controlplane/pkg/auditor/nats.go +++ b/app/controlplane/pkg/auditor/nats.go @@ -71,11 +71,12 @@ func (p *AuditLogPublisher) initJetStream() error { if _, err := js.CreateOrUpdateStream(ctx, jetstream.StreamConfig{ Name: streamName, Subjects: []string{subjectName}, + Replicas: p.rc.Replicas, }); err != nil { return fmt.Errorf("creating stream: %w", err) } - p.logger.Infow("msg", "stream created or updated", "name", streamName, "subject", subjectName) + p.logger.Infow("msg", "stream created or updated", "name", streamName, "subject", subjectName, "replicas", p.rc.Replicas) return nil } diff --git a/pkg/cache/attestationbundle/attestationbundle.go b/pkg/cache/attestationbundle/attestationbundle.go index b339f67cd..7ee8d6cdc 100644 --- a/pkg/cache/attestationbundle/attestationbundle.go +++ b/pkg/cache/attestationbundle/attestationbundle.go @@ -26,8 +26,8 @@ import ( ) const ( - ttl = 5 * 24 * time.Hour - maxBytes = 100 * 1024 * 1024 // 100 MB + ttl = 48 * time.Hour + maxBytes = 200 * 1024 * 1024 // 200 MB bucket = "chainloop-attestation-bundles" description = "Cache for attestation bundles" ) diff --git a/pkg/cache/natskv.go b/pkg/cache/natskv.go index a0e8fd163..e70c3cc31 100644 --- a/pkg/cache/natskv.go +++ b/pkg/cache/natskv.go @@ -52,7 +52,7 @@ func newNATSKV[T any](cfg *config) (*natsKVCache[T], error) { go c.watchReconnect(cfg.reconnCh) } - cfg.logger.Infow("msg", "cache: using NATS KV backend", "bucket", cfg.bucketName, "ttl", cfg.ttl) + cfg.logger.Infow("msg", "cache: using NATS KV backend", "bucket", cfg.bucketName, "ttl", cfg.ttl, "replicas", cfg.replicas) return c, nil }