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

[IBCDPE-1034] Move deployment model to ArgoCD #16

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions modules/victoria-metrics/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ terraform {
source = "hashicorp/kubernetes"
version = "~> 2.0"
}
helm = {
source = "hashicorp/helm"
version = "~> 2.0"
}
kubectl = {
source = "gavinbunney/kubectl"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why a secondary source of kubectl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the helm provider here - I accidentally left it in.

But to answer why I moved over to using this over provider to deploy a kubectl_manifest:

hashicorp/terraform-provider-kubernetes#1367

The root of the problem is a race condition that exists when you are installing a CRD (Custom Resource definition) and the CR (Custom Resource) in the same terraform stack. These are ArgoCD specific CRDs that require the ArgoCD helm chart is installed first. The official hashicorp k8s provider requires that the CRD is already installed on the cluster during the plan stage, which has obvious problems here.

The use of this tf provider does not require that the CRD is install during plan stage and correctly applies it to the cluster in the right order as I am using a depends_on relationship between the module I have the CR and the ArgoCD module which installs the CRD.

version = "1.14.0"
Expand Down