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

DO NOT MERGE #2702

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

hankfreund
Copy link
Member

No description provided.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign justinsb for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -247,7 +71,7 @@ X-Xss-Protection: 0
{
"error": {
"code": 404,
"message": "Resource 'projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127' was not found",
"message": "cluster not found",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you update the MockGCP to match this message?

Comment on lines 142 to +172
"endTime": "2024-04-01T12:34:56.123456Z",
"target": "projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127",
"target": "projects/${projectNumber}/locations/us-west1/attachedClusters/kcc-attached-cluster-127",
"verb": "create"
},
"name": "projects/${projectId}/locations/us-west1/operations/${operationID}",
"name": "projects/${projectNumber}/locations/us-west1/operations/${operationID}",
"response": {
"@type": "type.googleapis.com/google.cloud.gkemulticloud.v1.AttachedCluster",
"binaryAuthorization": {
"evaluationMode": "DISABLED"
},
"createTime": "2024-04-01T12:34:56.123456Z",
"description": "Test attached cluster",
"distribution": "eks",
"etag": "abcdef0123A=",
"fleet": {
"membership": "projects/${projectNumber}/locations/global/memberships/kcc-attached-cluster-127",
"project": "projects/${projectNumber}"
},
"kubernetesVersion": "1.28",
"loggingConfig": {},
"name": "projects/${projectId}/locations/us-west1/attachedClusters/kcc-attached-cluster-127",
"monitoringConfig": {
"managedPrometheusConfig": {}
},
"name": "projects/${projectNumber}/locations/us-west1/attachedClusters/kcc-attached-cluster-127",
"oidcConfig": {
"issuerUrl": "https://oidc.eks.us-west-2.amazonaws.com/id/A115FE1C770C2452C75219524036FC0F"
},
"platformVersion": "1.27.0-gke.2",
"state": "RUNNING"
"state": "RUNNING",
"uid": "111111111111111111111",
"updateTime": "2024-04-01T12:34:56.123456Z"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you update the MockGCP to match the response metadata? This is important for KCC to monitor the GCP service behavior and maintain the available features (etag, updateTime, etc).

Comment on lines +227 to +229
"binaryAuthorization": {
"evaluationMode": "DISABLED"
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto: Could you update the mockgcp to match the real GCP for this field? We want to guardrail the default values given from the GCP service (otherwise KCC could overrule this)

Comment on lines +23 to +26
# organizationRef:
# external: ${TEST_ORG_ID}
folderRef:
external: "182571047842"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could ignore the change here.

Comment on lines +55 to +60
createTime: "1970-01-01T00:00:00Z"
kubernetesVersion: "1.28"
observedGeneration: 2
state: RUNNING
uid: "12345678"
updateTime: "1970-01-01T00:00:00Z"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We want to update the merge-in code to reflect this part, this is important for KCC to maintain the resource and align the expected behavior with the GCP service.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can ignore the logs related to Project and Folder, but for http logs related to the attachedCluster resource, we need to make sure the HTTP response and metadata matches the real GCP record (otherwise, KCC could easily override and miss the default values handling and overrule some feature related behavior like timestamp checking).

If you can fix the project/folder log, that would be a bonus! You only need to replace the spec.projectRef.name to spec.projectRef.external, and no dependencies.yaml any more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants