File: deploy_compliance_operator.sh

package info (click to toggle)
scap-security-guide 0.1.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 110,644 kB
  • sloc: xml: 241,883; sh: 73,777; python: 32,527; makefile: 27
file content (30 lines) | stat: -rwxr-xr-x 1,120 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

root_dir=$(git rev-parse --show-toplevel)

echo "* Ensuring openshift-compliance namespace exists."
# If it already exists, this is not a problem.
oc apply -f "$root_dir/ocp-resources/compliance-operator-ns.yaml"

# Some clusters may be slow... so let's wait til Kubernetes persists the new
# namespace
sleep 5

echo "* Creating CatalogSource"
# Create operator source so we can install the latest available release which
# is available from an "external datastore"; meaning, it's our upstream release
# which is not yet in OperatorHub
oc apply -f "$root_dir/ocp-resources/compliance-operator-catalog-source.yaml"

echo "* Creating OperatorGroup"
# Create operator group (defines which namespaces are targetted by the
# operator)
oc apply -f "$root_dir/ocp-resources/compliance-operator-operator-group.yaml"

echo "* Creating Subscription"
# Create subscription (which installs the operator)
oc apply -f "$root_dir/ocp-resources/compliance-operator-alpha-subscription.yaml"

echo "* The compliance-operator is now installing."
echo "* To take it into use, do:"
echo -e "\t$ oc project openshift-compliance"