GoogleCloudPlatform / k8s-config-connector

GCP Config Connector, a Kubernetes add-on for managing GCP resources
https://cloud.google.com/config-connector/docs/overview
Apache License 2.0
890 stars 218 forks source link

CloudSQL private network broken #124

Closed owenhaynes closed 4 years ago

owenhaynes commented 4 years ago

Trying to create a instance with the following

apiVersion: sql.cnrm.cloud.google.com/v1beta1
kind: SQLInstance
metadata:
  name: test
  annotations:
    cnrm.cloud.google.com/project-id: {{project}}
spec:
  databaseVersion: POSTGRES_10
  region: europe-west1
  settings:
    activationPolicy: ALWAYS
    tier: db-custom-1-3840
    availabilityType: ZONAL
    diskType: PD_SSD
    diskSize: 10
    backupConfiguration:
      enabled: true
      startTime: '18:00'
    ipConfiguration:
      ipv4Enabled: true
      privateNetworkRef:
        external: projects/{{project}}/global/networks/{{networkname}}

Keep getting timeout requests in the describe of Update call failed: error applying desired state: Error, failed to create instance test: googleapi: Error 409: The instance or operation is not in an appropriate state to handle the request., invalidState

The cnrm-controller-manager-0 has no interesting logs of any use. The activity centre also records failure with 500 UNKNOWN.

It is something to do with the ipConfiguration as if i remove this all is fine. Something must of broken with private network ref

kibbles-n-bytes commented 4 years ago

Hey @owenhaynes , I was able to use your YAML to successfully create a SQL instance in my project. We have seen this error message before due to instance names being reserved for up to a week. Could you try creating a new instance with the same YAML but a different name, and let us know if you see this same error message still? We are looking into what we can do to get a clearer message for this particular case.

owenhaynes commented 4 years ago

@kibbles-n-bytes Used all sorts of instance names, and just tired again with a different name and same error. Can create using the console. They one thing different according to the GCP activity is the console specifies the back-end type as type 2. Which I think that is the default?

owenhaynes commented 4 years ago

ok working now, after a left it over night. strange