Skip to content

Commit

Permalink
Merge pull request #14 from edenlabllc/feature/RMK-12-rmk-cluster-swi…
Browse files Browse the repository at this point in the history
…tch-k8s-context-selection-logic-should-be-more-strict
  • Loading branch information
anovikov-el authored Jun 20, 2024
2 parents 802f98e + ea6da36 commit 74d39c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions commands/download_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (s *SpecDownload) download(silent bool) error {
}

if !silent {
zap.S().Infof("starting download package: %s", s.PkgName)
zap.S().Infof("starting package download: %s", s.PkgName)
}

return s.downloadErrorHandler(
Expand Down Expand Up @@ -816,7 +816,7 @@ func rmkURLFormation(paths ...string) string {
}

func updateRMK(pkgName, version string, silent, progressBar bool, ctx *cli.Context) error {
zap.S().Infof("starting download package: %s", pkgName)
zap.S().Infof("starting package download: %s", pkgName)
pkgDst := system.GetHomePath(filepath.Join(".local", system.ToolsBinDir))
if err := go_getter.DownloadArtifact(
rmkURLFormation(system.RMKBin, version, pkgName),
Expand Down
16 changes: 13 additions & 3 deletions docs/configuration/cluster-management/cluster-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,31 @@ Switching to an existing Kubernetes cluster depends on how it has been provision
Create a context with the name matching the pattern:

```
^<project_name>-<environment>\b
\b<project_name>-<environment>\b
```

> The matching is **case-insensitive**. \
> `^` means the **beginning** of text or a line. \
> `\b` means the **ASCII word boundary** (`\w` on one side and `\W`, `\A`, or `\z` on the other).
For example, if you are in the `project1` repository in the `develop` branch, the following Kubernetes contexts might be accepted:
For example, if you are in the `project1` repository in the `develop` branch, any of the following Kubernetes contexts will be accepted:

```
project1-develop
Project1-Develop
PROJECT1-DEVELOP
project1-develop-cluster
Project1-Develop-Cluster
PROJECT1-DEVELOP-CLUSTER
k3d-project1-develop
arn:aws:eks:us-east-1:123456789000:cluster/PROJECT1-DEVELOP-CLUSTER
```

> If there are **more than one** Kubernetes context which match the regular expression **simultaneously**,
> an **error** will be thrown indicating a conflict. For example, the following names will conflict:
> ```shell
> project1-develop
> k3d-project1-develop
> ```
* **Using RMK cluster provider**:
Expand Down

0 comments on commit 74d39c9

Please sign in to comment.