Repository: vmware-tanzu/tanzu-framework (language: go)

Issue:
Ability to generate default capabilities secret with user-specified PSPs
<!-- This is used to request new product features -->

**Describe the feature request**
Ability to generate default capabilities secret with user-specified PSPs
Ex: 
```
make generate-package-secret PACKAGE=capabilities tkr=random psp=vmware-system-privileged
make generate-package-secret PACKAGE=capabilities tkr=random psp=vmware-system-privileged,vmware-user-privileged
make generate-package-secret PACKAGE=capabilities tkr=random
```

**Describe alternative(s) you've considered**

**Affected product area (please put an X in all that apply)**

- ( ) APIs
- ( ) Addons
- ( ) CLI
- ( ) Docs
- ( ) IAM
- (X) Installation
- ( ) Plugin
- ( ) Security
- ( ) Test and Release
- ( ) User Experience
- ( ) Developer Experience

**Additional context**



Discussion / hints:

Fix patch:
diff --git a/Makefile b/Makefile
index f2f60c47b5..b663274272 100644
--- a/Makefile
+++ b/Makefile
@@ -637,7 +637,7 @@ generate-package-secret: ## Generate the default package values secret. Usage: m
 	@if [ $(PACKAGE) == 'pinniped' ]; then \
 	  ./addons/pinniped/tanzu-auth-controller-manager/hack/generate-package-secret.sh -v tkr=${tkr} -v infrastructure_provider=${iaas} ;\
 	elif [ $(PACKAGE) == 'capabilities' ]; then \
-	  ./pkg/v1/sdk/capabilities/hack/generate-package-secret.sh -v tkr=${tkr} ;\
+	  ./pkg/v1/sdk/capabilities/hack/generate-package-secret.sh -v tkr=${tkr} --data-value-yaml 'rbac.podSecurityPolicyNames=[${psp}]';\
 	else \
 	  echo "invalid PACKAGE: $(PACKAGE)" ;\
 	  exit 1 ;\


Test patch:
diff --git a/pkg/v1/sdk/capabilities/hack/generate-package-secret.test.sh b/pkg/v1/sdk/capabilities/hack/generate-package-secret.test.sh
index c543b2511b..2f066d1cfd 100755
--- a/pkg/v1/sdk/capabilities/hack/generate-package-secret.test.sh
+++ b/pkg/v1/sdk/capabilities/hack/generate-package-secret.test.sh
@@ -16,7 +16,7 @@ TEST_RESULT_1=$(./hack/generate-package-secret.sh)
 EXPECTED_1="apiVersion: v1
 kind: Secret
 metadata:
-  name: default-capabilities-config-v0.0.0
+  name: default-capabilities-package-config-v0.0.0
 stringData:
   values.yaml: |
     namespace: tkg-system
@@ -36,11 +36,11 @@ then
 fi
 
 # test with provided args
-TEST_RESULT_2=$(./hack/generate-package-secret.sh -v tkr=foo)
+TEST_RESULT_2=$(./hack/generate-package-secret.sh -v tkr=foo --data-value-yaml 'rbac.podSecurityPolicyNames=[test-psp,test-psp-two]')
 EXPECTED_2="apiVersion: v1
 kind: Secret
 metadata:
-  name: default-capabilities-config-foo
+  name: default-capabilities-package-config-foo
 stringData:
   values.yaml: |
     namespace: tkg-system
@@ -49,7 +49,9 @@ stringData:
       nodeSelector: {}
       tolerations: []
     rbac:
-      podSecurityPolicyNames: []"
+      podSecurityPolicyNames:
+      - test-psp
+      - test-psp-two"
 
 if [[ "${TEST_RESULT_2}" != "${EXPECTED_2}" ]]
 then