Customizing Cloud Native Runtimes

This topic tells you how to customize your Cloud Native Runtimes (CNRs) installation.

Overview

There are many package configuration options exposed through data values that allows you to customize your Cloud Native Runtimes installation.

To yield all the configuration options available in a Cloud Native Runtimes package version:

export CNR_VERSION=2.4.0
tanzu package available get cnrs.tanzu.vmware.com/${CNR_VERSION} --values-schema -n tap-install

Customizing Cloud Native Runtimes

Besides using the out-of-the-box options to configure your package, you can use ytt overlays to further customize your installation. For information about how to customize any Tanzu Application Platform package, see Customize your package installation.

The following example shows how to update the Knative ConfigMap config-logging to override the logging level of the Knative Serving controller to debug:

  1. Create a Kubernetes secret containing the ytt overlay by applying the following configuration to your cluster.

    kubectl apply -n tap-install -f - << EOF
    apiVersion: v1
    kind: Secret
    metadata:
     name: cnrs-patch
    stringData:
     patch.yaml: |
       #@ load("@ytt:overlay", "overlay")
       #@overlay/match by=overlay.subset({"kind":"ConfigMap","metadata":{"name":"config-logging","namespace":"knative-serving"}})
       ---
       data:
         #@overlay/match missing_ok=True
         loglevel.controller: "debug"
    EOF
    

    To learn more about the Carvel tool ytt and how to write overlays, see the ytt documentation.

  2. Update your tap-values.yaml file to add the YAML below. This YAML informs the Tanzu Application Platform about the secret name where the overlay is stored and applies the overlay to the cnrs package.

    package_overlays:
    - name: cnrs
      secrets:
      - name: cnrs-patch
    

    You can retrieve your tap-values.yaml file by running:

    kubectl get secret tap-tap-install-values -n tap-install -ojsonpath="{.data.tap-values\.yaml}" | base64 -d
    
  3. Update the Tanzu Application Platform installation.

    tanzu package installed update tap -p tap.tanzu.vmware.com -v ${TAP_VERSION} --values-file tap-values.yaml -n tap-install
    
  4. Confirm your changes were applied to the corresponding ConfigMap.

    To confirm that your changes were applied to the ConfigMap config-logging by ensuring loglevel.controller is set to debug.

    kubectl get configmap config-logging -n knative-serving -oyaml
    
check-circle-line exclamation-circle-line close-line
Scroll to top icon