Skip to content

Commit

Permalink
Update testdata to use direct controller instead
Browse files Browse the repository at this point in the history
  • Loading branch information
maqiuyujoyce committed Dec 13, 2024
1 parent 63e4f7c commit 2b857bd
Show file tree
Hide file tree
Showing 17 changed files with 160 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
annotations:
alpha.cnrm.cloud.google.com/reconciler: direct
cnrm.cloud.google.com/management-conflict-prevention-policy: none
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: alloydbinstance-${uniqueId}
Expand All @@ -22,7 +22,6 @@ spec:
name: alloydbcluster-${uniqueId}
machineConfig:
cpuCount: 2
resourceID: alloydbinstance-${uniqueId}
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
Expand All @@ -31,9 +30,10 @@ status:
status: "True"
type: Ready
createTime: "1970-01-01T00:00:00Z"
externalRef: //alloydb.googleapis.com/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}
ipAddress: 10.1.2.3
name: projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}
observedGeneration: 3
observedGeneration: 2
state: READY
uid: "12345678"
updateTime: "1970-01-01T00:00:00Z"
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,10 @@ X-Xss-Protection: 0

---

GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json
GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?%24alt=json%3Benum-encoding%3Dint
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Fclusters%2Falloydbcluster-${uniqueId}%2Finstances%2Falloydbinstance-${uniqueId}

404 Not Found
Cache-Control: private
Expand All @@ -790,13 +791,14 @@ X-Xss-Protection: 0

---

POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances?alt=json&instanceId=alloydbinstance-${uniqueId}
POST https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances?%24alt=json%3Benum-encoding%3Dint&instanceId=alloydbinstance-${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: parent=projects%2F${projectId}%2Flocations%2Feurope-west1%2Fclusters%2Falloydbcluster-${uniqueId}

{
"availabilityType": "REGIONAL",
"instanceType": "PRIMARY",
"availabilityType": 2,
"instanceType": 1,
"labels": {
"cnrm-test": "true",
"managed-by-cnrm": "true"
Expand Down Expand Up @@ -832,9 +834,10 @@ X-Xss-Protection: 0

---

GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/operations/${operationID}?alt=json
GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/operations/${operationID}
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Foperations%2F${operationID}

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

---

GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json
GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?%24alt=json%3Benum-encoding%3Dint
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Fclusters%2Falloydbcluster-${uniqueId}%2Finstances%2Falloydbinstance-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -929,15 +933,15 @@ X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"availabilityType": "REGIONAL",
"availabilityType": 2,
"clientConnectionConfig": {
"sslConfig": {
"sslMode": "ENCRYPTED_ONLY"
"sslMode": 5
}
},
"createTime": "2024-04-01T12:34:56.123456Z",
"geminiConfig": {},
"instanceType": "PRIMARY",
"instanceType": 1,
"ipAddress": "10.1.2.3",
"labels": {
"cnrm-test": "true",
Expand Down Expand Up @@ -970,7 +974,7 @@ X-Xss-Protection: 0
"recordClientAddress": false
},
"reconciling": false,
"state": "READY",
"state": 1,
"uid": "111111111111111111111",
"updateTime": "2024-04-01T12:34:56.123456Z",
"writableNode": {
Expand All @@ -980,22 +984,26 @@ X-Xss-Protection: 0

---

PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json&updateMask=databaseFlags
PATCH https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?%24alt=json%3Benum-encoding%3Dint&updateMask=databaseFlags
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: instance.name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Fclusters%2Falloydbcluster-${uniqueId}%2Finstances%2Falloydbinstance-${uniqueId}

{
"availabilityType": "REGIONAL",
"availabilityType": 2,
"databaseFlags": {
"enable_google_adaptive_autovacuum": "off"
},
"instanceType": 1,
"labels": {
"cnrm-test": "true",
"managed-by-cnrm": "true"
},
"machineConfig": {
"cpuCount": 2
}
},
"name": "projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}",
"reconciling": false
}

200 OK
Expand Down Expand Up @@ -1024,9 +1032,10 @@ X-Xss-Protection: 0

---

GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/operations/${operationID}?alt=json
GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/operations/${operationID}
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Foperations%2F${operationID}

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

---

GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json
GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?%24alt=json%3Benum-encoding%3Dint
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Fclusters%2Falloydbcluster-${uniqueId}%2Finstances%2Falloydbinstance-${uniqueId}

200 OK
Cache-Control: private
Expand All @@ -1124,18 +1134,18 @@ X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"availabilityType": "REGIONAL",
"availabilityType": 2,
"clientConnectionConfig": {
"sslConfig": {
"sslMode": "ENCRYPTED_ONLY"
"sslMode": 5
}
},
"createTime": "2024-04-01T12:34:56.123456Z",
"databaseFlags": {
"enable_google_adaptive_autovacuum": "off"
},
"geminiConfig": {},
"instanceType": "PRIMARY",
"instanceType": 1,
"ipAddress": "10.1.2.3",
"labels": {
"cnrm-test": "true",
Expand Down Expand Up @@ -1168,7 +1178,7 @@ X-Xss-Protection: 0
"recordClientAddress": false
},
"reconciling": false,
"state": "READY",
"state": 1,
"uid": "111111111111111111111",
"updateTime": "2024-04-01T12:34:56.123456Z",
"writableNode": {
Expand All @@ -1178,9 +1188,10 @@ X-Xss-Protection: 0

---

DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?alt=json
DELETE https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/clusters/alloydbcluster-${uniqueId}/instances/alloydbinstance-${uniqueId}?%24alt=json%3Benum-encoding%3Dint
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Fclusters%2Falloydbcluster-${uniqueId}%2Finstances%2Falloydbinstance-${uniqueId}

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

---

GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/operations/${operationID}?alt=json
GET https://alloydb.googleapis.com/v1beta/projects/${projectId}/locations/europe-west1/operations/${operationID}
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: name=projects%2F${projectId}%2Flocations%2Feurope-west1%2Foperations%2F${operationID}

200 OK
Cache-Control: private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
name: alloydbinstance-${uniqueId}
spec:
clusterRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
name: alloydbinstance-${uniqueId}
spec:
clusterRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
annotations:
alpha.cnrm.cloud.google.com/reconciler: direct
cnrm.cloud.google.com/management-conflict-prevention-policy: none
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: alloydbinstance-2-${uniqueId}
Expand All @@ -22,7 +22,6 @@ spec:
name: alloydbcluster-2-${uniqueId}
machineConfig:
cpuCount: 2
resourceID: alloydbinstance-2-${uniqueId}
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
Expand All @@ -31,9 +30,10 @@ status:
status: "True"
type: Ready
createTime: "1970-01-01T00:00:00Z"
externalRef: //alloydb.googleapis.com/projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}
ipAddress: 10.1.2.3
name: projects/${projectId}/locations/europe-west2/clusters/alloydbcluster-2-${uniqueId}/instances/alloydbinstance-2-${uniqueId}
observedGeneration: 3
observedGeneration: 2
state: READY
uid: "12345678"
updateTime: "1970-01-01T00:00:00Z"
Loading

0 comments on commit 2b857bd

Please sign in to comment.