Install API Auto Registration

This topic describes how you can install API Auto Registration from the Tanzu Application Platform package repository.

Note

Follow the steps in this topic if you do not want to use a profile to install API Auto Registration. For information about profiles, see Components and installation profiles.

Tanzu Application Platform prerequisites

Before installing API Auto Registration, complete all prerequisites to install Tanzu Application Platform. See Tanzu Application Platform Prerequisites.

Using with TLS

Starting in Tanzu Application Platform v1.4, TLS is turned on by default for several components. API Auto Registration automatically trusts the CA for the shared ingress_issuer when using the default ClusterIssuer tap-ingress-selfsigned. This change means that a Certificate is automatically generated using this issuer.

If you do not want a Certificate to generate automatically, you can set the auto_generate_cert flag to false in the values file. To replace the default with a custom ingress issuer, see Security and compliance. Whenever you do not use the default ClusterIssuer tap-ingress-selfsigned, do not automatically generate certificates, or use other custom CAs, you must manually set the certificate. See Troubleshooting.

Install

To install the API Auto Registration package:

  1. List version information for the package by running:

    tanzu package available list apis.apps.tanzu.vmware.com --namespace tap-install
    

    For example:

    $ tanzu package available list apis.apps.tanzu.vmware.com --namespace tap-install
    - Retrieving package versions for apis.apps.tanzu.vmware.com...
      NAME                                     VERSION  RELEASED-AT
      apis.apps.tanzu.vmware.com  0.1.0        2022-08-30 19:00:00 -0500 -05
      apis.apps.tanzu.vmware.com  0.2.0        2022-11-24 12:20:00 -0500 -05
    
  2. (Optional) Gather values schema.

    Display values schema of the package:

    tanzu package available get apis.apps.tanzu.vmware.com/VERSION-NUMBER --values-schema --namespace tap-install
    

    Where VERSION-NUMBER is the version of the package you retrieved.

    For example:

    tanzu package available get apis.apps.tanzu.vmware.com/0.4.0 --values-schema --namespace tap-install
    
    Retrieving package details for apis.apps.tanzu.vmware.com/0.4.0...
    KEY                                                          DEFAULT                                                            TYPE     DESCRIPTION
    ca_cert_data                                                                                                                    string   Optional: PEM-encoded certificate data for the controller to trust TLS.
    ingress_issuer                                                                                                                  string   Optional: Name of the default cluster issuer used to generate certificates
    auto_generate_cert                                           true                                                               boolean  Flag that indicates if a cert-manager certificate should be generated using the ingress_issuer. Only applies if the ingress_issuer is specified connections with a custom CA
    cluster_name                                                 dev                                                                string   Name of the cluster used for setting the API entity lifecycle in TAP GUI. The value should be unique for each run cluster.
    route_provider.spring_cloud_gateway.enabled                  false                                                              boolean  Flag that indicates if VMware Spring Cloud Gateway for Kubernetes is supported as route provider
    route_provider.spring_cloud_gateway.scg_openapi_service_url  http://scg-openapi-service.spring-cloud-gateway.svc.cluster.local  string   FQDN URL for SCG operator openapi conversion service
    sync_period                                                  5m                                                                 string   Time period used for reconciling an APIDescriptor
    cluster_name                                                 dev                                                                string   Name of the cluster that will be used for setting the API entity lifecycle in TAP GUI. The value should be unique for each run cluster.
    curated_api_server.port                                      8082                                                               integer
    curated_api_server.service_type                              ClusterIP                                                          string
    sync_period                                                  5m                                                                 string   Time period used for reconciling an APIDescriptor.
    tap_gui_url                                                  http://server.tap-gui.svc.cluster.local:7000                       string   FQDN URL for TAP GUI.
    replicas                                                     1                                                                  integer  Number of controller replicas to deploy.
    resources.limits.cpu                                         500m                                                               string   CPU limit of the controller.
    resources.limits.memory                                      500Mi                                                              string   Memory limit of the controller.
    resources.requests.cpu                                       20m                                                                string   CPU request of the controller.
    resources.requests.memory                                    100Mi                                                              string   Memory request of the controller.
    logging_profile                                              production                                                         string   Logging profile for controller. If set to development, use console logging with full stack traces, else use JSON logging.
    
  3. Locate the Tanzu Developer Portal (formerly Tanzu Application Platform GUI) URL.

    When running a full profile on a Tanzu Application Platform cluster, the default value of Tanzu Developer Portal URL is sufficient. You can edit this to match the externally available FQDN of Tanzu Developer Portal to display the entity URL in the externally accessible APIDescriptor status.

    When installed in a run cluster or with a profile where Tanzu Developer Portal is not installed in the same cluster, you must set the tap_gui_url parameters correctly for successful entity registration with Tanzu Developer Portal.

    You can locate the tap_gui_url by going to the view cluster with the Tanzu Developer Portal you want to register the entity with:

    kubectl get secret tap-values -n tap-install -o jsonpath="{.data['tap-values\.yaml']}" | base64 -d | yq '.tap_gui.app_config.app.baseUrl'
    
  4. (Optional) VMware recommends creating api-auto-registration-values.yaml.

    To overwrite the default values when installing the package, create a api-auto-registration-values.yaml file:

    tap_gui_url: https://tap-gui.view-cluster.com
    cluster_name: staging-us-east
    ca_cert_data:  |
        -----BEGIN CERTIFICATE-----
        MIIFXzCCA0egAwIBAgIJAJYm37SFocjlMA0GCSqGSIb3DQEBDQUAMEY...
        -----END CERTIFICATE-----
    sync_period: 2m
    
  5. Install the package using Tanzu CLI:

    tanzu package install api-auto-registration
    --package apis.apps.tanzu.vmware.com
    --namespace tap-install
    --version VERSION-NUMBER
    --values-file api-auto-registration-values.yaml
    

    Where VERSION-NUMBER is the version of the package you retrieved in the earlier step.

  6. Verify the package installation by running:

    tanzu package installed get api-auto-registration -n tap-install
    

    Verify that STATUS is Reconcile succeeded:

    kubectl get pods -n api-auto-registration
    
  7. Verify that applying an APIDescriptor resource to your cluster causes the STATUS showing Ready:

    kubectl apply -f - <<EOF
    apiVersion: apis.apps.tanzu.vmware.com/v1alpha1
    kind: APIDescriptor
    metadata:
      name: sample-api-descriptor-with-absolute-url
    spec:
      type: openapi
      description: A sample APIDescriptor to validate package installation successful
      system: test-installation
      owner: test-installation
      location:
        apiSpec:
          path: "/api/v3/openapi.json"
        server:
          url: https://petstore3.swagger.io
    EOF
    

    Verify that the APIDescriptor status shows Ready:

    kubectl get apidescriptors
    NAME                                       STATUS
    sample-api-descriptor-with-absolute-url    Ready
    
    kubectl get apidescriptors -owide
    NAME                                       STATUS    TAP GUI ENTITY URL     API SPEC URL
    sample-api-descriptor-with-absolute-url    Ready     <url-to-the-entity>    <url-to-the-api-spec>
    

    If the status does not show Ready, you can inspect and show the reason by running:

    kubectl get apidescriptor sample-api-descriptor-with-absolute-url -o jsonpath='{.status.conditions[?(@.type=="Ready")].message}'
    

    Verify that the entity is created in your Tanzu Developer Portal: TAP-GUI-URL/catalog/default/api/sample-api-descriptor-with-absolute-url

check-circle-line exclamation-circle-line close-line
Scroll to top icon