Skip to content

Commit

Permalink
Use OffshootLabels while listing pods (#728)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha authored Oct 17, 2023
1 parent da20a30 commit 033afa7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/debug/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (opts *elasticsearchOpts) collectOperatorLogs() error {
}

func (opts *elasticsearchOpts) collectForAllDBPods() error {
dbLabels := labels.SelectorFromSet(opts.db.GetLabels()).String()
dbLabels := labels.SelectorFromSet(opts.db.OffshootLabels()).String()
pods, err := opts.podClient.CoreV1().Pods(opts.db.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: dbLabels,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/debug/mariadb.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (opts *mariadbOpts) collectOperatorLogs() error {
}

func (opts *mariadbOpts) collectForAllDBPods() error {
dbLabels := labels.SelectorFromSet(opts.db.GetLabels()).String()
dbLabels := labels.SelectorFromSet(opts.db.OffshootLabels()).String()
pods, err := opts.podClient.CoreV1().Pods(opts.db.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: dbLabels,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/debug/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (opts *mongodbOpts) collectOperatorLogs() error {
}

func (opts *mongodbOpts) collectForAllDBPods() error {
dbLabels := labels.SelectorFromSet(opts.db.GetLabels()).String()
dbLabels := labels.SelectorFromSet(opts.db.OffshootLabels()).String()
pods, err := opts.podClient.CoreV1().Pods(opts.db.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: dbLabels,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/debug/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (opts *mysqlOpts) collectOperatorLogs() error {
}

func (opts *mysqlOpts) collectForAllDBPods() error {
dbLabels := labels.SelectorFromSet(opts.db.GetLabels()).String()
dbLabels := labels.SelectorFromSet(opts.db.OffshootLabels()).String()
pods, err := opts.podClient.CoreV1().Pods(opts.db.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: dbLabels,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/debug/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (opts *postgresOpts) collectOperatorLogs() error {
}

func (opts *postgresOpts) collectForAllDBPods() error {
dbLabels := labels.SelectorFromSet(opts.db.GetLabels()).String()
dbLabels := labels.SelectorFromSet(opts.db.OffshootLabels()).String()
pods, err := opts.podClient.CoreV1().Pods(opts.db.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: dbLabels,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/debug/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (opts *redisOpts) collectOperatorLogs() error {
}

func (opts *redisOpts) collectForAllDBPods() error {
dbLabels := labels.SelectorFromSet(opts.db.GetLabels()).String()
dbLabels := labels.SelectorFromSet(opts.db.OffshootLabels()).String()
pods, err := opts.podClient.CoreV1().Pods(opts.db.Namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: dbLabels,
})
Expand Down

0 comments on commit 033afa7

Please sign in to comment.