-
Notifications
You must be signed in to change notification settings - Fork 127
Add example to show private git credentials for argocd #5
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
Conversation
Signed-off-by: Carlos Santana <csantana23@gmail.com>
|
|
||
| output "configure_argocd" { | ||
| description = "Terminal Setup" | ||
| value = <<-EOT |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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}}")"There was a problem hiding this comment.
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----- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whose key is it ?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" { |
There was a problem hiding this comment.
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..
There was a problem hiding this comment.
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 }
There was a problem hiding this comment.
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
Fixes #4