diff --git a/docs/getting-started/connect-a-service-to-the-api.md b/docs/getting-started/connect-a-service-to-the-api.md index fa740ec32..a03a92213 100644 --- a/docs/getting-started/connect-a-service-to-the-api.md +++ b/docs/getting-started/connect-a-service-to-the-api.md @@ -90,6 +90,4 @@ $ curl EXTERNAL_IP/hello Hello from an implemented service! ``` -And now you have successfully deployed an API! The approach from this "Getting Started" section of the documentation follows a [design-first](https://kubeshop.io/blog/from-design-first-to-automated-deployment-with-openapi) approach where you deployed the API first, mocked the API to and later implemented the services and connected them to the API. - -You can also check the [Automatic API Deployment](../guides/autodeploy.md) for a code-first (or service-first) approach. \ No newline at end of file +And now you have successfully deployed an API! The approach from this "Getting Started" section of the documentation follows a [design-first](https://kubeshop.io/blog/from-design-first-to-automated-deployment-with-openapi) approach where you deployed the API first, mocked the API to and later implemented the services and connected them to the API. \ No newline at end of file diff --git a/docs/guides/autodeploy.md b/docs/guides/autodeploy.md deleted file mode 100644 index 62fc88673..000000000 --- a/docs/guides/autodeploy.md +++ /dev/null @@ -1,61 +0,0 @@ -# Automatic API Deployment - -Kusk Gateway supports automatic configuration and deployment of an API based on kusk-gateway annotations on -your Kubernetes Service resource, allowing you to totally automate the deployment of your API to Kusk Gateway whenever -you deploy the corresponding Service to your cluster. - -The following annotations are available: - -| Name | Description | Optional | -|:----------------------------------------|:------------------------------------------------------------------------------|:--------:| -| `kusk-gateway/openapi-url` | The absolute URL to the OpenAPI definition to deploy. | | -| `kusk-gateway/envoy-fleet` | Which EnvoyFleet to use. | X | -| `kusk-gateway/path-prefix:` | The path where your API will be hosted. | X | -| `kusk-gateway/path-prefix-substitution` | What to substitute the prefix with when forwarding the request to the service. | X | - -For example, assuming that you have set up a deployment that is running your REST API, you could deploy -the following Kubernetes Service: - -```yaml -apiVersion: v1 -kind: Service -metadata: - name: my-api - annotations: - kusk-gateway/openapi-url: https://some-resolvablehost-name/path-to-openapi.yaml -spec: - type: ClusterIP - selector: - app: my-api - ports: - - port: 3000 - targetPort: http -``` - -Deploying this manifest with kubectl (`kubectl apply -f svc.yaml`) will make Kusk Gateway automatically: - -- Read the OpenAPI definition from the `openapi-url` annotation. -- Add corresponding `x-kusk.upstream` [extensions](../../reference/extension/#upstream) to route API requests to this Service (if not already present). -- Create an [API resource](../customresources/api.md) for the OpenAPI definition and deploy it to Kusk Gateway. - -If you want to customize the mapping and/or envoy-fleet used by the API, add these as annotations: - -```yaml -apiVersion: v1 -kind: Service -metadata: - name: my-api - annotations: - kusk-gateway/openapi-url: https://gist.githubusercontent.com/jasmingacic/082849b29d0e06e5f018a66f4cd49ec3/raw/e91c94cc82e7591031399e0d8c563d28a62de460/openapi.yaml - kusk-gateway/path-prefix: /my-api - kusk-gateway/path-prefix-substitution: "" - kusk-gateway/envoy-fleet: my-private-fleet -spec: - type: ClusterIP - selector: - app: my-api # aforementioned selector - ports: - - port: 3000 - targetPort: http -``` - diff --git a/mkdocs.yml b/mkdocs.yml index 7e9df2144..e479585e0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -30,7 +30,6 @@ nav: - Basic Auth: guides/basic-auth.md - Rate Limiting: guides/rate-limit.md - Caching: guides/cache.md - - Automatic API deployment: guides/autodeploy.md - Using Cert Manager: guides/cert-manager.md - Observability: guides/observability.md - Troubleshooting: guides/troubleshooting.md