Skip to content

Commit

Permalink
Fix UnmarshalJSON to remove hcd field before doing double unmarshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Oct 22, 2024
1 parent fb9eb8c commit 74ec96d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions apis/config/v1beta1/imageconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (i *Images) UnmarshalJSON(b []byte) error {

delete(otherFields, CassandraImageComponent)
delete(otherFields, DSEImageComponent)
delete(otherFields, HCDImageComponent)
delete(otherFields, SystemLoggerImageComponent)
delete(otherFields, ConfigBuilderImageComponent)
delete(otherFields, ClientImageComponent)
Expand Down
3 changes: 2 additions & 1 deletion tests/testdata/image_config_parsing_more_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ images:
cassandra:
"4.0.0": "k8ssandra/cassandra-ubi:latest"
dse:
# How to detect between two different formats?
"6.8.999": "datastax/dse-server-prototype:latest"
hcd:
"1.0.0": "datastax/hcd:latest"
medusa: "k8ssandra/medusa:latest"
reaper: "k8ssandra/reaper:latest"
imageRegistry: "localhost:5000"
Expand Down

0 comments on commit 74ec96d

Please sign in to comment.