Skip to content

Commit

Permalink
Add all required const for archiver (#1323)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
Signed-off-by: sayedppqq <[email protected]>
Co-authored-by: sayedppqq <[email protected]>
  • Loading branch information
ArnobKumarSaha and sayedppqq authored Nov 8, 2024
1 parent 51975b8 commit 1777f43
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 9 deletions.
81 changes: 81 additions & 0 deletions apis/archiver/v1alpha1/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

const (
RepositorySuffixFull = "full"
RepositorySuffixManifest = "manifest"
SessionNameFull = "full-backup"
SessionNameManifest = "manifest-backup"

BackupConfigNameSuffix = "archiver"
SnapshotNameSuffix = "incremental-snapshot"
SidekickNameSuffix = "sidekick"
WalgContainerName = "wal-g"
RestoreSessionName = "manifest-restorer"

RestoreJobNameBinlog = "binlog-restorer"
RestoreJobNameOplog = "oplog-restorer"
RestoreJobNameWal = "wal-restorer"
RestoreCmdBinlogFetch = "binlog-fetch"
RestoreCmdOplogReplay = "oplog-replay"
RestoreCmdWalFetch = "wal-fetch"

BackupDirBinlog = "binlog-backup"
BackupDirOplog = "oplog-backup"
BackupDirWal = "wal-backup"
BackupCmdBinlogPush = "binlog-push"
BackupCmdOplogPush = "oplog-push"
BackupCmdWalPush = "wal-push"
)

// azure
const (
WALG_AZ_PREFIX = "WALG_AZ_PREFIX"
AZURE_STORAGE_ACCOUNT = "AZURE_STORAGE_ACCOUNT"
AZURE_STORAGE_ACCESS_KEY = "AZURE_STORAGE_ACCESS_KEY"
AZURE_ACCOUNT_KEY = "AZURE_ACCOUNT_KEY"
)

// s3
const (
WALG_S3_PREFIX = "WALG_S3_PREFIX"
AWS_ENDPOINT = "AWS_ENDPOINT"
AWS_REGION = "AWS_REGION"
AWS_S3_FORCE_PATH_STYLE = "AWS_S3_FORCE_PATH_STYLE"
WALG_S3_CA_CERT_FILE = "WALG_S3_CA_CERT_FILE"
CA_CERT_DATA = "CA_CERT_DATA"

S3CredVolumeName = "s3-cred"
S3CAMountPath = "/s3-cred/public.crt"
)

// gcs
const (
WALG_GS_PREFIX = "WALG_GS_PREFIX"
GOOGLE_APPLICATION_CREDENTIALS = "GOOGLE_APPLICATION_CREDENTIALS"

GoogleCredVolumeName = "google-cred"
GoogleCredMountPath = "/google-cred"
GoogleCredFileName = "GOOGLE_SERVICE_ACCOUNT_JSON_KEY"
)

// others
const (
WALG_FILE_PREFIX = "WALG_FILE_PREFIX"
OPLOG_PUSH_WAIT_FOR_BECOME_PRIMARY = "OPLOG_PUSH_WAIT_FOR_BECOME_PRIMARY"
)
19 changes: 10 additions & 9 deletions apis/kubedb/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1369,14 +1369,15 @@ const (
const (

// envs
EnvFerretDBUser = "FERRETDB_PG_USER"
EnvFerretDBPassword = "FERRETDB_PG_PASSWORD"
EnvFerretDBHandler = "FERRETDB_HANDLER"
EnvFerretDBPgURL = "FERRETDB_POSTGRESQL_URL"
EnvFerretDBTLSPort = "FERRETDB_LISTEN_TLS"
EnvFerretDBCAPath = "FERRETDB_LISTEN_TLS_CA_FILE"
EnvFerretDBCertPath = "FERRETDB_LISTEN_TLS_CERT_FILE"
EnvFerretDBKeyPath = "FERRETDB_LISTEN_TLS_KEY_FILE"
EnvFerretDBUser = "FERRETDB_PG_USER"
EnvFerretDBPassword = "FERRETDB_PG_PASSWORD"
EnvFerretDBHandler = "FERRETDB_HANDLER"
EnvFerretDBPgURL = "FERRETDB_POSTGRESQL_URL"
EnvFerretDBTLSPort = "FERRETDB_LISTEN_TLS"
EnvFerretDBCAPath = "FERRETDB_LISTEN_TLS_CA_FILE"
EnvFerretDBCertPath = "FERRETDB_LISTEN_TLS_CERT_FILE"
EnvFerretDBKeyPath = "FERRETDB_LISTEN_TLS_KEY_FILE"
EnvFerretDBDebugAddr = "FERRETDB_DEBUG_ADDR"

FerretDBContainerName = "ferretdb"
FerretDBMainImage = "ghcr.io/ferretdb/ferretdb"
Expand All @@ -1387,7 +1388,7 @@ const (
FerretDBExternalClientPath = "/etc/certs/ext"

FerretDBDefaultPort = 27017
FerretDBMetricsPort = 8080
FerretDBMetricsPort = 56790
FerretDBTLSPort = 27018

FerretDBMetricsPath = "/debug/metrics"
Expand Down

0 comments on commit 1777f43

Please sign in to comment.