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

Fixed addons_config -> 'httpLoadBalancing' and network_config -> 'EnableIntraNodeVisibility' cloumns in table gcp_kubernetes_cluster Closes #527 #526 #530

Merged
merged 2 commits into from Jan 3, 2024

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Dec 28, 2023

Integration test logs

Logs
No env file present for the current environment:  staging 
 Falling back to .env config
No env file present for the current environment:  staging
customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined

SETUP: tests/gcp_kubernetes_cluster []

PRETEST: tests/gcp_kubernetes_cluster

TEST: tests/gcp_kubernetes_cluster
Running terraform
data.google_client_config.current: Reading...
data.google_client_config.current: Read complete after 0s [id=projects/"suoer-cool"/regions/"us-east1"/zones/<null>]
data.null_data_source.resource: Reading...
data.null_data_source.resource: Read complete after 0s [id=static]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # google_compute_network.named_test_resource will be created
  + resource "google_compute_network" "named_test_resource" {
      + auto_create_subnetworks                   = true
      + delete_default_routes_on_create           = false
      + gateway_ipv4                              = (known after apply)
      + id                                        = (known after apply)
      + internal_ipv6_range                       = (known after apply)
      + mtu                                       = (known after apply)
      + name                                      = "turbottest7485"
      + network_firewall_policy_enforcement_order = "AFTER_CLASSIC_FIREWALL"
      + numeric_id                                = (known after apply)
      + project                                   = "suoer-cool"
      + routing_mode                              = (known after apply)
      + self_link                                 = (known after apply)
    }

  # google_container_cluster.named_test_resource will be created
  + resource "google_container_cluster" "named_test_resource" {
      + cluster_ipv4_cidr           = (known after apply)
      + datapath_provider           = (known after apply)
      + default_max_pods_per_node   = (known after apply)
      + deletion_protection         = true
      + enable_intranode_visibility = (known after apply)
      + enable_kubernetes_alpha     = false
      + enable_l4_ilb_subsetting    = false
      + enable_legacy_abac          = false
      + enable_shielded_nodes       = true
      + endpoint                    = (known after apply)
      + id                          = (known after apply)
      + initial_node_count          = 1
      + label_fingerprint           = (known after apply)
      + location                    = "us-east1"
      + logging_service             = "none"
      + master_version              = (known after apply)
      + monitoring_service          = "none"
      + name                        = "turbottest7485"
      + network                     = "turbottest7485"
      + networking_mode             = (known after apply)
      + node_locations              = (known after apply)
      + node_version                = (known after apply)
      + operation                   = (known after apply)
      + private_ipv6_google_access  = (known after apply)
      + project                     = (known after apply)
      + self_link                   = (known after apply)
      + services_ipv4_cidr          = (known after apply)
      + subnetwork                  = (known after apply)
      + tpu_ipv4_cidr_block         = (known after apply)
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + location           = "us-east1"
  + project_id         = "suoer-cool"
  + resource_aka       = (known after apply)
  + resource_id        = (known after apply)
  + resource_name      = "turbottest7485"
  + self_link          = (known after apply)
  + services_ipv4_cidr = (known after apply)
google_compute_network.named_test_resource: Creating...
google_compute_network.named_test_resource: Still creating... [10s elapsed]
google_compute_network.named_test_resource: Still creating... [20s elapsed]
google_compute_network.named_test_resource: Still creating... [30s elapsed]
google_compute_network.named_test_resource: Still creating... [40s elapsed]
google_compute_network.named_test_resource: Still creating... [50s elapsed]
google_compute_network.named_test_resource: Still creating... [1m0s elapsed]
google_compute_network.named_test_resource: Still creating... [1m10s elapsed]
google_compute_network.named_test_resource: Creation complete after 1m18s [id=projects/suoer-cool/global/networks/turbottest7485]
google_container_cluster.named_test_resource: Creating...
google_container_cluster.named_test_resource: Still creating... [10s elapsed]
google_container_cluster.named_test_resource: Still creating... [20s elapsed]
google_container_cluster.named_test_resource: Still creating... [30s elapsed]
google_container_cluster.named_test_resource: Still creating... [40s elapsed]
google_container_cluster.named_test_resource: Still creating... [50s elapsed]
google_container_cluster.named_test_resource: Still creating... [1m0s elapsed]
google_container_cluster.named_test_resource: Still creating... [1m10s elapsed]
google_container_cluster.named_test_resource: Still creating... [1m20s elapsed]
google_container_cluster.named_test_resource: Still creating... [1m30s elapsed]
google_container_cluster.named_test_resource: Still creating... [1m40s elapsed]
google_container_cluster.named_test_resource: Still creating... [1m50s elapsed]
google_container_cluster.named_test_resource: Still creating... [2m0s elapsed]
google_container_cluster.named_test_resource: Still creating... [2m10s elapsed]
google_container_cluster.named_test_resource: Still creating... [2m20s elapsed]
google_container_cluster.named_test_resource: Still creating... [2m30s elapsed]
google_container_cluster.named_test_resource: Still creating... [2m40s elapsed]
google_container_cluster.named_test_resource: Still creating... [2m50s elapsed]
google_container_cluster.named_test_resource: Still creating... [3m0s elapsed]
google_container_cluster.named_test_resource: Still creating... [3m10s elapsed]
google_container_cluster.named_test_resource: Still creating... [3m20s elapsed]
google_container_cluster.named_test_resource: Still creating... [3m30s elapsed]
google_container_cluster.named_test_resource: Still creating... [3m40s elapsed]
google_container_cluster.named_test_resource: Still creating... [3m50s elapsed]
google_container_cluster.named_test_resource: Still creating... [4m0s elapsed]
google_container_cluster.named_test_resource: Still creating... [4m10s elapsed]
google_container_cluster.named_test_resource: Still creating... [4m20s elapsed]
google_container_cluster.named_test_resource: Still creating... [4m30s elapsed]
google_container_cluster.named_test_resource: Still creating... [4m40s elapsed]
google_container_cluster.named_test_resource: Still creating... [4m50s elapsed]
google_container_cluster.named_test_resource: Still creating... [5m0s elapsed]
google_container_cluster.named_test_resource: Still creating... [5m10s elapsed]
google_container_cluster.named_test_resource: Still creating... [5m20s elapsed]
google_container_cluster.named_test_resource: Still creating... [5m30s elapsed]
google_container_cluster.named_test_resource: Creation complete after 5m37s [id=projects/suoer-cool/locations/us-east1/clusters/turbottest7485]

Warning: Deprecated

  with data.null_data_source.resource,
  on variables.tf line 27, in data "null_data_source" "resource":
  27: data "null_data_source" "resource" {

The null_data_source was historically used to construct intermediate values
to re-use elsewhere in configuration, the same can now be achieved using
locals or the terraform_data resource type in Terraform 1.4 and later.

(and one more similar warning elsewhere)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Outputs:

location = "us-east1"
project_id = "suoer-cool"
resource_aka = "gcp://container.googleapis.com/v1/projects/suoer-cool/locations/us-east1/clusters/turbottest7485"
resource_id = "projects/suoer-cool/locations/us-east1/clusters/turbottest7485"
resource_name = "turbottest7485"
self_link = "https://container.googleapis.com/v1/projects/suoer-cool/locations/us-east1/clusters/turbottest7485"
services_ipv4_cidr = "10.4.0.0/20"

Running SQL query: test-get-query.sql
Warning: terminal options has been deprecated and will be removed in a future version of Steampipe.
These can now be set in a steampipe workspace.
(/Users/parthas/.steampipe/config/default.spc:34,20-42,2)
[
  {
    "akas": [
      "gcp://container.googleapis.com/v1/projects/suoer-cool/locations/us-east1/clusters/turbottest7485"
    ],
    "location": "us-east1",
    "name": "turbottest7485",
    "project": "suoer-cool",
    "services_ipv4_cidr": "10.4.0.0/20"
  }
]
✔ PASSED

Running SQL query: test-invalid-name-query.sql
Warning: terminal options has been deprecated and will be removed in a future version of Steampipe.
These can now be set in a steampipe workspace.
(/Users/parthas/.steampipe/config/default.spc:34,20-42,2)
[]
✔ PASSED

Running SQL query: test-list-query.sql
Warning: terminal options has been deprecated and will be removed in a future version of Steampipe.
These can now be set in a steampipe workspace.
(/Users/parthas/.steampipe/config/default.spc:34,20-42,2)
[
  {
    "akas": [
      "gcp://container.googleapis.com/v1/projects/suoer-cool/locations/us-east1/clusters/turbottest7485"
    ],
    "location": "us-east1",
    "name": "turbottest7485",
    "services_ipv4_cidr": "10.4.0.0/20"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql
Warning: terminal options has been deprecated and will be removed in a future version of Steampipe.
These can now be set in a steampipe workspace.
(/Users/parthas/.steampipe/config/default.spc:34,20-42,2)
[]
✔ PASSED

Running SQL query: test-turbot-query.sql
Warning: terminal options has been deprecated and will be removed in a future version of Steampipe.
These can now be set in a steampipe workspace.
(/Users/parthas/.steampipe/config/default.spc:34,20-42,2)
[
  {
    "akas": [
      "gcp://container.googleapis.com/v1/projects/suoer-cool/locations/us-east1/clusters/turbottest7485"
    ],
    "title": "turbottest7485"
  }
]
✔ PASSED

TEARDOWN: tests/gcp_kubernetes_cluster

SUMMARY:

1/1 passed.

Example query results

Results
> select name, jsonb_pretty(addons_config), jsonb_pretty(network_config) from gcp_kubernetes_cluster;
+---------------------+-------------------------------------------+-----------------------------------------------------------------------------------------------+
| name                | jsonb_pretty                              | jsonb_pretty                                                                                  |
+---------------------+-------------------------------------------+-----------------------------------------------------------------------------------------------+
| autopilot-cluster-1 | {                                         | {                                                                                             |
|                     |     "CloudRunConfig": {                   |     "Network": "projects/suoer-cool/global/networks/pipes-vpc-network",                       |
|                     |     },                                    |     "DnsConfig": {                                                                            |
|                     |     "DnsCacheConfig": {                   |         "ClusterDns": "CLOUD_DNS",                                                            |
|                     |         "Enabled": true                   |         "ClusterDnsScope": "CLUSTER_SCOPE",                                                   |
|                     |     },                                    |         "ClusterDnsDomain": "cluster.local"                                                   |
|                     |     "HttpLoadBalancing": {                |     },                                                                                        |
|                     |         "Disabled": false                 |     "Subnetwork": "projects/suoer-cool/regions/us-central1/subnetworks/pipes-class-a-subnet", |
|                     |     },                                    |     "DatapathProvider": "ADVANCED_DATAPATH",                                                  |
|                     |     "KubernetesDashboard": {              |     "GatewayApiConfig": {                                                                     |
|                     |         "Disabled": true                  |         "Channel": "CHANNEL_STANDARD"                                                         |
|                     |     },                                    |     },                                                                                        |
|                     |     "NetworkPolicyConfig": {              |     "DefaultSnatStatus": {                                                                    |
|                     |         "Disabled": true                  |         "Disabled": false                                                                     |
|                     |     },                                    |     },                                                                                        |
|                     |     "GkeBackupAgentConfig": {             |     "EnableL4ilbSubsetting": false,                                                           |
|                     |     },                                    |     "EnableMultiNetworking": false,                                                           |
|                     |     "ConfigConnectorConfig": {            |     "EnableFqdnNetworkPolicy": false,                                                         |
|                     |     },                                    |     "PrivateIpv6GoogleAccess": "",                                                            |
|                     |     "GcsFuseCsiDriverConfig": {           |     "NetworkPerformanceConfig": {                                                             |
|                     |         "Enabled": true                   |     },                                                                                        |
|                     |     },                                    |     "ServiceExternalIpsConfig": {                                                             |
|                     |     "HorizontalPodAutoscaling": {         |         "Enabled": false                                                                      |
|                     |         "Disabled": false                 |     },                                                                                        |
|                     |     },                                    |     "EnableIntraNodeVisibility": true                                                         |
|                     |     "GcpFilestoreCsiDriverConfig": {      | }                                                                                             |
|                     |         "Enabled": true                   |                                                                                               |
|                     |     },                                    |                                                                                               |
|                     |     "GcePersistentDiskCsiDriverConfig": { |                                                                                               |
|                     |         "Enabled": true                   |                                                                                               |
|                     |     }                                     |                                                                                               |
|                     | }                                         |                                                                                               |
| cluster-1           | {                                         | {                                                                                             |
|                     |     "CloudRunConfig": {                   |     "Network": "projects/suoer-cool/global/networks/default",                                 |
|                     |     },                                    |     "DnsConfig": {                                                                            |
|                     |     "DnsCacheConfig": {                   |     },                                                                                        |
|                     |         "Enabled": false                  |     "Subnetwork": "projects/suoer-cool/regions/us-central1/subnetworks/default",              |
|                     |     },                                    |     "DatapathProvider": "LEGACY_DATAPATH",                                                    |
|                     |     "HttpLoadBalancing": {                |     "GatewayApiConfig": {                                                                     |
|                     |         "Disabled": false                 |     },                                                                                        |
|                     |     },                                    |     "DefaultSnatStatus": {                                                                    |
|                     |     "KubernetesDashboard": {              |         "Disabled": false                                                                     |
|                     |         "Disabled": true                  |     },                                                                                        |
|                     |     },                                    |     "EnableL4ilbSubsetting": false,                                                           |
|                     |     "NetworkPolicyConfig": {              |     "EnableMultiNetworking": false,                                                           |
|                     |         "Disabled": true                  |     "EnableFqdnNetworkPolicy": false,                                                         |
|                     |     },                                    |     "PrivateIpv6GoogleAccess": "",                                                            |
|                     |     "GkeBackupAgentConfig": {             |     "NetworkPerformanceConfig": {                                                             |
|                     |     },                                    |     },                                                                                        |
|                     |     "ConfigConnectorConfig": {            |     "ServiceExternalIpsConfig": {                                                             |
|                     |     },                                    |         "Enabled": false                                                                      |
|                     |     "GcsFuseCsiDriverConfig": {           |     },                                                                                        |
|                     |         "Enabled": false                  |     "EnableIntraNodeVisibility": false                                                        |
|                     |     },                                    | }                                                                                             |
|                     |     "HorizontalPodAutoscaling": {         |                                                                                               |
|                     |         "Disabled": false                 |                                                                                               |
|                     |     },                                    |                                                                                               |
|                     |     "GcpFilestoreCsiDriverConfig": {      |                                                                                               |
|                     |     },                                    |                                                                                               |
|                     |     "GcePersistentDiskCsiDriverConfig": { |                                                                                               |
|                     |         "Enabled": true                   |                                                                                               |
|                     |     }                                     |                                                                                               |
|                     | }                                         |                                                                                               |
+---------------------+-------------------------------------------+-----------------------------------------------------------------------------------------------+

Time: 2.5s. Rows fetched: 2. Hydrate calls: 0.

> select name, jsonb_pretty(node_config) from gcp_kubernetes_cluster;
+---------------------+------------------------------------------------------------------------+
| name                | jsonb_pretty                                                           |
+---------------------+------------------------------------------------------------------------+
| cluster-1           | {                                                                      |
|                     |     "Spot": false,                                                     |
|                     |     "Tags": null,                                                      |
|                     |     "Gvnic": {                                                         |
|                     |     },                                                                 |
|                     |     "Labels": null,                                                    |
|                     |     "Taints": null,                                                    |
|                     |     "DiskType": "pd-balanced",                                         |
|                     |     "Metadata": {                                                      |
|                     |         "disable-legacy-endpoints": "true"                             |
|                     |     },                                                                 |
|                     |     "ImageType": "COS_CONTAINERD",                                     |
|                     |     "NodeGroup": "",                                                   |
|                     |     "DiskSizeGb": 100,                                                 |
|                     |     "FastSocket": {                                                    |
|                     |     },                                                                 |
|                     |     "GcfsConfig": {                                                    |
|                     |     },                                                                 |
|                     |     "MachineType": "e2-micro",                                         |
|                     |     "OauthScopes": [                                                   |
|                     |         "https://www.googleapis.com/auth/devstorage.read_only",        |
|                     |         "https://www.googleapis.com/auth/logging.write",               |
|                     |         "https://www.googleapis.com/auth/monitoring",                  |
|                     |         "https://www.googleapis.com/auth/servicecontrol",              |
|                     |         "https://www.googleapis.com/auth/service.management.readonly", |
|                     |         "https://www.googleapis.com/auth/trace.append"                 |
|                     |     ],                                                                 |
|                     |     "Preemptible": false,                                              |
|                     |     "Accelerators": null,                                              |
|                     |     "KubeletConfig": {                                                 |
|                     |     },                                                                 |
|                     |     "LocalSsdCount": 0,                                                |
|                     |     "LoggingConfig": {                                                 |
|                     |     },                                                                 |
|                     |     "SandboxConfig": {                                                 |
|                     |     },                                                                 |
|                     |     "BootDiskKmsKey": "",                                              |
|                     |     "MinCpuPlatform": "",                                              |
|                     |     "ResourceLabels": null,                                            |
|                     |     "ServiceAccount": "default",                                       |
|                     |     "LinuxNodeConfig": {                                               |
|                     |     },                                                                 |
|                     |     "SoleTenantConfig": {                                              |
|                     |     },                                                                 |
|                     |     "ConfidentialNodes": {                                             |
|                     |     },                                                                 |
|                     |     "WindowsNodeConfig": {                                             |
|                     |         "OsVersion": ""                                                |
|                     |     },                                                                 |
|                     |     "ReservationAffinity": {                                           |
|                     |     },                                                                 |
|                     |     "ShieldedInstanceConfig": {                                        |
|                     |         "EnableSecureBoot": false,                                     |
|                     |         "EnableIntegrityMonitoring": true                              |
|                     |     },                                                                 |
|                     |     "WorkloadMetadataConfig": {                                        |
|                     |     },                                                                 |
|                     |     "AdvancedMachineFeatures": {                                       |
|                     |     },                                                                 |
|                     |     "LocalNvmeSsdBlockConfig": {                                       |
|                     |     },                                                                 |
|                     |     "EphemeralStorageLocalSsdConfig": {                                |
|                     |     }                                                                  |
|                     | }                                                                      |
| turbottest7485      | {                                                                      |
|                     |     "Spot": false,                                                     |
|                     |     "Tags": null,                                                      |
|                     |     "Gvnic": {                                                         |
|                     |     },                                                                 |
|                     |     "Labels": null,                                                    |

Time: 2.2s. Rows fetched: 3. Hydrate calls: 0.


…bleIntraNodeVisibility' cloumns in table gcp_kubernetes_cluster Closes #527 #526
@madhushreeray30 madhushreeray30 merged commit f4ca8fa into main Jan 3, 2024
1 check passed
@madhushreeray30 madhushreeray30 deleted the issue-527-526 branch January 3, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment