Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 056fa41

Browse files
committed
Using a slightly hacked maistra istio operator from Brian Avery
Still some crash-loop errors to work out (with jaeger), but the kubecon demo seems to work with it
1 parent e124f7b commit 056fa41

File tree

2 files changed

+181
-16
lines changed

2 files changed

+181
-16
lines changed

etc/scripts/install.sh

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,6 @@ mkdir -p "$REPO_DIR"
3737
# initialize the minishift knative profile
3838
"$DIR/init-minishift-for-knative.sh"
3939

40-
# istio
41-
git clone https://github.com/minishift/minishift-addons "$REPO_DIR/minishift-addons"
42-
minishift addon install "$REPO_DIR/minishift-addons/add-ons/istio"
43-
until minishift addon apply istio; do sleep 1; done
44-
timeout 900 'oc get pods -n istio-system && [[ $(oc get pods -n istio-system | grep openshift-ansible-istio-installer | grep -c Completed) -eq 0 ]]'
45-
46-
# Disable mTLS in istio
47-
oc delete MeshPolicy default
48-
oc delete DestinationRule default -n istio-system
49-
50-
# Scale down unused services deployed by the istio addon
51-
oc scale -n istio-system --replicas=0 deployment/grafana
52-
oc scale -n istio-system --replicas=0 deployment/jaeger-collector
53-
oc scale -n istio-system --replicas=0 deployment/jaeger-query
54-
oc scale -n istio-system --replicas=0 statefulset/elasticsearch
55-
5640
# OLM
5741
git clone https://github.com/operator-framework/operator-lifecycle-manager "$REPO_DIR/olm"
5842
cat $REPO_DIR/olm/deploy/okd/manifests/latest/*.crd.yaml | oc apply -f -
@@ -64,6 +48,44 @@ oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-
6448

6549
# knative catalog source
6650
oc apply -f "$ROOT_DIR/knative-operators.catalogsource.yaml"
51+
oc apply -f "$ROOT_DIR/maistra-operators.catalogsource.yaml"
52+
53+
# istio
54+
oc create ns istio-operator
55+
cat <<EOF | oc apply -f -
56+
apiVersion: operators.coreos.com/v1alpha1
57+
kind: Subscription
58+
metadata:
59+
name: maistra
60+
namespace: istio-operator
61+
spec:
62+
channel: alpha
63+
name: maistra
64+
source: maistra-operators
65+
EOF
66+
wait_for_all_pods istio-operator
67+
68+
cat <<EOF | oc apply -f -
69+
apiVersion: istio.openshift.com/v1alpha1
70+
kind: Installation
71+
metadata:
72+
namespace: istio-operator
73+
name: istio-installation
74+
spec:
75+
istio:
76+
authentication: true
77+
community: true
78+
version: 0.2.0
79+
kiali:
80+
username: admin
81+
password: admin
82+
prefix: kiali/
83+
version: v0.7.1
84+
EOF
85+
timeout 900 'oc get pods -n istio-system && [[ $(oc get pods -n istio-system | grep openshift-ansible-istio-installer | grep -c Completed) -eq 0 ]]'
86+
# Disable mTLS in istio
87+
oc delete MeshPolicy default
88+
oc delete DestinationRule default -n istio-system
6789

6890
# for now, we must install the operators in specific namespaces, so...
6991
oc create ns knative-build
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: maistra-operators
5+
namespace: openshift-operator-lifecycle-manager
6+
7+
data:
8+
customResourceDefinitions: |-
9+
- apiVersion: apiextensions.k8s.io/v1beta1
10+
kind: CustomResourceDefinition
11+
metadata:
12+
name: installations.istio.openshift.com
13+
spec:
14+
group: istio.openshift.com
15+
names:
16+
kind: Installation
17+
plural: installations
18+
singular: installation
19+
scope: Namespaced
20+
version: v1alpha1
21+
22+
clusterServiceVersions: |-
23+
- apiVersion: operators.coreos.com/v1alpha1
24+
kind: ClusterServiceVersion
25+
metadata:
26+
name: maistra.v0.5.0
27+
spec:
28+
displayName: Maistra
29+
description: "Maistra, otherwise known as OpenShift Service Mesh, is Red Hat's version of Istio."
30+
keywords: ['service mesh', 'istio']
31+
maintainers:
32+
- name: Red Hat
33+
34+
provider:
35+
name: Red Hat
36+
links:
37+
- name: Documentation
38+
url: https://maistra.io
39+
install:
40+
strategy: deployment
41+
spec:
42+
permissions:
43+
- serviceAccountName: istio-operator
44+
rules:
45+
- apiGroups:
46+
- istio.openshift.com
47+
resources:
48+
- "*"
49+
verbs:
50+
- "*"
51+
- apiGroups:
52+
- ""
53+
resources:
54+
- pods
55+
- services
56+
- endpoints
57+
- persistentvolumeclaims
58+
- events
59+
- configmaps
60+
- secrets
61+
- securitycontextconstraints
62+
verbs:
63+
- "*"
64+
- apiGroups:
65+
- apps
66+
resources:
67+
- deployments
68+
- daemonsets
69+
- replicasets
70+
- statefulsets
71+
verbs:
72+
- "*"
73+
clusterPermissions:
74+
- serviceAccountName: istio-operator
75+
rules:
76+
- apiGroups:
77+
- '*'
78+
resources:
79+
- '*'
80+
verbs:
81+
- '*'
82+
- nonResourceURLs:
83+
- '*'
84+
verbs:
85+
- '*'
86+
deployments:
87+
- name: istio-operator
88+
spec:
89+
replicas: 1
90+
strategy:
91+
type: RollingUpdate
92+
selector:
93+
matchLabels:
94+
app: istio-operator
95+
template:
96+
metadata:
97+
labels:
98+
app: istio-operator
99+
spec:
100+
containers:
101+
- name: istio-operator
102+
image: maistra/istio-operator-centos7:0.5.0
103+
ports:
104+
- containerPort: 60000
105+
name: metrics
106+
command:
107+
- istio-operator
108+
imagePullPolicy: Always
109+
env:
110+
- name: WATCH_NAMESPACE
111+
valueFrom:
112+
fieldRef:
113+
fieldPath: metadata.namespace
114+
- name: OPERATOR_NAME
115+
value: "istio-operator"
116+
serviceAccountName: istio-operator
117+
maturity: alpha
118+
version: 0.5.0
119+
apiservicedefinitions:
120+
customresourcedefinitions:
121+
owned:
122+
- name: installations.istio.openshift.com
123+
version: v1alpha1
124+
kind: Installation
125+
displayName: Maistra Installation
126+
description: CRD representing Maistra installation options
127+
128+
packages: |-
129+
- packageName: maistra
130+
channels:
131+
- name: alpha
132+
currentCSV: maistra.v0.5.0
133+
---
134+
apiVersion: operators.coreos.com/v1alpha1
135+
kind: CatalogSource
136+
metadata:
137+
name: maistra-operators
138+
namespace: openshift-operator-lifecycle-manager
139+
spec:
140+
sourceType: internal
141+
configMap: maistra-operators
142+
displayName: Maistra Operators
143+
publisher: Red Hat

0 commit comments

Comments
 (0)