diff --git a/config/rekor.yaml b/config/rekor.yaml index 53157f6aa..babfd3616 100644 --- a/config/rekor.yaml +++ b/config/rekor.yaml @@ -57,10 +57,14 @@ spec: "--trillian_log_server.tlog_id=3904496407287907110", "--log_type=prod", "--rekor_server.signer=$(KMS)", + "--trillian_log_server.sharding_config=/sharding/sharding-config.yaml", "--enable_attestation_storage=$(ENABLE_ATTESTATION_STORAGE)", "--attestation_storage_bucket=$(ATTESTATION_BUCKET)", "--rekor_server.timestamp_chain=$(TIMESTAMP_CHAIN)" ] + volumeMounts: + - name: sharding-config + mountPath: /sharding env: - name: KMS valueFrom: @@ -92,6 +96,10 @@ spec: capabilities: drop: - all + volumes: + - name: sharding-config + configMap: + name: sharding-config --- apiVersion: v1 kind: Service @@ -107,3 +115,11 @@ spec: port: 80 targetPort: 3000 --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sharding-config + namespace: rekor-system +data: + sharding-config.yaml: "" +--- diff --git a/pkg/sharding/ranges.go b/pkg/sharding/ranges.go index 91ff254a9..0bf771ad6 100644 --- a/pkg/sharding/ranges.go +++ b/pkg/sharding/ranges.go @@ -55,6 +55,10 @@ func NewLogRanges(path string, treeID uint) (LogRanges, error) { if err != nil { return LogRanges{}, err } + if string(contents) == "" { + log.Logger.Info("Sharding config file contents empty, skipping init of logRange map") + return LogRanges{}, nil + } if err := yaml.Unmarshal(contents, &ranges); err != nil { return LogRanges{}, err }