-
Notifications
You must be signed in to change notification settings - Fork 183
K8SPSMDB-1608: add externaldns annotation to create dns for created loadbalancer #2280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
c613276
f22a115
90546a3
efb7c81
f991502
ee194e4
19a85b2
ff70a0b
abd5cfa
32387a8
97fe53d
4f3054f
cb82fb8
3112f13
5c4a043
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ import ( | |
| k8serrors "k8s.io/apimachinery/pkg/api/errors" | ||
| "k8s.io/apimachinery/pkg/labels" | ||
| "sigs.k8s.io/controller-runtime/pkg/client" | ||
| logf "sigs.k8s.io/controller-runtime/pkg/log" | ||
|
|
||
| api "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" | ||
| "github.com/percona/percona-server-mongodb-operator/pkg/mcs" | ||
|
|
@@ -28,7 +29,13 @@ func (r *ReconcilePerconaServerMongoDB) reconcileServices(ctx context.Context, c | |
| } | ||
|
|
||
| func (r *ReconcilePerconaServerMongoDB) reconcileReplsetServices(ctx context.Context, cr *api.PerconaServerMongoDB, repls []*api.ReplsetSpec) error { | ||
| log := logf.FromContext(ctx) | ||
|
|
||
| for _, rs := range repls { | ||
| if rs.Expose.ExternalDNS != nil && !rs.Expose.Enabled { | ||
| log.Info("externalDNS is configured but expose is not enabled, skipping DNS annotations", "replset", rs.Name) | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this get logged on every reconciliation?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mayankshah1607 Let me change it back to just silently skip when expose is disabled.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the logging parts. |
||
|
|
||
| // Create headless service | ||
| service := psmdb.Service(cr, rs) | ||
| if err := setControllerReference(cr, service, r.scheme); err != nil { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.