Skip to content

Commit

Permalink
Bug kube-logging#1616: Ensured that the custom PVC source details spe…
Browse files Browse the repository at this point in the history
…cified in the fluentd.extraVolumes.volume.pvc.source.claimName of the fluentd definition are honoured, instead of always attempting to create a new PVC.

Signed-off-by: Bhaskar Reddy Byreddy <[email protected]>
  • Loading branch information
bbyreddy committed Dec 14, 2023
1 parent 7b5e23a commit d9700df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/resources/fluentd/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ func (r *Reconciler) statefulset() (runtime.Object, reconciler.DesiredState, err
}

func isPersistentVolumeClaimSpecEmpty(pvcSpec corev1.PersistentVolumeClaimSpec) bool {
searilizedPvcSpec, _ := json.Marshal(pvcSpec)
searilizedPvcSpec, _ := json.Marshal(pvcSpec) // Json serialization should not fail, hence the error is ignored
return string(searilizedPvcSpec) == `{"resources":{}}`
}

func isPersistentVolumeSourceEmpty(pvcSource corev1.PersistentVolumeClaimVolumeSource) bool {
searilizedPvcSource, _ := json.Marshal(pvcSource)
searilizedPvcSource, _ := json.Marshal(pvcSource) // Json serialization should not fail, hence the error is ignored
return string(searilizedPvcSource) == `{}`
}

Expand Down

0 comments on commit d9700df

Please sign in to comment.