Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

GKE: Enable integration tests #214

Merged
merged 20 commits into from
Nov 12, 2018

Conversation

sameersbn
Copy link
Contributor

@sameersbn sameersbn commented Nov 5, 2018

  • Configure CI setup for testing on GKE clusters
  • Configure DNS suffix for GKE tests
  • Clean up disk leakage
  • Debug monitoring test failures in GKE

@sameersbn sameersbn force-pushed the anguslees-gketests branch 2 times, most recently from 57658b1 to 44b7461 Compare November 6, 2018 03:37
@sameersbn sameersbn added this to the 1.0.0 milestone Nov 7, 2018
@sameersbn sameersbn added ci Specific to CI/CD gke Specific to GKE platform backports/queue Add to Backport Queue for Maintenance Releases labels Nov 7, 2018
@sameersbn sameersbn force-pushed the anguslees-gketests branch 2 times, most recently from 3344ff1 to 489c6ee Compare November 8, 2018 15:25
Copy link
Contributor

@anguslees anguslees left a comment

Choose a reason for hiding this comment

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

(lgtm so far, with the query regarding dnsSuffix in monitoring_test. Hooking the dns zone up shouldn't be hard at this point - I'm doing that part now for demos)

tests/monitoring_test.go Outdated Show resolved Hide resolved
Jenkinsfile Show resolved Hide resolved
Jenkinsfile Outdated Show resolved Hide resolved
Jenkinsfile Outdated
@@ -224,15 +242,15 @@ spec:
// $AZURE_SUBSCRIPTION_ID, $AZURE_TENANT_ID.
withCredentials([azureServicePrincipal('jenkins-bkpr-owner-sp')]) {
def resourceGroup = 'jenkins-bkpr-rg'
def clusterName = ("${env.BRANCH_NAME}".take(8) + "-${env.BUILD_NUMBER}-${platform}-" + UUID.randomUUID().toString().take(5)).replaceAll(/[^a-zA-Z0-9-]/, '-').toLowerCase()
def clusterName = ("${env.BRANCH_NAME}".take(8) + "-${env.BUILD_NUMBER}-" + UUID.randomUUID().toString().take(5) + "-${platform}").replaceAll(/[^a-zA-Z0-9-]/, '-').toLowerCase()
Copy link
Contributor

Choose a reason for hiding this comment

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

We need more uniqueness than platform+BUILD_NUMBER? This expression is getting a bit silly - I think if we're going to include a random component, then lets just drop all the non-random bits and rely on tags/labels to report meta-info.

Copy link
Contributor Author

@sameersbn sameersbn Nov 9, 2018

Choose a reason for hiding this comment

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

The truncation removes the uniqueness. This change essentially is to make sure the uniqueness does not get removed as a result of truncation. As a result I can reliably query leftover gce disks using a filter and remove them.

@sameersbn sameersbn force-pushed the anguslees-gketests branch 3 times, most recently from 99af496 to 7de4193 Compare November 9, 2018 10:18
@sameersbn sameersbn changed the title [WIP] GKE: Enable integration tests GKE: Enable integration tests Nov 10, 2018
@sameersbn
Copy link
Contributor Author

@anguslees please take a look.

Copy link
Contributor

@anguslees anguslees left a comment

Choose a reason for hiding this comment

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

Nice work!

Jenkinsfile Outdated Show resolved Hide resolved
@sameersbn sameersbn merged commit bda226f into vmware-archive:master Nov 12, 2018
@sameersbn sameersbn deleted the anguslees-gketests branch November 12, 2018 07:39
sameersbn referenced this pull request in sameersbn/kube-prod-runtime Nov 12, 2018
* GKE: Enable integration tests

Signed-off-by: Sameer Naik <[email protected]>

* fix GKE integration test setup

Signed-off-by: Sameer Naik <[email protected]>

* let gke select the latest available k8s patch release

* define `waitForRollout` utility function

* drop `+k8s` string from platform name

* insert the random string before the platform substring

* wait for deployments in `kube-system` namespace to rollout

* fix command to delete dns zone

* remove `--async` flag from GKE cluster deletion

when the cluster is delete synchronously the dns zone gets cleaned up
and the subsequent call to delete the zone executes successfully.

* fix gke disk leakage

* break multiline command block

* purge zone records before deleting the zone

* cleanup `gcloud container clusters create` command

* remove double dashes from clusterName

* add utility functions to update glue records

* setup glue records for gke tests

* remove `--dns-suffix` requirement for monitoring tests

* specify machine-type in gke cluster create command

* let kubeprod create the dns zone

* nameServers as a ArrayList to insertGlueRecords

(cherry picked from commit bda226f)
Signed-off-by: Sameer Naik <[email protected]>
@sameersbn sameersbn added backports/done and removed backports/queue Add to Backport Queue for Maintenance Releases labels Nov 12, 2018
@sameersbn sameersbn mentioned this pull request Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backports/done ci Specific to CI/CD gke Specific to GKE platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants