Skip to content

Commit

Permalink
fixes alertmanager config generation for user defined secret (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
f41gh7 authored Oct 28, 2021
1 parent 6ac3f29 commit 0f4368b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions controllers/factory/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,6 @@ var alertmanagerConfigMinimumVersion = version.Must(version.NewVersion("v0.22.0"
func createDefaultAMConfig(ctx context.Context, cr *victoriametricsv1beta1.VMAlertmanager, rclient client.Client, amVersion *version.Version) error {
cr = cr.DeepCopy()
l := log.WithValues("alertmanager", cr.Name)
// expect configuration secret to be pre created by user.
if cr.Spec.ConfigRawYaml == "" && cr.Spec.ConfigSecret != "" && cr.Spec.ConfigSelector == nil {
return nil
}

var alertmananagerConfig []byte
switch {
Expand Down

0 comments on commit 0f4368b

Please sign in to comment.