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

Unable to remove LifecycleRule from GCS Resources #554

Closed
3 tasks done
joepeterson-bestbuy opened this issue Sep 22, 2021 · 6 comments
Closed
3 tasks done

Unable to remove LifecycleRule from GCS Resources #554

joepeterson-bestbuy opened this issue Sep 22, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@joepeterson-bestbuy
Copy link

Checklist

Bug Description

We're unable to remove Lifecycle Rules from GCS resources. When attempting to update a GCS resource in order to remove a Lifecycle Rule, the following behaviors are observed:

  1. After deleting the Lifecycle Rule from the configuration, it no longer appears in the release manifest. However, it still appears when describing the GCS bucket resource or when viewing it through the GCP console.
  2. It is possible to update the Lifecycle Rule. For instance, we can change the type from "SetStorageClass" to "Delete", but cannot remove the Lifecycle Rule from a GCS resource in its entirety after it's been added.

Additional Diagnostic Information

Kubernetes Cluster Version

Client Version: v1.19.4
Server Version: v1.18.20-gke.901

Config Connector Version

1.60.0

Steps to Reproduce

Steps to reproduce the issue

  1. Deploy a GCS bucket with a Lifecycle Rule configured.
  2. Remove all Lifecycle Rules from the configuration file.
  3. The GCS bucket will fail to remove the Lifecycle Rule.

YAML snippets

  {{- if .lifecycle_rules }}
  lifecycleRule:
    {{- range .lifecycle_rules }}
    - action:
      {{- if .storage_class }}
        storageClass: {{ .storage_class }}
      {{- end }}
        type: {{ .type }}
      condition:
        {{ .condition_type }}: {{ .condition_value }}
    {{- end }}
  {{- end }}
@joepeterson-bestbuy joepeterson-bestbuy added the bug Something isn't working label Sep 22, 2021
@jcanseco
Copy link
Member

Hi @joepeterson-bestbuy, if you are deleting the lifecycleRule field from your YAML entirely, then what that is actually doing is telling KCC to let the field be "externally-managed" (i.e. that you don't hold an opinion on the field anymore and are allowing it to just reflect whatever value is on GCP).

If you want to clear the list, you can do so by setting it to an empty list like so: lifecycleRule: []

@joepeterson-bestbuy
Copy link
Author

Thank you @jcanseco

@kishorviswanathan
Copy link

@jcanseco I have the same issue. Also when setting lifecycleRule: [], I am getting the following error:

Warning  UpdateFailed  9s (x3 over 11s)   storagebucket-controller  Update call failed: error expanding resource configuration: cannot interpret non-list as list

Version information:

Client Version: v1.19.2
Server Version: v1.21.5-gke.1302

Config Connector: 1.63.0
Mode: namespaced

@jcanseco
Copy link
Member

Hey @kishorv06, I apologize for having missed your comment. Please don't hesitate to post follow-up comments to ping us in case you have not gotten a response in suitable time.

It seems a new issue has been raised on that same topic in #595. Let us continue the discussion there.

@kishorviswanathan
Copy link

kishorviswanathan commented Jan 21, 2022

Hey @jcanseco,

Thank you for the update.

Please don't hesitate to post follow-up comments to ping us in case you have not gotten a response in suitable time.

Yeah sure, I will do that in future. However in this particular case, we have already raised this issue, along with a few others, internally through our organization's point of contact at GCP.

@jcanseco
Copy link
Member

Ah I see, thanks @kishorv06. Unfortunately, it didn't reach us through GCP support for some reason. Either it got dropped somewhere or I just can't find it, so I apologize about that.

In any case, we're taking a look at the issue and seeing what we find.

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

3 participants