Skip to content

Commit

Permalink
PMM-13132 Add command to makefile, lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka committed Sep 19, 2024
1 parent ec82c91 commit b13abe8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ TARGET ?= _bash
env: ## Run `make TARGET` in devcontainer (`make env TARGET=help`); TARGET defaults to bash
COMPOSE_PROFILES=$(PROFILES) \
docker exec -it --workdir=/root/go/src/github.com/percona/pmm pmm-server make $(TARGET)

rotate-encryption: ## Rotate encryption key
go run ./encryption-rotation/main.go
1 change: 1 addition & 0 deletions managed/models/encryption_rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/percona/pmm/managed/utils/encryption"
)

// RotateEncryptionKey will stop PMM server, decrypt data, create new encryption key and encrypt them and start PMM Server again.
func RotateEncryptionKey(sqlDB *sql.DB, dbName string) int {
db := reform.NewDB(sqlDB, postgresql.Dialect, nil)

Expand Down
1 change: 1 addition & 0 deletions managed/models/encryption_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

//nolint:dupl
package models_test

import (
Expand Down

0 comments on commit b13abe8

Please sign in to comment.