Skip to content

Commit

Permalink
Wait for gmp-operator rollout before applying kuberay podmonitorings (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
artemvmin authored Mar 21, 2024
1 parent bb0524d commit a73ccc5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions applications/rag/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ provider "google-beta" {
project = var.project_id
}

provider "time" {}

data "google_client_config" "default" {}

data "google_project" "project" {
Expand Down
4 changes: 4 additions & 0 deletions applications/rag/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@ terraform {
source = "hashicorp/kubernetes"
version = "2.18.1"
}
time = {
source = "hashicorp/time"
version = "0.11.1"
}
}
}
2 changes: 2 additions & 0 deletions applications/ray/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ provider "google" {
project = var.project_id
}

provider "time" {}

data "google_client_config" "default" {}

data "google_project" "project" {
Expand Down
4 changes: 4 additions & 0 deletions applications/ray/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@ terraform {
source = "hashicorp/kubernetes"
version = "2.18.1"
}
time = {
source = "hashicorp/time"
version = "0.11.1"
}
}
}
7 changes: 7 additions & 0 deletions modules/kuberay-monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Temporary workaround to ensure the GMP webhook is installed before applying PodMonitorings.
resource "time_sleep" "wait_for_gmp_operator" {
create_duration = "10s"
}

# google managed prometheus engine
resource "helm_release" "gmp-engine" {
name = "gmp-engine"
Expand All @@ -29,6 +34,8 @@ resource "helm_release" "gmp-engine" {
name = "serviceAccount"
value = var.k8s_service_account
}

depends_on = [time_sleep.wait_for_gmp_operator]
}

# grafana
Expand Down
4 changes: 4 additions & 0 deletions modules/kuberay-monitoring/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ terraform {
source = "hashicorp/kubernetes"
version = "2.18.1"
}
time = {
source = "hashicorp/time"
version = "0.11.1"
}
}
}

0 comments on commit a73ccc5

Please sign in to comment.