How to disable out of the box limit ranges for profiles where Namespace Provisioner installs a limitrange via a parameter in TAP values
search cancel

How to disable out of the box limit ranges for profiles where Namespace Provisioner installs a limitrange via a parameter in TAP values

book

Article ID: 297906

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

As per https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.5/tap/release-notes.html, Namespace Provisioner creates a Kubernetes LimitRange object with acceptable default values that set maximum limits on many resources that pods in the managed namespace can request. And it’s stamped by default in Run profile.

This KB describes how to disable out of the box limit ranges for profiles where Namespace Provisioner installs a limitrange via a parameter in TAP values.

Environment

Product Version: 1.5

Resolution

In TAP 1.6, R&D has added an option to disable out of the box limit ranges for profiles where NSP installs a limitrange via a parameter in TAP values.
namespace_provisioner:
  default_parameters:
    skip_limit_range: true

In TAP 1.5, it will be a 2 step process
1) Create an overlay secret in tap-install or any other namespace
cat << EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
  name: disable-limitrange-overlay
  namespace: tap-install
stringData:
  disable-limitrange-overlay.yaml: |
    #@ load("@ytt:overlay", "overlay")
    #@overlay/match by=overlay.subset({"kind": "LimitRange"}), expects="0+"
    #@overlay/remove
    ---
EOF
2) Import that overlay secret in Namespace provisioner TAP values
namespace_provisioner:
  ...
  overlay_secrets:
  - name: disable-limitrange-overlay
    namespace: tap-install
    create_export: true