Skip to content

Commit

Permalink
Migrate compute target TCP proxy(global) to direct controller
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Nov 6, 2024
1 parent 69a4352 commit 5263b11
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 60 deletions.
2 changes: 1 addition & 1 deletion dev/tasks/run-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [[ -z "${KUBEBUILDER_ASSETS:-}" ]]; then
fi

if [[ -z "${KCC_USE_DIRECT_RECONCILERS:-}" ]]; then
KCC_USE_DIRECT_RECONCILERS=ComputeForwardingRule,GKEHubFeatureMembership,SecretManagerSecret
KCC_USE_DIRECT_RECONCILERS=ComputeForwardingRule,ComputeTargetTCPProxy,GKEHubFeatureMembership,SecretManagerSecret
fi
echo "Using direct controllers: $KCC_USE_DIRECT_RECONCILERS"
export KCC_USE_DIRECT_RECONCILERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

404 Not Found
Cache-Control: private
Expand Down Expand Up @@ -455,15 +456,16 @@ X-Xss-Protection: 0

---

POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json
POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}

{
"description": "test description",
"name": "computetargettcpproxy-${uniqueId}",
"proxyHeader": "NONE",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

200 OK
Expand Down Expand Up @@ -494,8 +496,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -526,9 +530,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -549,14 +554,15 @@ X-Xss-Protection: 0
"name": "computetargettcpproxy-${uniqueId}",
"proxyHeader": "NONE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId}

404 Not Found
Cache-Control: private
Expand Down Expand Up @@ -585,15 +591,16 @@ X-Xss-Protection: 0

---

POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json
POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}

{
"description": "other test description",
"name": "computetargettcpproxy2-${uniqueId}",
"proxyHeader": "NONE",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

200 OK
Expand Down Expand Up @@ -624,8 +631,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -656,9 +665,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -679,7 +689,7 @@ X-Xss-Protection: 0
"name": "computetargettcpproxy2-${uniqueId}",
"proxyHeader": "NONE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

---
Expand Down Expand Up @@ -1137,9 +1147,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -1160,14 +1171,15 @@ X-Xss-Protection: 0
"name": "computetargettcpproxy2-${uniqueId}",
"proxyHeader": "NONE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

---

DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}?alt=json
DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy2-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy2-${uniqueId}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -1197,8 +1209,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -1229,9 +1243,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -1252,14 +1267,15 @@ X-Xss-Protection: 0
"name": "computetargettcpproxy-${uniqueId}",
"proxyHeader": "NONE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

---

DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -1289,8 +1305,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
cnrm.cloud.google.com/project-id: ${projectId}
cnrm.cloud.google.com/state-into-spec: absent
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
generation: 3
generation: 2
labels:
cnrm-test: "true"
name: computetargettcpproxy-${uniqueId}
Expand All @@ -17,7 +16,6 @@ spec:
backendServiceRef:
name: computebackendservice-${uniqueId}
proxyHeader: PROXY_V1
resourceID: computetargettcpproxy-${uniqueId}
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
Expand All @@ -26,6 +24,7 @@ status:
status: "True"
type: Ready
creationTimestamp: "1970-01-01T00:00:00Z"
observedGeneration: 3
externalRef: projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
observedGeneration: 2
proxyId: 1111111111111111
selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

404 Not Found
Cache-Control: private
Expand Down Expand Up @@ -249,14 +250,15 @@ X-Xss-Protection: 0

---

POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies?alt=json
POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}

{
"name": "computetargettcpproxy-${uniqueId}",
"proxyHeader": "NONE",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

200 OK
Expand Down Expand Up @@ -287,8 +289,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -319,9 +323,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -341,14 +346,15 @@ X-Xss-Protection: 0
"name": "computetargettcpproxy-${uniqueId}",
"proxyHeader": "NONE",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

---

POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}/setProxyHeader?alt=json
POST https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}/setProxyHeader
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

{
"proxyHeader": "PROXY_V1"
Expand Down Expand Up @@ -382,8 +388,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -414,9 +422,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -436,14 +445,15 @@ X-Xss-Protection: 0
"name": "computetargettcpproxy-${uniqueId}",
"proxyHeader": "PROXY_V1",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}",
"service": "projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
"service": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/backendServices/computebackendservice-${uniqueId}"
}

---

DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}?alt=json
DELETE https://compute.googleapis.com/compute/v1/projects/${projectId}/global/targetTcpProxies/computetargettcpproxy-${uniqueId}
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&target_tcp_proxy=computetargettcpproxy-${uniqueId}

200 OK
Cache-Control: private
Expand Down Expand Up @@ -473,8 +483,10 @@ X-Xss-Protection: 0

---

GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}?alt=json&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}
Content-Type: application/json
User-Agent: kcc/controller-manager
x-goog-request-params: project=${projectId}&operation=${operationID}

200 OK
Cache-Control: private
Expand Down

0 comments on commit 5263b11

Please sign in to comment.