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

Eventually drop spec.preserveUnknownFields from vended manifests #1272

Open
rmorampudi opened this issue Jun 11, 2021 · 5 comments
Open

Eventually drop spec.preserveUnknownFields from vended manifests #1272

rmorampudi opened this issue Jun 11, 2021 · 5 comments
Labels
enhancement New feature or request no-issue-activity workaround There's a workaround, might not be great, but exists works-for-me Works as intended, or unable to reproduce

Comments

@rmorampudi
Copy link
Contributor

Summary

What happened/what you expected to happen?

When we re-deploy the manifests for rollouts, for version later to v1.0.0-rc1, the manifests are expected to be marked as unchanged, but it's marked as configured instead, for the crds

1st time deployment
customresourcedefinition.apiextensions.k8s.io/analysisruns.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/analysistemplates.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/clusteranalysistemplates.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/experiments.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io created
serviceaccount/argo-rollouts created
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-admin created
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-edit created
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-view created
clusterrole.rbac.authorization.k8s.io/argo-rollouts-clusterrole created
clusterrolebinding.rbac.authorization.k8s.io/argo-rollouts-clusterrolebinding created
service/argo-rollouts-metrics created
deployment.apps/argo-rollouts created

2nd time deployment 

customresourcedefinition.apiextensions.k8s.io/analysisruns.argoproj.io configured
customresourcedefinition.apiextensions.k8s.io/analysistemplates.argoproj.io configured
customresourcedefinition.apiextensions.k8s.io/clusteranalysistemplates.argoproj.io configured
customresourcedefinition.apiextensions.k8s.io/experiments.argoproj.io configured
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io configured
serviceaccount/argo-rollouts unchanged
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-admin unchanged
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-edit unchanged
clusterrole.rbac.authorization.k8s.io/argo-rollouts-aggregate-to-view unchanged
clusterrole.rbac.authorization.k8s.io/argo-rollouts-clusterrole unchanged
clusterrolebinding.rbac.authorization.k8s.io/argo-rollouts-clusterrolebinding unchanged
service/argo-rollouts-metrics unchanged
deployment.apps/argo-rollouts unchanged

Diagnostics

What version of Argo Rollouts are you running?
v1.0.0-rc1 and later versions

# Paste the logs from the rollout controller

# Logs for the entire controller:
kubectl logs -n argo-rollouts deployment/argo-rollouts

# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME>

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@rmorampudi rmorampudi added the bug Something isn't working label Jun 11, 2021
@jessesuen
Copy link
Member

jessesuen commented Jun 11, 2021

This behavior is expected and is a side effect of explicitly setting spec.preserveUnknownFields: false, which is the new default in v1 CRDs. You can read why we needed to set this to false in release notes and issues:

https://github.com/argoproj/argo-rollouts/releases/tag/v1.0.0
#1069
#1067

The workaround is to remove spec.preserveUnknownFields from the manifests. But we cannot do this in the official manifests because we need to allow smooth upgrades from v1beta1 CRDs.

@jessesuen jessesuen added workaround There's a workaround, might not be great, but exists works-for-me Works as intended, or unable to reproduce and removed bug Something isn't working labels Jun 11, 2021
@jessesuen
Copy link
Member

But we cannot do this in the official manifests because we need to allow smooth upgrades from v1beta1 CRDs.

Note that we eventually should remove spec.preserveUnknownFields, when we reach v1.2 or v1.3 (whenever we don't support upgrades from pre-v1.0). For that reason, I'll keep this open as an enhancement.

@jessesuen jessesuen reopened this Jun 11, 2021
@jessesuen jessesuen added the enhancement New feature or request label Jun 11, 2021
@jessesuen jessesuen changed the title Re-deploying the manifests after v1.0.0-rc1 is marking the crds as configured instead of unchanged Eventually drop spec.preserveUnknownFields from vended manifests Jun 11, 2021
@huikang
Copy link
Member

huikang commented Jun 17, 2021

Hi, @jessesuen , thanks for the workaround. It worked for me.

# Prior to removing preserveUnknownFields: false
kubectl apply -f ./manifests/crds/rollout-crd.yaml
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io configured
hui.kang@huikang-ltmcwnv argo-rollouts-backup2 % kubectl apply -f ./manifests/crds/rollout-crd.yaml
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io configured

# After removing preserveUnknownFields: false, applying the crd twice shows `unchanged`

hui.kang@huikang-ltmcwnv argo-rollouts-backup2 % kubectl apply -f ./manifests/crds/rollout-crd.yaml
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io unchanged
hui.kang@huikang-ltmcwnv argo-rollouts-backup2 % kubectl apply -f ./manifests/crds/rollout-crd.yaml
customresourcedefinition.apiextensions.k8s.io/rollouts.argoproj.io unchanged

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

This issue is stale because it has been open 60 days with no activity.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2023

This issue is stale because it has been open 60 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-issue-activity workaround There's a workaround, might not be great, but exists works-for-me Works as intended, or unable to reproduce
Projects
None yet
Development

No branches or pull requests

3 participants