Skip to content

Commit

Permalink
fix: update endpoints to swc domain
Browse files Browse the repository at this point in the history
  • Loading branch information
dacleyra committed Apr 30, 2024
1 parent 22bfb7e commit 9ae33c4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Datactl tool can be used standalone. Just move oc-datactl to your path and use `

2. Log in to your cluster.

3. Setup your configuration. When prompted, provide the [pull secret token](https://marketplace.redhat.com/) as the `Upload API Secret`.
3. Setup your configuration. When prompted, provide the [pull secret token](https://swc.saas.ibm.com/) as the `Upload API Secret`.

```sh
oc datactl config init
Expand Down Expand Up @@ -132,12 +132,12 @@ A containerized FIPS enabled version of datactl is provided, built with Red Hat'
```
mkdir -p $HOME/.datactl
```
2. Setup your configuration, binding the `.datactl` and `.kube` directories, and providing the marketplace api endpoint and [pull secret token](https://marketplace.redhat.com/en-us/account/keys)
2. Setup your configuration, binding the `.datactl` and `.kube` directories, and providing the marketplace api endpoint and [pull secret token](https://swc.saas.ibm.com/)
```
docker run --rm \
--mount type=bind,source=$HOME/.datactl,target=/root/.datactl \
--mount type=bind,source=$HOME/.kube,target=/root/.kube \
quay.io/rh-marketplace/datactl:latest config init --api marketplace.redhat.com --token ${TOKEN}
quay.io/rh-marketplace/datactl:latest config init --api swc.saas.ibm.com --token ${TOKEN}
```
3. Add a data source, such as `dataservice` from your current OpenShift cluster context
```
Expand Down
4 changes: 2 additions & 2 deletions cmd/datactl/app/config/config_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var (
{{ .cmd }} config init
# Initialize the config and preset upload URL and secret. Will not prompt.
{{ .cmd }} config init --api marketplace.redhat.com --token MY_TOKEN
{{ .cmd }} config init --api swc.saas.ibm.com --token MY_TOKEN
`))
)

Expand Down Expand Up @@ -110,7 +110,7 @@ func (init *configInitOptions) runAPIEndpointPrompt() error {
prompt := promptui.Prompt{
Label: "Upload API Endpoint",
Validate: validate,
Default: "marketplace.redhat.com",
Default: "swc.saas.ibm.com",
Stdin: io.NopCloser(init.In),
Stdout: NopWCloser(init.Out),
}
Expand Down
2 changes: 1 addition & 1 deletion docs/datactl_config_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ datactl config init
datactl config init
# Initialize the config and preset upload URL and secret. Will not prompt.
datactl config init --api marketplace.redhat.com --token MY_TOKEN
datactl config init --api swc.saas.ibm.com --token MY_TOKEN
```

### Options
Expand Down
4 changes: 2 additions & 2 deletions pkg/datactl/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type UploadAPI struct {
// +k8s:conversion-gen=false
LocationOfOrigin string

// Host is the url of the marketplace i.e. marketplace.redhat.com
// Host is the url of the marketplace i.e. swc.saas.ibm.com
Host string `json:"host"`

// +optional
Expand Down Expand Up @@ -179,7 +179,7 @@ func NewConfig() *Config {
}

const (
marketplaceProductionUrl = "https://marketplace.redhat.come"
marketplaceProductionUrl = "https://swc.saas.ibm.com"
)

func NewDefaultConfig(kube *genericclioptions.ConfigFlags) (*Config, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/datactl/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (s *Source) String() string {
}

type UploadAPI struct {
// Host is the url of the marketplace i.e. marketplace.redhat.com
// Host is the url of the marketplace i.e. swc.saas.ibm.com
Host string `json:"host"`

// +optional
Expand Down

0 comments on commit 9ae33c4

Please sign in to comment.