crossplane-contrib / provider-upjet-gcp

Official GCP Provider for Crossplane by Upbound.
Apache License 2.0
63 stars 68 forks source link

container: creating a `Cluster` with `enableAutopilot: true` leads to refresh failures #256

Closed djeremiah closed 1 year ago

djeremiah commented 1 year ago

What happened?

How can we reproduce it?

Configure provider-gcp as usual, then deploy a simple autopilot-based cluster

apiVersion: container.gcp.upbound.io/v1beta1
kind: Cluster
metadata:
  name: cluster-autopilot
spec:
  forProvider:
    location: europe-north1
    enableAutopilot: true
    ipAllocationPolicy: 
    - {}

The cluster provisions successfully, however during reconciliation, observe fails with a large number of conflicting configurations:

Status:
  At Provider:
  Conditions:
    Last Transition Time:  2023-03-16T12:08:35Z
    Reason:                Creating
    Status:                False
    Type:                  Ready
    Last Transition Time:  2023-03-16T12:47:43Z
    Message:               observe failed: cannot run refresh: refresh failed: Conflicting configuration arguments: "addons_config.0.dns_cache_config": conflicts with enable_autopilot
Conflicting configuration arguments: "addons_config.0.network_policy_config": conflicts with enable_autopilot
Conflicting configuration arguments: "addons_config.0.gcp_filestore_csi_driver_config": conflicts with enable_autopilot
Conflicting configuration arguments: "default_max_pods_per_node": conflicts with enable_autopilot
Conflicting configuration arguments: "enable_shielded_nodes": conflicts with enable_autopilot
Conflicting configuration arguments: "enable_intranode_visibility": conflicts with enable_autopilot
Conflicting configuration arguments: "cluster_autoscaling.0.enabled": conflicts with enable_autopilot
Conflicting configuration arguments: "cluster_autoscaling.0.resource_limits": conflicts with enable_autopilot
Conflicting configuration arguments: "network_policy": conflicts with enable_autopilot
Conflicting configuration arguments: "workload_identity_config": conflicts with enable_autopilot

What environment did it happen in?

pkrishnath commented 1 year ago

I think we need an option to set late initialisers via configmap https://github.com/crossplane/terrajet/blob/main/docs/configuring-a-resource.md#late-initialization-configuration

svscheg commented 1 year ago

Fix PR: https://github.com/upbound/provider-gcp/pull/258