Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFunction Event trigger failure policy being updated #3429

Open
3 tasks done
kaldvelski opened this issue Dec 19, 2024 · 0 comments
Open
3 tasks done

CloudFunction Event trigger failure policy being updated #3429

kaldvelski opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kaldvelski
Copy link

Checklist

Bug Description

I am creating a CloudFunctionsFunction where I specify a failurePolicy of false for the event trigger.
While the function is successfully created and with a Retry on failure setting of "Function won't be automatically retried on failure", in the logs for the Config connector I'm seeing errors what appear to be trying to set the failurePolicy to true, an operation that fails because it is an immutable field.
My resource is annotated with cnrm.cloud.google.com/reconcile-interval-in-seconds: 0 and cnrm.cloud.google.com/management-conflict-prevention-policy: "none" so I'm surprised it's trying to reconcile the function anyway.
The function works but I would just like my logs not to be cluttered with this error message.

Additional Diagnostic Information

Error message "infeasible update: ({true <nil> EventTrigger.FailurePolicy}) would require recreation"

Kubernetes Cluster Version

v1.30.5-gke.1014001

Config Connector Version

1.111.0

Config Connector Mode

namespaced mode (default)

Log Output

{
  "insertId": "7aebu77prnixmesl",
  "jsonPayload": {
    "msg": "error applying desired state",
    "logger": "cloudfunctionsfunction-controller",
    "error": "infeasible update: ({true <nil> EventTrigger.FailurePolicy}) would require recreation",
    "timestamp": "2024-12-10T14:50:50.274Z",
    "resource": {
      "name": "fed-mig-test-pos-generator-fn",
      "namespace": "olm-rd"
    }
  },
  "resource": {
    "type": "k8s_container",
    "labels": {
      "project_id": "olm-services",
      "namespace_name": "cnrm-system",
      "container_name": "manager",
      "location": "europe-west2",
      "cluster_name": "olmccc",
      "pod_name": "cnrm-controller-manager-mb36apot6scn2vhokn3q-0"
    }
  },
  "timestamp": "2024-12-10T14:50:50.274557092Z",
  "severity": "ERROR",
  "labels": {
    "k8s-pod/cnrm_cloud_google_com/system": "true",
    "compute.googleapis.com/resource_name": "gke-olmccc-pool-1-a653ca53-qkng",
    "k8s-pod/statefulset_kubernetes_io/pod-name": "cnrm-controller-manager-mb36apot6scn2vhokn3q-0",
    "k8s-pod/controller-revision-hash": "cnrm-controller-manager-mb36apot6scn2vhokn3q-6d77475949",
    "k8s-pod/cnrm_cloud_google_com/scoped-namespace": "olm-rd",
    "k8s-pod/cnrm_cloud_google_com/component": "cnrm-controller-manager"
  },
  "logName": "projects/olm-services/logs/stdout",
  "receiveTimestamp": "2024-12-10T14:50:53.933007239Z"
}

### Steps to reproduce the issue

Resource of kind `CloudFunctionsFunction` with `eventTrigger.failurePolicy` of `false`

### YAML snippets

```YAML
apiVersion: cloudfunctions.cnrm.cloud.google.com/v1beta1
kind: CloudFunctionsFunction
metadata: 
  name: my-fn
  annotations:
    cnrm.cloud.google.com/management-conflict-prevention-policy: "none"
    cnrm.cloud.google.com/reconcile-interval-in-seconds: "0"
spec:
  ...
  eventTrigger:
    eventType: providers/cloud.pubsub/eventTypes/topic.publish
    resourceRef:
      external: "projects/proj/topics/me"
    failurePolicy: false
    service: pubsub.googleapis.com
@kaldvelski kaldvelski added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant