title: Upgrade Guide

Validate Compatibility

Apache APISIX Ingress project is a continuously actively developed project. In order to make it better, some broken changes will be added when the new version is released. For users, how to upgrade safely becomes very important.

The policy directory of this project contains these compatibility check strategies, you can use the conftest tool to check the compatibility.

Here's a quick example.

apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
 name: httpbin-route
spec:
 http:
 - name: rule1
   match:
     hosts:
     - httpbin.org
     paths:
       - /ip
     exprs:
     - subject:
         scope: Header
         name: X-Foo
       op: Equal
       value: bar
   backends:
   - serviceName: httpbin
     servicePort: 80

It uses the spec.http.backend field that has been removed. Save as httpbin-route.yaml.

Use conftest for compatibility check.

$ conftest test httpbin-route.yaml
FAIL - httpbin-route.yaml - main - ApisixRoute/httpbin-route: rule1 field http.backend has been removed, use http.backends instead.

2 tests, 1 passed, 0 warnings, 1 failure, 0 exceptions

Incompatible parts will generate errors.