Skip to content

Commit

Permalink
Merge branch 'main' into EVEREST-1647-ui-monthly-schedule-creates-an-…
Browse files Browse the repository at this point in the history
…invalid-configuration-for-psmdb
  • Loading branch information
dianabirs authored Jan 17, 2025
2 parents 6354d2b + 5baa3f2 commit 43b6f86
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/feature-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,22 @@ jobs:
printf "To install FB using helm:\n\
1. Download the 'helm' artifact below.\n\
2. Navigate to \`/everest/dev/fb directory\`.\n\
3. Run the command:\n\`\`\`VS_IMAGE=$VS_TAG HELM_PATH=<path_to_your_helmchart> sh helm.sh\`\`\`\n\
\nexample:\n\`\`\`VS_IMAGE=$VS_TAG HELM_PATH=/Users/oxana/Downloads/percona-helm-charts sh helm.sh\`\`\`\n" >> "$GITHUB_STEP_SUMMARY"
3. Run the command:\n\`\`\`VS_IMAGE=$VS_TAG HELM_PATH=<path_to_your_helmchart> bash helm.sh\`\`\`\n\
\nexample:\n\`\`\`VS_IMAGE=$VS_TAG HELM_PATH=/Users/oxana/Downloads/percona-helm-charts bash helm.sh\`\`\`\n" >> "$GITHUB_STEP_SUMMARY"
printf "____________________\n" >> "$GITHUB_STEP_SUMMARY"
printf "To install FB using CLI:\n\
1. Download the 'helm' artifact below.\n\
2. Download a CLI build from artifacts below.\n\
3. Navigate to \`/everest/dev/fb\` directory.\n\
4. Run the command:\n\`\`\`VS_IMAGE=$VS_TAG VERSION=$VERSION EVEREST_CTL_PATH=<path_to_everestctl> HELM_PATH=<path_to_your_helmchart> sh cli.sh\`\`\`\n\
\nexample:\n\`\`\`VS_IMAGE=$VS_TAG VERSION=$VERSION HELM_PATH=/Users/oxana/Downloads/percona-helm-charts EVEREST_CTL_PATH=/Users/oxana/Downloads/everestctl-darwin-arm64 sh cli.sh\`\`\`\n" >> "$GITHUB_STEP_SUMMARY"
4. Run the command:\n\`\`\`VS_IMAGE=$VS_TAG VERSION=$VERSION EVEREST_CTL_PATH=<path_to_everestctl> HELM_PATH=<path_to_your_helmchart> bash cli.sh\`\`\`\n\
\nexample:\n\`\`\`VS_IMAGE=$VS_TAG VERSION=$VERSION HELM_PATH=/Users/oxana/Downloads/percona-helm-charts EVEREST_CTL_PATH=/Users/oxana/Downloads/everestctl-darwin-arm64 bash cli.sh\`\`\`\n" >> "$GITHUB_STEP_SUMMARY"
printf "____________________\n" >> "$GITHUB_STEP_SUMMARY"
printf "To clean up the environment after a FB:\n\
1. Delete VS: \`kubectl delete deployment percona-version-service && kubectl delete svc percona-version-service\`\n\
2. Uninstall Everest using the FB everestctl build: \`<path_to_everestctl> uninstall --assume-yes --force\` \n" >> "$GITHUB_STEP_SUMMARY"
10 changes: 3 additions & 7 deletions commands/namespaces/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ var (
// NewAddCommand returns a new command to add a new namespace.
func NewAddCommand(l *zap.SugaredLogger) *cobra.Command {
cmd := &cobra.Command{
Use: "add",
Use: "add [flags] NAMESPACES",
Long: "Add a new namespace",
Short: "Add a new namespace",
Example: `everestctl namespaces add [NAMESPACE] [FLAGS]`,
Example: `everestctl namespaces add --operator.mongodb=true --operator.postgresql=false --operator.xtradb-cluster=false --skip-wizard ns-1,ns-2`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
initAddViperFlags(cmd)
c := &namespaces.NamespaceAddConfig{}
Expand All @@ -39,12 +40,7 @@ func NewAddCommand(l *zap.SugaredLogger) *cobra.Command {
}
bindInstallHelmOpts(c)

if len(args) != 1 {
output.PrintError(fmt.Errorf("invalid number of arguments: expected 1, got %d", len(args)), l, true)
os.Exit(1)
}
c.Namespaces = args[0]

enableLogging := viper.GetBool("verbose") || viper.GetBool("json")
c.Pretty = !enableLogging

Expand Down
9 changes: 4 additions & 5 deletions dev/fb/vs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ fi

curl https://raw.githubusercontent.com/Percona-Lab/percona-version-service/main/deploy.yaml > vs_deploy.yaml

# Determine the sed -i option based on the system
# use FB VS image in the VS configuration
if [[ "$(uname)" == "Darwin" ]]; then
sed_i_option="''"
sed -i '' "s/perconalab\/version-service:.*/perconalab\/version-service:$VS_IMAGE/g" vs_deploy.yaml
else
sed_i_option=""
sed -i "s/perconalab\/version-service:.*/perconalab\/version-service:$VS_IMAGE/g" vs_deploy.yaml
fi
# use FB VS image in the VS configuration
sed -i "$sed_i_option" "s/perconalab\/version-service:.*/perconalab\/version-service:$VS_IMAGE/g" vs_deploy.yaml


# deploy VS
kubectl apply -f vs_deploy.yaml > /dev/null
Expand Down

0 comments on commit 43b6f86

Please sign in to comment.