Skip to content

Commit

Permalink
Use apply: Always for restart command (#725)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Oct 3, 2023
1 parent f9be578 commit ceb2bda
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/restarter/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (e *ElasticsearchRestarter) Restart(name, namespace string) (string, error)
Name: name,
},
Restart: &v1alpha1.RestartSpec{},
Apply: v1alpha1.ApplyOptionAlways,
},
}
_, err = e.opsClient.ElasticsearchOpsRequests(namespace).Create(context.TODO(), restartOpsRequest, metav1.CreateOptions{})
Expand Down
1 change: 1 addition & 0 deletions pkg/restarter/mariadb.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (e *MariaDBRestarter) Restart(name, namespace string) (string, error) {
Name: name,
},
Restart: &v1alpha1.RestartSpec{},
Apply: v1alpha1.ApplyOptionAlways,
},
}
_, err = e.opsClient.MariaDBOpsRequests(namespace).Create(context.TODO(), restartOpsRequest, metav1.CreateOptions{})
Expand Down
1 change: 1 addition & 0 deletions pkg/restarter/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (e *MongoDBRestarter) Restart(name, namespace string) (string, error) {
Name: name,
},
Restart: &v1alpha1.RestartSpec{},
Apply: v1alpha1.ApplyOptionAlways,
},
}
_, err = e.opsClient.MongoDBOpsRequests(namespace).Create(context.TODO(), restartOpsRequest, metav1.CreateOptions{})
Expand Down
1 change: 1 addition & 0 deletions pkg/restarter/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (e *MySQLRestarter) Restart(name, namespace string) (string, error) {
Name: name,
},
Restart: &v1alpha1.RestartSpec{},
Apply: v1alpha1.ApplyOptionAlways,
},
}
_, err = e.opsClient.MySQLOpsRequests(namespace).Create(context.TODO(), restartOpsRequest, metav1.CreateOptions{})
Expand Down
1 change: 1 addition & 0 deletions pkg/restarter/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (e *PostgresRestarter) Restart(name, namespace string) (string, error) {
Name: name,
},
Restart: &v1alpha1.RestartSpec{},
Apply: v1alpha1.ApplyOptionAlways,
},
}
_, err = e.opsClient.PostgresOpsRequests(namespace).Create(context.TODO(), restartOpsRequest, metav1.CreateOptions{})
Expand Down
1 change: 1 addition & 0 deletions pkg/restarter/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (e *RedisRestarter) Restart(name, namespace string) (string, error) {
Name: name,
},
Restart: &v1alpha1.RestartSpec{},
Apply: v1alpha1.ApplyOptionAlways,
},
}
_, err = e.opsClient.RedisOpsRequests(namespace).Create(context.TODO(), restartOpsRequest, metav1.CreateOptions{})
Expand Down

0 comments on commit ceb2bda

Please sign in to comment.