From 801f9e6e07f98dc4f81f6dbfc75259b4c17570ad Mon Sep 17 00:00:00 2001 From: Daniel Cleyrat Date: Mon, 10 Jun 2024 08:18:29 -0700 Subject: [PATCH] fix: update default namespace to ibm-software-central --- README.md | 12 ++++++------ cmd/datactl/app/sources/add/add_dataservice.go | 4 ++-- docs/datactl_sources_add_dataservice.md | 4 ++-- pkg/datactl/config/client_builder.go | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4acc954..95b028d 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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` @@ -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 ``` diff --git a/cmd/datactl/app/sources/add/add_dataservice.go b/cmd/datactl/app/sources/add/add_dataservice.go index 24b94c8..7b89c5a 100644 --- a/cmd/datactl/app/sources/add/add_dataservice.go +++ b/cmd/datactl/app/sources/add/add_dataservice.go @@ -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 diff --git a/docs/datactl_sources_add_dataservice.md b/docs/datactl_sources_add_dataservice.md index 800c4c1..1d2418f 100644 --- a/docs/datactl_sources_add_dataservice.md +++ b/docs/datactl_sources_add_dataservice.md @@ -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 diff --git a/pkg/datactl/config/client_builder.go b/pkg/datactl/config/client_builder.go index 1ae1821..6fc2fe6 100644 --- a/pkg/datactl/config/client_builder.go +++ b/pkg/datactl/config/client_builder.go @@ -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)