Skip to content

Commit

Permalink
Merge pull request #2718 from ziyue-101/deflake-gke-hub-test
Browse files Browse the repository at this point in the history
Deflake test using regional memberships
  • Loading branch information
google-oss-prow[bot] authored Sep 18, 2024
2 parents 0d79a26 + 22af044 commit 8fe8c6d
Show file tree
Hide file tree
Showing 15 changed files with 94 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ spec:
syncRev: HEAD
syncWaitSecs: "20"
sourceFormat: hierarchy
hierarchyController:
enableHierarchicalResourceQuota: true
enablePodTreeLabels: true
enabled: true
version: 1.18.1
featureRef:
name: gkehubfeature-basic-acm-${uniqueId}
location: global
membershipLocation: global
membershipLocation: us-central1
membershipRef:
name: gkehubmembership-basic-acm-${uniqueId}
projectRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ X-Xss-Protection: 0

---

GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand All @@ -992,14 +992,14 @@ X-Xss-Protection: 0
{
"error": {
"code": 404,
"message": "membership \"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}\" not found",
"message": "membership \"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}\" not found",
"status": "NOT_FOUND"
}
}

---

POST https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships?alt=json&membershipId=gkehubmembership-basic-acm-${uniqueId}
POST https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships?alt=json&membershipId=gkehubmembership-basic-acm-${uniqueId}
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand All @@ -1017,7 +1017,7 @@ User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}"
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}"
}

200 OK
Expand All @@ -1036,14 +1036,14 @@ X-Xss-Protection: 0
"@type": "type.googleapis.com/google.cloud.gkehub.v1beta1.OperationMetadata",
"createTime": "2024-04-01T12:34:56.123456Z",
"endTime": "2024-04-01T12:34:56.123456Z",
"target": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}"
"target": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}"
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}"
}

---

GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}?alt=json
GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand All @@ -1064,9 +1064,9 @@ X-Xss-Protection: 0
"@type": "type.googleapis.com/google.cloud.gkehub.v1beta1.OperationMetadata",
"createTime": "2024-04-01T12:34:56.123456Z",
"endTime": "2024-04-01T12:34:56.123456Z",
"target": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}"
"target": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}",
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}",
"response": {
"@type": "type.googleapis.com/google.cloud.gkehub.v1beta1.Membership",
"authority": {
Expand All @@ -1087,7 +1087,7 @@ X-Xss-Protection: 0
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}",
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}",
"state": {
"code": "READY"
},
Expand All @@ -1098,7 +1098,7 @@ X-Xss-Protection: 0

---

GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand Down Expand Up @@ -1132,7 +1132,7 @@ X-Xss-Protection: 0
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}",
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}",
"state": {
"code": "READY"
},
Expand Down Expand Up @@ -1176,7 +1176,7 @@ User-Agent: kcc/controller-manager
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"configmanagement": {
"configSync": {
"sourceFormat": "unstructured"
Expand Down Expand Up @@ -1241,7 +1241,7 @@ X-Xss-Protection: 0
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"configmanagement": {
"configSync": {
"sourceFormat": "unstructured"
Expand Down Expand Up @@ -1280,7 +1280,7 @@ X-Xss-Protection: 0
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"configmanagement": {
"configSync": {
"sourceFormat": "unstructured"
Expand All @@ -1305,7 +1305,7 @@ User-Agent: kcc/controller-manager
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"configmanagement": {
"configSync": {
"git": {
Expand All @@ -1320,11 +1320,6 @@ User-Agent: kcc/controller-manager
},
"sourceFormat": "hierarchy"
},
"hierarchyController": {
"enableHierarchicalResourceQuota": true,
"enablePodTreeLabels": true,
"enabled": true
},
"version": "1.18.1"
}
}
Expand Down Expand Up @@ -1386,7 +1381,7 @@ X-Xss-Protection: 0
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"configmanagement": {
"configSync": {
"git": {
Expand All @@ -1401,11 +1396,6 @@ X-Xss-Protection: 0
},
"sourceFormat": "hierarchy"
},
"hierarchyController": {
"enableHierarchicalResourceQuota": true,
"enablePodTreeLabels": true,
"enabled": true
},
"version": "1.18.1"
}
}
Expand Down Expand Up @@ -1440,7 +1430,7 @@ X-Xss-Protection: 0
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {
"configmanagement": {
"configSync": {
"git": {
Expand All @@ -1455,11 +1445,6 @@ X-Xss-Protection: 0
},
"sourceFormat": "hierarchy"
},
"hierarchyController": {
"enableHierarchicalResourceQuota": true,
"enablePodTreeLabels": true,
"enabled": true
},
"version": "1.18.1"
}
}
Expand All @@ -1480,7 +1465,7 @@ User-Agent: kcc/controller-manager
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {}
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {}
},
"name": "projects/example-project-01/locations/global/features/configmanagement",
"updateTime": "2024-04-01T12:34:56.123456Z"
Expand Down Expand Up @@ -1539,7 +1524,7 @@ X-Xss-Protection: 0
"managed-by-cnrm": "true"
},
"membershipSpecs": {
"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}": {}
"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}": {}
},
"name": "projects/example-project-01/locations/global/features/configmanagement",
"resourceState": {
Expand All @@ -1551,7 +1536,7 @@ X-Xss-Protection: 0

---

GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand Down Expand Up @@ -1585,7 +1570,7 @@ X-Xss-Protection: 0
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}",
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}",
"state": {
"code": "READY"
},
Expand All @@ -1595,7 +1580,7 @@ X-Xss-Protection: 0

---

DELETE https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
DELETE https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand All @@ -1616,17 +1601,17 @@ X-Xss-Protection: 0
"@type": "type.googleapis.com/google.cloud.gkehub.v1beta1.OperationMetadata",
"createTime": "2024-04-01T12:34:56.123456Z",
"endTime": "2024-04-01T12:34:56.123456Z",
"target": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}"
"target": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}"
},
"name": "projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}",
"name": "projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}/operations/${operationID}",
"response": {
"@type": "type.googleapis.com/google.cloud.gkehub.v1beta1.Membership"
}
}

---

GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
GET https://gkehub.googleapis.com/v1beta1/projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}?alt=json
Content-Type: application/json
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1

Expand All @@ -1644,7 +1629,7 @@ X-Xss-Protection: 0
{
"error": {
"code": 404,
"message": "membership \"projects/example-project-01/locations/global/memberships/gkehubmembership-basic-acm-${uniqueId}\" not found",
"message": "membership \"projects/example-project-01/locations/us-central1/memberships/gkehubmembership-basic-acm-${uniqueId}\" not found",
"status": "NOT_FOUND"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
projectRef:
name: gkehubfm-${uniqueId}
location: global
membershipLocation: us-central1
membershipRef:
name: gkehubmembership-basic-acm-${uniqueId}
featureRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ metadata:
cnrm.cloud.google.com/project-id: ${TEST_DEPENDENT_ORG_PROJECT_ID}
name: gkehubmembership-basic-acm-${uniqueId}
spec:
location: global
location: us-central1
authority:
issuer: https://container.googleapis.com/v1/projects/${TEST_DEPENDENT_ORG_PROJECT_ID_WITHOUT_QUOTATION}/locations/us-central1-a/clusters/gke-basic-acm-${uniqueId}
description: A sample GKE Hub membership
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
projectRef:
name: gkehubfm-${uniqueId}
location: global
membershipLocation: global
membershipLocation: us-central1
membershipRef:
name: gkehubmembership-basic-acm-${uniqueId}
featureRef:
Expand All @@ -38,8 +38,4 @@ spec:
syncWaitSecs: "20"
syncRev: "HEAD"
secretType: "none"
hierarchyController:
enabled: true
enablePodTreeLabels: true
enableHierarchicalResourceQuota: true
version: "1.18.1"
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ spec:
syncRev: 264b37c21ef77165d8639d77b23d4ebb8fee053c
syncWaitSecs: "30"
sourceFormat: hierarchy
hierarchyController:
enableHierarchicalResourceQuota: false
enablePodTreeLabels: false
enabled: false
version: 1.18.2
featureRef:
name: gkehubfeature-full-acm-${uniqueId}
location: global
membershipLocation: global
membershipLocation: us-central1
membershipRef:
name: gkehubmembership-full-acm-${uniqueId}
projectRef:
Expand Down
Loading

0 comments on commit 8fe8c6d

Please sign in to comment.