canonical / charmed-kubeflow-workflows

Repository that containes GitHub workflows and shareable configs for Charmed Kubeflow
0 stars 0 forks source link

`Apply terraform` job errors out due to duplicated model #66

Closed DnPlas closed 2 months ago

DnPlas commented 2 months ago

Bug Description

When the terraform-checks' Apply terraform runs without a model input, it fails with the following message:

ERROR cannot create model "testing": a namespace called "testing" already exists on this k8s cluster. Please pick a different model name.

This is caused by:

To Reproduce

Check the CI that fails, for example this

Environment

CI for Terraform

Relevant Log Output

Run juju add-model testing
  juju add-model testing
  shell: /usr/bin/bash -e {0}
  env:
    CONTROLLER_NAME: github-pr-103aa-microk8s
ERROR cannot create model "testing": a namespace called "testing" already exists on this k8s cluster. Please pick a different model name.
Error: Process completed with exit code 1.

Workaround

Define a model name different than testing when calling the wf:

  terraform-checks:
    name: Terraform
    uses: canonical/charmed-kubeflow-workflows/.github/workflows/terraform-checks.yaml@main
    with:
      charm-path: .
      model: kubeflow

Potential solution

Change the default model name of the terraform-apply workflow from testing to tf-testing

syncronize-issues-to-jira[bot] commented 2 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6286.

This message was autogenerated