-
Notifications
You must be signed in to change notification settings - Fork 293
Description
Checklist
- I did not find a related open issue.
- I did not find a solution in the troubleshooting guide: (https://cloud.google.com/config-connector/docs/troubleshooting)
- If this issue is time-sensitive, I have submitted a corresponding issue with GCP support.
Bug Description
I found the following when trying to reference a PubSubSchema from a PubSubTopic:
- the 'schemaSettings.encoding' attribute is defined as optional, however the resource fails to deploy unless specified (API error)
- the 'schemaSettings.encoding' attribute is listed as having a default value of 'ENCODING_UNSPECIFIED', however the resource fails to deploy unless specified (API error)
- child attributes of 'schemaSettings' are immutable, but not documented as such.
- 'schemaSettings' cannot be added after a topic has been deployed
Additional Diagnostic Information
na
Kubernetes Cluster Version
v1.22.10-gke.600
Config Connector Version
1.90.0
Config Connector Mode
namespaced mode (default)
Log Output
schemaSettings.encoding not specified:
Update call failed: error applying desired state: summary: Error creating Topic: googleapi: Error 400: Schema settings for the topic projects/project/topics/pubsubtopic-example must include both the name and the encoding.
schemaSettings.encoding set to ENCODING_UNSPECIFIED:
Update call failed: error applying desired state: summary: Error creating Topic: googleapi: Error 400: Schema settings for the topic projects/project/topics/pubsubtopic-example must include both the name and the encoding.
updating any values under schemaSettings:
Update call failed: error applying desired state: summary: Error updating Topic "projects/project/topics/pubsubtopic-example0": googleapi: Error 400: Invalid update_mask provided in the UpdateTopicRequest: the 'schema_settings' field in the Topic is not mutable.
Steps to reproduce the issue
noted in description
YAML snippets
# encoding attribute not defined
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
name: pubsubtopic-example
spec:
schemaSettings:
schemaRef:
name: pubsubschema-sample
# encoding value set to ENCODING_UNSPECIFIED
---
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
name: pubsubtopic-example
spec:
schemaSettings:
encoding: ENCODING_UNSPECIFIED
schemaRef:
name: pubsubschema-sample