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

Change k8s API removals from error to warning #1475

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

lblackstone
Copy link
Member

@lblackstone lblackstone commented Feb 20, 2021

Proposed changes

The provider checks for deprecated and removed API
versions of k8s resources to provide clearer messages
for affected APIs. These messages are intended to be
informational, and should not block the deployment of
a resource if the cluster accepts it. To avoid inadvertently
failing a deployment when the upstream removal version
has changed, print a warning rather than returning an error.

Here's what this looks like now for a removed API:

Preview

warning: apiVersion "extensions/v1beta1/Deployment" was removed in Kubernetes 1.16. Use "apps/v1/Deployment" instead.
See https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals for more information.

(This previously would have returned an error)

Update

error: resource scale-test was not successfully created by the Kubernetes API server : apiVersion "extensions/v1beta1/Deployment" was removed in Kubernetes 1.16. Use "apps/v1/Deployment" instead.
See https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals for more information.

(An error is returned, but it's only after the cluster reported that the resource was not available.)

Related issues (optional)

Related to #1388

The provider checks for deprecated and removed API
versions of k8s resources to provide clearer messages
for affected APIs. These messages are intended to be
informational, and should not block the deployment of
a resource if the cluster accepts it. To avoid inadvertently
failing a deployment when the upstream removal version
has changed, print a warning rather than returning an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants