Skip to content

Commit

Permalink
fix: update default namespace to ibm-software-central
Browse files Browse the repository at this point in the history
  • Loading branch information
dacleyra committed Jun 10, 2024
1 parent 6bc6e21 commit 801f9e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Datactl tool can be used standalone. Just move oc-datactl to your path and use `
4. Add the role-binding to the default service account on operator-namespace.

Install the ClusterRole and create the ClusterRoleBinding for the default service account for the namespace the IBM Metrics Operator's
DataService is installed to `by default: redhat-marketplace`. The datactl tool will use this service account by default.
DataService is installed to `by default: ibm-software-central`. The datactl tool will use this service account by default.

```sh
oc apply -f resources/service-account-role.yaml // file found in release
oc create clusterrolebinding rhm-files --clusterrole=rhm-files --serviceaccount=redhat-marketplace:default
oc create clusterrolebinding rhm-files --clusterrole=rhm-files --serviceaccount=ibm-software-central:default
```

5. Now you're configured. You can start using the export commands.
Expand All @@ -65,7 +65,7 @@ Recommended approach is to run the commands in this order:
// Must be logged in to the cluster

// Add the dataservice as a source, to which you are logged into with your current context
datactl sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=redhat-marketplace
datactl sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=ibm-software-central

// Pull the data from dataservice sources
oc datactl export pull --source-type=dataservice
Expand All @@ -79,11 +79,11 @@ oc datactl export commit
Let's break down what each one is doing.

`oc datactl sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=redhat-marketplace`
`oc datactl sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=ibm-software-central`

- Adds the default-context cluster's dataservice as a source for pulling
- Writes the source data-service-endpoint to `~/.datactl/config`
- The DataService to connect to is in the `redhat-marketplace` namespace
- The DataService to connect to is in the `ibm-software-central` namespace
`oc datactl export pull`
Expand Down Expand Up @@ -144,7 +144,7 @@ A containerized FIPS enabled version of datactl is provided, built with Red Hat'
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 sources add dataservice --insecure-skip-tls-verify=true --use-default-context --allow-self-signed=true --namespace=redhat-marketplace
quay.io/rh-marketplace/datactl:latest sources add dataservice --insecure-skip-tls-verify=true --use-default-context --allow-self-signed=true --namespace=ibm-software-central
```
4. Pull from the data source
```
Expand Down
4 changes: 2 additions & 2 deletions cmd/datactl/app/sources/add/add_dataservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ var (

configInitExample = templates.Examples(i18n.T(`
# Initialize the source, using the default context.
{{ .cmd }} sources add dataservice --use-default-context --namespace=redhat-marketplace
{{ .cmd }} sources add dataservice --use-default-context --namespace=ibm-software-central
# Initialize the source, using the default context and insecure self signed cert.
{{ .cmd }} sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=redhat-marketplace
{{ .cmd }} sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=ibm-software-central
# Initialize the config, prompting for a context to select.
{{ .cmd }} sources add dataservice
Expand Down
4 changes: 2 additions & 2 deletions docs/datactl_sources_add_dataservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ datactl sources add dataservice

```
# Initialize the source, using the default context.
datactl sources add dataservice --use-default-context --namespace=redhat-marketplace
datactl sources add dataservice --use-default-context --namespace=ibm-software-central
# Initialize the source, using the default context and insecure self signed cert.
datactl sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=redhat-marketplace
datactl sources add dataservice --use-default-context --insecure-skip-tls-verify=true --allow-self-signed=true --namespace=ibm-software-central
# Initialize the config, prompting for a context to select.
datactl sources add dataservice
Expand Down
2 changes: 1 addition & 1 deletion pkg/datactl/config/client_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (config *DirectClientConfig) DataServiceClientConfig(source api.Source) (*d
}

if dsConfig.Namespace == "" {
dsConfig.Namespace = "redhat-marketplace"
dsConfig.Namespace = "ibm-software-central"
}

sa := serviceaccount.NewServiceAccountClient(dsConfig.Namespace, client)
Expand Down

0 comments on commit 801f9e6

Please sign in to comment.