Skip to content

Commit

Permalink
Removes fleet-olly
Browse files Browse the repository at this point in the history
  • Loading branch information
amandakarina committed Oct 18, 2024
1 parent dd6db3e commit 6bcca78
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 82 deletions.
8 changes: 4 additions & 4 deletions 3-fleetscope/envs/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ locals {
env = "development"
}

import {
id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
to = module.env.google_gke_hub_feature.fleet-o11y
}
# import {
# id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
# to = module.env.google_gke_hub_feature.fleet-o11y
# }

module "env" {
source = "../../modules/env_baseline"
Expand Down
8 changes: 4 additions & 4 deletions 3-fleetscope/envs/nonproduction/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ locals {
env = "nonproduction"
}

import {
id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
to = module.env.google_gke_hub_feature.fleet-o11y
}
# import {
# id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
# to = module.env.google_gke_hub_feature.fleet-o11y
# }

module "env" {
source = "../../modules/env_baseline"
Expand Down
8 changes: 4 additions & 4 deletions 3-fleetscope/envs/production/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ locals {
env = "production"
}

import {
id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
to = module.env.google_gke_hub_feature.fleet-o11y
}
# import {
# id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
# to = module.env.google_gke_hub_feature.fleet-o11y
# }

module "env" {
source = "../../modules/env_baseline"
Expand Down
42 changes: 21 additions & 21 deletions 3-fleetscope/modules/env_baseline/log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@
* limitations under the License.
*/

resource "google_gke_hub_feature" "fleet-o11y" {
name = "fleetobservability"
project = var.fleet_project_id
location = "global"
spec {
fleetobservability {
logging_config {
default_config {
mode = "COPY"
}
fleet_scope_logs_config {
mode = "MOVE"
}
}
}
}
# resource "google_gke_hub_feature" "fleet-o11y" {
# name = "fleetobservability"
# project = var.fleet_project_id
# location = "global"
# spec {
# fleetobservability {
# logging_config {
# default_config {
# mode = "COPY"
# }
# fleet_scope_logs_config {
# mode = "MOVE"
# }
# }
# }
# }

depends_on = [
google_gke_hub_feature.mesh_feature,
google_project_iam_member.fleet_logging_viewaccessor
]
}
# depends_on = [
# google_gke_hub_feature.mesh_feature,
# google_project_iam_member.fleet_logging_viewaccessor
# ]
# }

resource "google_project_iam_member" "fleet_logging_viewaccessor" {
for_each = var.namespace_ids
Expand Down
4 changes: 2 additions & 2 deletions 3-fleetscope/modules/env_baseline/mcg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource "google_gke_hub_feature" "mci" {

depends_on = [
google_gke_hub_feature.mcs,
google_gke_hub_feature.fleet-o11y
# google_gke_hub_feature.fleet-o11y
]
}

Expand All @@ -47,7 +47,7 @@ resource "google_project_service_identity" "fleet_mci_sa" {

depends_on = [
google_gke_hub_feature.mci,
google_gke_hub_feature.fleet-o11y
# google_gke_hub_feature.fleet-o11y
]
}

Expand Down
1 change: 0 additions & 1 deletion 3-fleetscope/modules/env_baseline/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ variable "cluster_membership_ids" {
type = list(string)
}


variable "additional_project_role_identities" {
description = <<-EOF
(Optional) A list of additional identities to assign roles at the project level for the fleet project. Use the following formats for specific Kubernetes identities:
Expand Down
28 changes: 3 additions & 25 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,37 +226,14 @@ steps:
]
waitFor:
- prepare
- id: standalone-apply-fase1
- id: standalone-apply
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"cft test run TestStandaloneSingleProjectExample --stage apply --verbose",
]
allowFailure: true
waitFor:
- standalone-init
- id: standalone-add-import
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"mv /workspace/examples/standalone_single_project/fleet-olly-import.tf.example /workspace/examples/standalone_single_project/fleet-olly-import.tf",
]
waitFor:
- standalone-apply-fase1
- id: standalone-apply-fase2
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"cft test run TestStandaloneSingleProjectExample --stage apply --verbose",
]
waitFor:
- standalone-add-import
- id: standalone-verify
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
Expand All @@ -266,7 +243,7 @@ steps:
"cft test run TestStandaloneSingleProjectExample --stage verify --verbose",
]
waitFor:
- standalone-apply-fase2
- standalone-apply
- id: standalone-teardown
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
Expand All @@ -277,6 +254,7 @@ steps:
]
waitFor:
- standalone-verify
- bootstrap-teardown

tags:
- "ci"
Expand Down
20 changes: 0 additions & 20 deletions examples/standalone_single_project/fleet-olly-import.tf.example

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestStandaloneSingleProjectExample(t *testing.T) {
// define and write a custom verifier for this test case call the default verify for confirming no additional changes
standaloneSingleProjT.DefineVerify(func(assert *assert.Assertions) {
// perform default verification ensuring Terraform reports no additional changes on an applied blueprint
// standaloneSingleProjT.DefaultVerify(assert)
standaloneSingleProjT.DefaultVerify(assert)

})
// call the test function to execute the integration test
Expand Down

0 comments on commit 6bcca78

Please sign in to comment.