Skip to content

Conversation

@csantanapr
Copy link
Member

Fixes #4

Signed-off-by: Carlos Santana <csantana23@gmail.com>
@csantanapr csantanapr merged commit d2b0dc7 into main Aug 31, 2023

output "configure_argocd" {
description = "Terminal Setup"
value = <<-EOT

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the << EOT is working, this is my output:

terraform output
access_argocd = <<EOT
export KUBECONFIG="/tmp/ex-private-git"
aws eks --region eu-west-1 update-kubeconfig --name ex-private-git
echo "ArgoCD URL: https://$(kubectl get svc -n argocd argo-cd-argocd-server -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
echo "ArgoCD Username: admin"
echo "ArgoCD Password: $(kubectl get secrets argocd-initial-admin-secret -n argocd --template="{{index .data.password | base64decode}}")"

EOT
configure_argocd = <<EOT
export KUBECONFIG="/tmp/ex-private-git"
aws eks --region eu-west-1 update-kubeconfig --name ex-private-git
export ARGOCD_OPTS="--port-forward --port-forward-namespace argocd --grpc-web"
kubectl config set-context --current --namespace argocd
argocd login --port-forward --username admin --password $(argocd admin initial-password | head -1)
echo "ArgoCD Username: admin"
echo "ArgoCD Password: $(kubectl get secrets argocd-initial-admin-secret -n argocd --template="{{index .data.password | base64decode}}")"
echo Port Forward: http://localhost:8080
kubectl port-forward -n argocd svc/argo-cd-argocd-server 8080:80

EOT
configure_kubectl = <<EOT
export KUBECONFIG="/tmp/ex-private-git"
aws eks --region eu-west-1 update-kubeconfig --name ex-private-git

EOT

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's the normal print out
you can do the raw output to not get the EOT

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since I work with multiple cluster in different terminal windows in vscode I use this

export KUBECONFIG="/tmp/ex-private-git"
aws eks --region eu-west-1 update-kubeconfig --name ex-private-git
echo "ArgoCD URL: https://$(kubectl get svc -n argocd argo-cd-argocd-server -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
echo "ArgoCD Username: admin"
echo "ArgoCD Password: $(kubectl get secrets argocd-initial-admin-secret -n argocd --template="{{index .data.password | base64decode}}")"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other ones if you just need kubectl and the other one if you want to configure argocd login and port forward

type: git
url: git@github.com:gitops-bridge-dev
sshPrivateKey: |
-----BEGIN OPENSSH PRIVATE KEY-----

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whose key is it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a test key, will remove

}
git-workloads = {
type = "git"
url = local.gitops_addons_org

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be gitops_workloads_org

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

################################################################################
# GitOps Bridge: Private ssh keys for git
################################################################################
resource "kubernetes_namespace" "argocd" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got some issues with several terraform apply complaining that the namespace already exists..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the namespace should not exist, in the bootstrap I added for the helm to not create the namespace because it already exists

module "gitops_bridge_bootstrap" {
  source = "../../../modules/gitops-bridge-bootstrap"

  argocd_cluster               = module.gitops_bridge_metadata.argocd
  argocd_bootstrap_app_of_apps = local.argocd_bootstrap_app_of_apps
  argocd = { create_namespace = false }
  depends_on = [kubernetes_secret.git_secrets]
}

the argocd = { create_namespace = false }

Copy link
Member Author

@csantanapr csantanapr Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what I'm having trouble is with the destroy now of the namespace
need to look how to handle

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.

Support private git (ssh or https) repos both addons and workloads

3 participants