Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: namespace def. #67

Merged
merged 3 commits into from
Jan 28, 2025
Merged

feat: namespace def. #67

merged 3 commits into from
Jan 28, 2025

Conversation

mulmuri
Copy link
Member

@mulmuri mulmuri commented Jan 28, 2025

No description provided.

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
module.istio.data.kubernetes_service.istio_ingressgateway: Reading...
module.istio.data.kubernetes_service.istio_ingressgateway: Read complete after 0s [id=istio-system/istio-ingressgateway]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # module.namespace.kubernetes_namespace.argocd will be created
+ resource "kubernetes_namespace" "argocd" {
      + id                               = (known after apply)
      + wait_for_default_service_account = false

      + metadata {
          + generation       = (known after apply)
          + name             = "argocd"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

  # module.namespace.kubernetes_namespace.cert_manager will be created
+ resource "kubernetes_namespace" "cert_manager" {
      + id                               = (known after apply)
      + wait_for_default_service_account = false

      + metadata {
          + generation       = (known after apply)
          + name             = "cert-manager"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

  # module.namespace.kubernetes_namespace.harbor will be created
+ resource "kubernetes_namespace" "harbor" {
      + id                               = (known after apply)
      + wait_for_default_service_account = false

      + metadata {
          + generation       = (known after apply)
          + name             = "harbor"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

Plan: 3 to add, 0 to change, 0 to destroy.

  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 3 to add, 0 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@mulmuri
Copy link
Member Author

mulmuri commented Jan 28, 2025

terraform apply

@goboolean-io
Copy link
Contributor

Did you mean to use atlantis instead of terraform?

@mulmuri
Copy link
Member Author

mulmuri commented Jan 28, 2025

atlantis apply

@goboolean-io
Copy link
Contributor

Ran Apply for dir: projects/dev workspace: default

Apply Error

Show Output
running "/usr/bin/terraform apply -input=false \"/root/.atlantis/repos/goboolean/infrastructure/67/default/projects/dev/default.tfplan\"" in "/root/.atlantis/repos/goboolean/infrastructure/67/default/projects/dev": exit status 1
module.namespace.kubernetes_namespace.harbor: Creating...
module.namespace.kubernetes_namespace.argocd: Creating...
module.namespace.kubernetes_namespace.cert_manager: Creating...
module.namespace.kubernetes_namespace.argocd: Creation complete after 1s [id=argocd]
module.namespace.kubernetes_namespace.cert_manager: Creation complete after 1s [id=cert-manager]
╷
│ Error: namespaces "harbor" already exists
│ 
│   with module.namespace.kubernetes_namespace.harbor,
│   on ../../modules/gcp/gke/namespace/main.tf line 13, in resource "kubernetes_namespace" "harbor":
│   13: resource "kubernetes_namespace" "harbor" {
│ 
╵

@mulmuri
Copy link
Member Author

mulmuri commented Jan 28, 2025

atlantis plan

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
module.istio.data.kubernetes_service.istio_ingressgateway: Reading...
module.istio.data.kubernetes_service.istio_ingressgateway: Read complete after 0s [id=istio-system/istio-ingressgateway]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place

Terraform will perform the following actions:

  # module.namespace.kubernetes_namespace.harbor will be updated in-place
~ resource "kubernetes_namespace" "harbor" {
        id                               = "harbor"
      + wait_for_default_service_account = false

      ~ metadata {
          ~ labels           = {
              - "name" = "harbor" -> null
            }
            name             = "harbor"
            # (5 unchanged attributes hidden)
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.

  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 0 to add, 1 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
module.istio.data.kubernetes_service.istio_ingressgateway: Reading...
module.istio.data.kubernetes_service.istio_ingressgateway: Read complete after 0s [id=istio-system/istio-ingressgateway]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place

Terraform will perform the following actions:

  # module.namespace.kubernetes_namespace.argocd will be updated in-place
~ resource "kubernetes_namespace" "argocd" {
        id                               = "argocd"
        # (1 unchanged attribute hidden)

      ~ metadata {
          ~ labels           = {
              + "name" = "argocd"
            }
            name             = "argocd"
            # (5 unchanged attributes hidden)
        }
    }

  # module.namespace.kubernetes_namespace.cert_manager will be updated in-place
~ resource "kubernetes_namespace" "cert_manager" {
        id                               = "cert-manager"
        # (1 unchanged attribute hidden)

      ~ metadata {
          ~ labels           = {
              + "name" = "cert-manager"
            }
            name             = "cert-manager"
            # (5 unchanged attributes hidden)
        }
    }

Plan: 0 to add, 2 to change, 0 to destroy.

  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 0 to add, 2 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@mulmuri mulmuri merged commit 3b674e6 into main Jan 28, 2025
0 of 2 checks passed
@goboolean-io
Copy link
Contributor

Locks and plans deleted for the projects and workspaces modified in this pull request:

  • dir: projects/dev workspace: default

@mulmuri mulmuri deleted the feat/namespace branch January 28, 2025 08:38
@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Plan Error

Show Output
running "/usr/bin/terraform init -input=false -upgrade" in "/root/.atlantis/repos/goboolean/infrastructure/67/default/projects/dev": exit status 1
Initializing the backend...

Successfully configured the backend "gcs"! Terraform will automatically
use this backend unless the backend configuration changes.
Upgrading modules...
- acme in ../../modules/acme
- cloudflare in ../../modules/cloudflare
- gce in ../../modules/gcp/gce
- gcs in ../../modules/gcp/gcs
- gke in ../../modules/gcp/gke
- harbor in ../../modules/infra/harbor
- iam in ../../modules/gcp/iam
- istio in ../../modules/infra/istio
- namespace in ../../modules/gcp/gke/namespace
- service in ../../modules/gcp/service
Initializing provider plugins...
- Finding latest version of hashicorp/helm...
- Finding latest version of hashicorp/tls...
- Finding cloudflare/cloudflare versions matching "~> 4.0, 5.0.0-rc1"...
- Finding vancluever/acme versions matching "2.29.0"...
- Finding hashicorp/google versions matching "4.84.0"...
- Finding latest version of hashicorp/kubernetes...
- Installing hashicorp/helm v2.17.0...
- Installed hashicorp/helm v2.17.0 (signed by HashiCorp)
- Installing hashicorp/tls v4.0.6...
- Installed hashicorp/tls v4.0.6 (signed by HashiCorp)
- Installing cloudflare/cloudflare v5.0.0-rc1...
- Installing vancluever/acme v2.29.0...
- Installing hashicorp/google v4.84.0...
- Installing hashicorp/kubernetes v2.35.1...
╷
│ Error: Failed to install provider
│ 
│ Error while installing cloudflare/cloudflare v5.0.0-rc1: failed to make
│ target path
│ .terraform/providers/registry.terraform.io/cloudflare/cloudflare/5.0.0-rc1/linux_amd64
│ absolute: getwd: no such file or directory
╵
╷
│ Error: Failed to install provider
│ 
│ Error while installing vancluever/acme v2.29.0: failed to make target path
│ .terraform/providers/registry.terraform.io/vancluever/acme/2.29.0/linux_amd64
│ absolute: getwd: no such file or directory
╵
╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/google v4.84.0: failed to make target path
│ .terraform/providers/registry.terraform.io/hashicorp/google/4.84.0/linux_amd64
│ absolute: getwd: no such file or directory
╵
╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/kubernetes v2.35.1: failed to make target
│ path
│ .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.35.1/linux_amd64
│ absolute: getwd: no such file or directory
╵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants