#
#  Author: Hari Sekhon
#  Date: 2021-11-22 12:24:49 +0000 (Mon, 22 Nov 2021)
#
#  vim:ts=2:sts=2:sw=2:et
#
#  https://github.com/HariSekhon
#
#  License: see accompanying Hari Sekhon LICENSE file
#
#  If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
#  https://www.linkedin.com/in/HariSekhon
#

# Enable Goldilocks on a given namespace declaratively
#   or
# kubectl label ns MYAPP goldilocks.fairwinds.com/enabled=true
#
# eg.
#
# for namespace in argocd goldilocks jenkins polaris selenium; do kubectl label ns "$namespace" goldilocks.fairwinds.com/enabled=true; done

# Pre-existing VPAs may clash and need to be removed before triggering Goldilocks to create the VPAs again (seems to create the VPAs within around 5 minutes otherwise):
#
#   kubectl exec -ti -n goldilocks deploy/goldilocks-controller -- /goldilocks create-vpas -n MYNAMESPACE

---
apiVersion: v1
kind: Namespace
metadata:
  name: goldilocks  # XXX: Edit - set to any namespace you want to enable Goldilocks for
  labels:
    goldilocks.fairwinds.com/enabled: "true"
