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

Update installation documentation to handle kube object removal #6668

Closed
lbernick opened this issue May 16, 2023 · 12 comments
Closed

Update installation documentation to handle kube object removal #6668

lbernick opened this issue May 16, 2023 · 12 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. Hacktoberfest Categorizes issue as one for Hacktoberfest 2021 help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@lbernick
Copy link
Member

lbernick commented May 16, 2023

Our installation documentation instructs users to use kubectl apply. However, if a release of Pipelines removes an object in the config folder, kubectl apply will not remove this object from clusters that are upgrading their Pipelines version. For example, we removed the Run CRD, but the CRD runs.tekton.dev may still be present on clusters that have upgraded (it's still present on the dogfood cluster).

We should update our documentation to instruct users to install Pipelines w/ kubectl replace, or some other option that will remove Tekton config objects that are no longer present. The Tekton operator may need similar changes as well, but this should be tracked separately.

Note: It is unclear whether kubectl apply will correctly handle changes to the storage version of CRDs. kubectl apply will update any existing CRD definitions; however, the docs make it a bit unclear how these changes are merged:

The following is an example procedure to upgrade from v1beta1 to v1.

Set v1 as the storage in the CustomResourceDefinition file and apply it using kubectl. The storedVersions is now v1beta1, v1.
Write an upgrade procedure to list all existing objects and write them with the same content. This forces the backend to write objects in the current storage version, which is v1.
Remove v1beta1 from the CustomResourceDefinition status.storedVersions field.

cc @vdemeester

@lbernick lbernick added the kind/documentation Categorizes issue or PR as related to documentation. label May 16, 2023
@vdemeester
Copy link
Member

We should update our documentation to instruct users to install Pipelines w/ kubectl release, or some other option that will remove Tekton config objects that are no longer present. The Tekton operator may need similar changes as well, but this should be tracked separately.

Shouldn't it be kubectl replace 😛 ?

@lbernick
Copy link
Member Author

yes thanks :)

@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 22, 2023
@vdemeester
Copy link
Member

/lifecycle frozen

@tekton-robot tekton-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 22, 2023
@vdemeester vdemeester added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Aug 22, 2023
@afrittoli afrittoli added the Hacktoberfest Categorizes issue as one for Hacktoberfest 2021 label Oct 4, 2023
@JGustafsonIII
Copy link
Contributor

/assign jgustafsoniii

@JGustafsonIII
Copy link
Contributor

When running kubectl replace it appears to error out with the messages below

Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": serviceaccounts "tekton-pipelines-controller" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": serviceaccounts "tekton-pipelines-webhook" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": serviceaccounts "tekton-events-controller" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "clustertasks.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "customruns.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "pipelines.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "pipelineruns.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "resolutionrequests.resolution.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "tasks.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "taskruns.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": customresourcedefinitions.apiextensions.k8s.io "verificationpolicies.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": secrets "webhook-certs" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": validatingwebhookconfigurations.admissionregistration.k8s.io "validation.webhook.pipeline.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "webhook.pipeline.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": validatingwebhookconfigurations.admissionregistration.k8s.io "config.webhook.pipeline.tekton.dev" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-defaults" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-events" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "feature-flags" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "pipelines-info" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-leader-election" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-logging" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-observability" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-registry-cert" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-spire" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-tracing" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": deployments.apps "tekton-pipelines-controller" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": deployments.apps "tekton-events-controller" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines-resolvers" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines-resolvers" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": serviceaccounts "tekton-pipelines-resolvers" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines-resolvers" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "bundleresolver-config" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "cluster-resolver-config" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "resolvers-feature-flags" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-leader-election" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-logging" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "config-observability" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "git-resolver-config" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": configmaps "hubresolver-config" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": deployments.apps "tekton-pipelines-remote-resolvers" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines-resolvers" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": horizontalpodautoscalers.autoscaling "tekton-pipelines-webhook" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": deployments.apps "tekton-pipelines-webhook" not found
Error from server (NotFound): error when replacing "https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml": namespaces "tekton-pipelines" not found```

@afrittoli
Copy link
Member

We could mention here that the install guide is meant for a quickstart with Tekton but not meant for production use.
We could refer to the operator for that https://github.com/tektoncd/operator

@JGustafsonIII
Copy link
Contributor

@afrittoli I ran some tests starting off with v0.46.0 and then tried replace --force and apply --force to see if runs.tekton.dev would disappear but it never did. This was a suggestion from @pritidesai. I agree that the quick start should mention that its not for production use. What should the upgrade steps be if you are upgrading from an older version?

@pritidesai
Copy link
Member

@JGustafsonIII, we had discussion this morning in the API WG, the conclusion of this discussion was to add a note in the installation section first bullet:

Note: these instructions are ideal as a quick start installation guide with Tekton Pipelines and not meant for the production use. Please refer to the [operator](https://github.com/tektoncd/operator) to install, upgrade and manage Tekton projects.    

@JGustafsonIII
Copy link
Contributor

Thank you, I will update the doc and submit a PR.

@dibyom
Copy link
Member

dibyom commented Oct 18, 2023

I think this can be closed now @JGustafsonIII ?

@JGustafsonIII
Copy link
Contributor

@dibyom Yes this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. Hacktoberfest Categorizes issue as one for Hacktoberfest 2021 help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

7 participants