-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
64 lines (54 loc) · 1.43 KB
/
Copy pathdeploy.sh
File metadata and controls
64 lines (54 loc) · 1.43 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
ROOT=$(dirname $0)
function enable_helm_featuregate() {
tee patch.yml << EOF
---
spec:
template:
spec:
containers:
- name: manager
args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=:8443
- --leader-elect
- --catalogd-cas-dir=/var/certs
- --pull-cas-dir=/var/certs
- --tls-cert=/var/certs/tls.cert
- --tls-key=/var/certs/tls.key
- --feature-gates=HelmChartSupport=true
EOF
kubectl -n olmv1-system patch deployment operator-controller-controller-manager --patch-file=patch.yml
rm -fv patch.yml
kubectl -n olmv1-system wait --for condition=ready pods -l control-plane=operator-controller-controller-manager
}
function registry_networkpolicy() {
cat << EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: registry
namespace: olmv1-system
spec:
egress:
- {}
ingress:
- ports:
- port: 8443
protocol: TCP
podSelector:
matchLabels:
app: registry
policyTypes:
- Ingress
- Egress
EOF
}
registry_networkpolicy
enable_helm_featuregate
# Deploy an OCI registry
kubectl apply -f ${ROOT}/manifests/registry.yml
# Wait for the registry to be ready
kubectl -n olmv1-system wait --for=jsonpath='{.status.phase}'=Running pod -l app=registry
# Deploy cluster catalog
kubectl apply -f ${ROOT}/manifests/clustercatalog.yml