Changing credentials

A new random password is generated each time when the operator creates the ibm-license-service-reporter-credentials secret. You can change the default credentials with one of the following methods:

Note: If the secret is deleted, it is created again. The custom credentials are overwritten with the default passwords.

Changing credentials using the OpenShift console

  1. Log in to the OpenShift console of the cluster where you deployed License Service Reporter.
  2. Go to Workloads > Secrets.
  3. Set the project to All Projects.
  4. Find the ibm-license-service-reporter-credentials secret and select it.
  5. Select Actions > Edit Secret.
  6. Change the username or password based on your requirements and click Save.
  7. Wait for 15 minutes until the operator pod adapts the changes in the secret and restarts the License Service Reporter pod.
  8. Log in with the new credentials once the pod is created again.

Changing credentials using CLI

  1. Create a token.yml file with the following parameters. Update the namespace with the installation namespace of the License Service Reporter, and password and username with the credentials based on your requirements.

    kind: Secret
    apiVersion: v1
    metadata:
        name: ibm-license-service-reporter-credentials
        namespace: <NAMESPACE>
        labels:
            app.kubernetes.io/component: ibm-license-service-reporter-svc
            app.kubernetes.io/instance: ibm-license-service-reporter
            app.kubernetes.io/managed-by: operator
            app.kubernetes.io/name: ibm-license-service-reporter-instance
            release: ibm-license-service-reporter
    stringData:
        password: <PASSWORD>
        username: <USERNAME>
    type: kubernetes.io/basic-auth
    
  2. Apply the new credentials with the following command:

     kubectl apply -f credentials.yaml
    
  3. Wait for 15 minutes until the operator pod adapts the changes in the secret and restarts the License Service Reporter pod.

  4. Log in with the new credentials once the pod is created again.