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

fix: cert providing method to harbor #76

Merged
merged 5 commits into from
Jan 28, 2025
Merged

fix: cert providing method to harbor #76

merged 5 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
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.harbor.helm_release.harbor will be created
+ resource "helm_release" "harbor" {
      + atomic                     = false
      + chart                      = "harbor"
      + cleanup_on_fail            = false
      + create_namespace           = true
      + dependency_update          = false
      + disable_crd_hooks          = false
      + disable_openapi_validation = false
      + disable_webhooks           = false
      + force_update               = false
      + id                         = (known after apply)
      + lint                       = false
      + manifest                   = (known after apply)
      + max_history                = 0
      + metadata                   = (known after apply)
      + name                       = "harbor"
      + namespace                  = "harbor"
      + pass_credentials           = false
      + recreate_pods              = false
      + render_subchart_notes      = true
      + replace                    = false
      + repository                 = "https://helm.goharbor.io"
      + reset_values               = false
      + reuse_values               = false
      + skip_crds                  = false
      + status                     = "deployed"
      + timeout                    = 300
      + values                     = [
          + <<-EOT
                expose:
                  type: ingress
                  tls:
                    enabled: true
                    certSource: secret
                    secret:
                      secretName: wildcard-goboolean-io-tls 
                  ingress:
                    hosts:
                      core: registry.goboolean.io
                    annotations:
                      kubernetes.io/ingress.class: istio
                externalURL: https://registry.goboolean.io
            EOT,
        ]
      + verify                     = false
      + version                    = "1.15.0"
      + wait                       = true
      + wait_for_jobs              = false
    }

  # 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)
          + labels           = {
              + "name" = "harbor"
            }
          + name             = "harbor"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

Plan: 2 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: 2 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

atlantis unlock

@goboolean-io
Copy link
Contributor

All Atlantis locks for this PR have been unlocked and plans discarded

@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

Plan Error

The default workspace at path projects/dev is currently locked by another command that is running for this pull request.
Wait until the previous command is complete and try again.

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Plan Error

Show Output
running "/usr/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/goboolean/infrastructure/76/default/projects/dev/default.tfplan\"" in "/root/.atlantis/repos/goboolean/infrastructure/76/default/projects/dev": exit status 1
╷
│ Error: Error acquiring the state lock
│ 
│ Error message: writing "gs://goboolean-terraform-state/dev/default.tflock"
│ failed: googleapi: Error 412: At least one of the pre-conditions you
│ specified did not hold., conditionNotMet
│ Lock Info:
│   ID:        1738069949943035
│   Path:      gs://goboolean-terraform-state/dev/default.tflock
│   Operation: OperationTypePlan
│   Who:       [email protected]
│   Version:   1.9.5
│   Created:   2025-01-28 13:12:29.781655 +0000 UTC
│   Info:      
│ 
│ 
│ Terraform acquires a state lock to protect the state from being written
│ by multiple users at the same time. Please resolve the issue above and try
│ again. For most commands, you can disable locking with the "-lock=false"
│ flag, but this is not recommended.
╵

@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
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.harbor.helm_release.harbor will be created
+ resource "helm_release" "harbor" {
      + atomic                     = false
      + chart                      = "harbor"
      + cleanup_on_fail            = false
      + create_namespace           = true
      + dependency_update          = false
      + disable_crd_hooks          = false
      + disable_openapi_validation = false
      + disable_webhooks           = false
      + force_update               = false
      + id                         = (known after apply)
      + lint                       = false
      + manifest                   = (known after apply)
      + max_history                = 0
      + metadata                   = (known after apply)
      + name                       = "harbor"
      + namespace                  = "harbor"
      + pass_credentials           = false
      + recreate_pods              = false
      + render_subchart_notes      = true
      + replace                    = false
      + repository                 = "https://helm.goharbor.io"
      + reset_values               = false
      + reuse_values               = false
      + skip_crds                  = false
      + status                     = "deployed"
      + timeout                    = 300
      + values                     = [
          + <<-EOT
                expose:
                  type: ingress
                  tls:
                    enabled: true
                    certSource: none
                  ingress:
                    hosts:
                      core: registry.goboolean.io
                    annotations:
                      kubernetes.io/ingress.class: istio
                externalURL: https://registry.goboolean.io
            EOT,
        ]
      + verify                     = false
      + version                    = "1.15.0"
      + wait                       = true
      + wait_for_jobs              = false
    }

  # module.istio.kubernetes_manifest.istio_gateway will be created
+ resource "kubernetes_manifest" "istio_gateway" {
      + manifest = {
          + apiVersion = "networking.istio.io/v1alpha3"
          + kind       = "Gateway"
          + metadata   = {
              + name      = "istio-ingressgateway"
              + namespace = "istio-system"
            }
          + spec       = {
              + selector = {
                  + istio = "ingressgateway"
                }
              + servers  = [
                  + {
                      + hosts = [
                          + "*.goboolean.io",
                        ]
                      + port  = {
                          + name     = "https"
                          + number   = 443
                          + protocol = "HTTPS"
                        }
                      + tls   = {
                          + credentialName = "wildcard-goboolean-io-tls"
                          + mode           = "SIMPLE"
                        }
                    },
                ]
            }
        }
      + object   = {
          + apiVersion = "networking.istio.io/v1alpha3"
          + kind       = "Gateway"
          + metadata   = {
              + annotations                = (known after apply)
              + creationTimestamp          = (known after apply)
              + deletionGracePeriodSeconds = (known after apply)
              + deletionTimestamp          = (known after apply)
              + finalizers                 = (known after apply)
              + generateName               = (known after apply)
              + generation                 = (known after apply)
              + labels                     = (known after apply)
              + managedFields              = (known after apply)
              + name                       = "istio-ingressgateway"
              + namespace                  = "istio-system"
              + ownerReferences            = (known after apply)
              + resourceVersion            = (known after apply)
              + selfLink                   = (known after apply)
              + uid                        = (known after apply)
            }
          + spec       = {
              + selector = {
                  + istio = "ingressgateway"
                }
              + servers  = [
                  + {
                      + bind            = (known after apply)
                      + defaultEndpoint = (known after apply)
                      + hosts           = [
                          + "*.goboolean.io",
                        ]
                      + name            = (known after apply)
                      + port            = {
                          + name       = "https"
                          + number     = 443
                          + protocol   = "HTTPS"
                          + targetPort = (known after apply)
                        }
                      + tls             = {
                          + caCertificates        = (known after apply)
                          + caCrl                 = (known after apply)
                          + cipherSuites          = (known after apply)
                          + credentialName        = "wildcard-goboolean-io-tls"
                          + httpsRedirect         = (known after apply)
                          + maxProtocolVersion    = (known after apply)
                          + minProtocolVersion    = (known after apply)
                          + mode                  = "SIMPLE"
                          + privateKey            = (known after apply)
                          + serverCertificate     = (known after apply)
                          + subjectAltNames       = (known after apply)
                          + verifyCertificateHash = (known after apply)
                          + verifyCertificateSpki = (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)
          + labels           = {
              + "name" = "harbor"
            }
          + name             = "harbor"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

Plan: 3 to add, 0 to change, 0 to destroy.
Releasing state lock. This may take a few moments...
  • ▶️ 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

atlantis apply

@goboolean-io
Copy link
Contributor

Ran Apply for dir: projects/dev workspace: default

Show Output
module.namespace.kubernetes_namespace.harbor: Creating...
module.namespace.kubernetes_namespace.harbor: Creation complete after 0s [id=harbor]
module.harbor.helm_release.harbor: Creating...
module.istio.kubernetes_manifest.istio_gateway: Creating...
module.istio.kubernetes_manifest.istio_gateway: Creation complete after 0s
module.harbor.helm_release.harbor: Still creating... [10s elapsed]
module.harbor.helm_release.harbor: Still creating... [20s elapsed]
module.harbor.helm_release.harbor: Still creating... [30s elapsed]
module.harbor.helm_release.harbor: Still creating... [40s elapsed]
module.harbor.helm_release.harbor: Still creating... [50s elapsed]
module.harbor.helm_release.harbor: Still creating... [1m0s elapsed]
module.harbor.helm_release.harbor: Still creating... [1m10s elapsed]
module.harbor.helm_release.harbor: Still creating... [1m20s elapsed]
module.harbor.helm_release.harbor: Still creating... [1m30s elapsed]
module.harbor.helm_release.harbor: Still creating... [1m40s elapsed]
module.harbor.helm_release.harbor: Creation complete after 1m44s [id=harbor]

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

@goboolean-io
Copy link
Contributor

Automatically merging because all plans have been successfully applied.

@goboolean-io goboolean-io merged commit 8499fb1 into main Jan 28, 2025
5 checks passed
@goboolean-io goboolean-io deleted the fix/harbor-cert branch January 28, 2025 13:16
@goboolean-io
Copy link
Contributor

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

  • dir: projects/dev workspace: default

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