Skip to content

Commit

Permalink
Add in configmap to release for sharding config (#766)
Browse files Browse the repository at this point in the history
Signed-off-by: Priya Wadhwa <[email protected]>
  • Loading branch information
priyawadhwa authored Apr 11, 2022
1 parent 72add53 commit 1727fae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions config/rekor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -92,6 +96,10 @@ spec:
capabilities:
drop:
- all
volumes:
- name: sharding-config
configMap:
name: sharding-config
---
apiVersion: v1
kind: Service
Expand All @@ -107,3 +115,11 @@ spec:
port: 80
targetPort: 3000
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sharding-config
namespace: rekor-system
data:
sharding-config.yaml: ""
---
4 changes: 4 additions & 0 deletions pkg/sharding/ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1727fae

Please sign in to comment.