Create a new file called new-network.xml
with the following content:
<network>
<name>custom-net</name>
apiVersion: platform.stackrox.io/v1alpha1 | |
kind: SecuredCluster | |
metadata: | |
name: stackrox-secured-cluster-services | |
namespace: stackrox | |
spec: | |
sensor: | |
resources: | |
requests: | |
cpu: 10m |
apiVersion: platform.stackrox.io/v1alpha1 | |
kind: SecuredCluster | |
metadata: | |
name: stackrox-secured-cluster-services | |
namespace: stackrox | |
spec: | |
sensor: | |
resources: | |
requests: | |
cpu: 10m |
apiVersion: platform.stackrox.io/v1alpha1 | |
kind: Central | |
metadata: | |
name: stackrox-central-services | |
namespace: stackrox | |
spec: | |
customize: | |
envVars: | |
- name: ROX_EXTERNAL_IPS | |
value: 'true' |
DOCKER_CONFIG_JSON=`oc extract secret/pull-secret -n openshift-config --to=-` | |
oc create secret generic multiclusterhub-operator-pull-secret \ | |
-n open-cluster-management-observability \ | |
--from-literal=.dockerconfigjson="$DOCKER_CONFIG_JSON" \ | |
--type=kubernetes.io/dockerconfigjson | |
ACCESS_KEY="" | |
SECRET_KEY="" |
if [ $# -eq 0 ] | |
then | |
echo "try: $0 payments-v2 frontend backend" | |
exit 1 | |
fi | |
> netpols.yaml | |
for namespace in $@ | |
do |
apiVersion: platform.stackrox.io/v1alpha1 | |
kind: SecuredCluster | |
metadata: | |
name: stackrox-secured-cluster-services | |
namespace: stackrox | |
spec: | |
admissionControl: | |
bypass: BreakGlassAnnotation | |
contactImageScanners: DoNotScanInline | |
listenOnCreates: true |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
namespace: stackrox | |
name: stackrox-image-puller | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: stackrox-image-puller-clusterrolebinding |
#!/bin/bash | |
if [[ -z "${ROX_ENDPOINT}" ]]; then | |
echo >&2 "ROX_ENDPOINT must be set" | |
exit 1 | |
fi | |
if [[ -z "${ROX_API_TOKEN}" ]]; then | |
echo >&2 "ROX_API_TOKEN must be set" | |
exit 1 |
4 simple steps | |
- Create namespace | |
- Create secret ( it is required ) | |
- Generate cluster-init-bundle. | |
- Install secured-cluster using helm. | |
# Create namespace and Pull-Secret from cloud.redhat.com | |
kubectl create namespace stackrox |