Skip to content

Instantly share code, notes, and snippets.

View lucasponce's full-sized avatar

Lucas Ponce lucasponce

View GitHub Profile
@lucasponce
lucasponce / gist:4f9812ceb4443000f8a4185ae1811240
Created August 14, 2019 08:48
OC 3.11 with Istio upstream
# if running selinux
sudo setenforce 0
oc cluster up
oc login -u system:admin
oc adm policy add-cluster-role-to-user cluster-admin admin
oc login -u admin -p admin
oc adm policy add-scc-to-user anyuid -z istio-ingress-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z default -n istio-system
apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
metadata:
name: full-install
spec:
# NOTE, if you remove all children from an element, you should remove the
# element too. An empty element is interpreted as null and will override all
# default values (i.e. no values will be specified for that element, not even
# the defaults baked into the chart values.yaml).
istio:
flag provided but not defined: -discoveryCacheDir
Usage of istio-operator:
-alsologtostderr
log to standard error as well as files
-alwaysPull
Whether to always pull the installer container
-deploymentType string
The default deployment type
-enable3scale
Whether to enable the 3scale adapter
KIALI=$HOME/Projects/gopath/src/github.com/kiali/kiali
KIALI_UI=$HOME/Projects/repos/kiali-ui
cd $KIALI_UI
export REACT_APP_RCUE=false
yarn build
cd $KIALI
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: servicemeshcontrolplanes.maistra.io
spec:
group: maistra.io
names:
kind: ServiceMeshControlPlane
listKind: ServiceMeshControlPlaneList
plural: servicemeshcontrolplanes
apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
metadata:
name: full-install
spec:
# NOTE, if you remove all children from an element, you should remove the
# element too. An empty element is interpreted as null and will override all
# default values (i.e. no values will be specified for that element, not even
# the defaults baked into the chart values.yaml).
istio:
[lponce@recopolis ~]$ oc describe pod istio-citadel-77df78fd9-jkzpj
Name: istio-citadel-77df78fd9-jkzpj
Namespace: istio-system
Priority: 0
PriorityClassName: <none>
Node: localhost/192.168.1.34
Start Time: Wed, 07 Aug 2019 11:21:22 +0200
Labels: app=security
chart=security
heritage=Tiller
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
metadata:
name: default
namespace: travel-agency
spec:
peers:
- mtls: {}
---
apiVersion: networking.istio.io/v1alpha3
@lucasponce
lucasponce / meshpolicy-security.yaml
Last active July 1, 2019 13:01
Global MeshPolicy
apiVersion: authentication.istio.io/v1alpha1
kind: MeshPolicy
metadata:
name: default
spec:
peers:
- mtls: {}
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
@lucasponce
lucasponce / install-gke-istio-kiali.sh
Last active June 30, 2019 13:45
Create a Kubernetes cluster using GKE and install Istio. Upgrade Kiali and install examples. Specific Linux comands to open browsers from command line
#!/bin/bash
echo "[1.0] Check pre-requisites"
# Check gcloud, kubectl, helm, istioctl, envsubst, curl commands
COMMANDS=(gcloud kubectl helm istioctl envsubst curl)
for CMD in "${COMMANDS[@]}"
do
which "$CMD" >/dev/null 2>&1
if [ ! "$?" == "0" ]; then