Skip to content

Instantly share code, notes, and snippets.

View lucasponce's full-sized avatar

Lucas Ponce lucasponce

View GitHub Profile
@lucasponce
lucasponce / istio-gke-kiali
Last active May 13, 2021 16:58
Install Istio in Google Kubernetes Engine + Update Kiali to latest
[0] Pre-requisites
Install google-cloud-sdk in your laptop
Documentation: https://cloud.google.com/sdk
Install helm in your laptop.
Documentation: https://helm.sh/docs/using_helm/#installing-helm
Get latest Istio.
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.1.7 sh -
[0] Pre-requisites
Install google-cloud-sdk in your laptop
Documentation: https://cloud.google.com/sdk
Install helm in your laptop.
Documentation: https://helm.sh/docs/using_helm/#installing-helm
Get latest Istio.
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.1.7 sh -
@lucasponce
lucasponce / update-kiali-cr.yaml
Last active June 30, 2019 10:42
Update Kiali CR
apiVersion: kiali.io/v1alpha1
kind: Kiali
metadata:
name: kiali
annotations:
ansible.operator-sdk/reconcile-period: "0s"
spec:
deployment:
image_version: "v1.0"
accessible_namespaces: [ "**" ]
@lucasponce
lucasponce / istio-telemetry-addons.yaml
Created June 14, 2019 09:38
Istio Telemetry Addons
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: grafana-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
func CastThreeScaleHandler(handler kubernetes.IstioObject) ThreeScaleHandler {
threeScaleHandler := ThreeScaleHandler{}
threeScaleHandler.Name = handler.GetObjectMeta().Name
if params, paramsPresent := handler.GetSpec()["params"]; paramsPresent {
if paramsMap, paramsCasted := params.(map[string]interface{}); paramsCasted {
if serviceId, serviceIdPresent := paramsMap["service_id"]; serviceIdPresent {
if serviceIdValue, serviceIdCasted := serviceId.(string); serviceIdCasted {
threeScaleHandler.ServiceId = serviceIdValue
}
}
TASK [kiali-deploy : Create resource [ingress] on [openshift]] *****************
task path: /opt/ansible/roles/kiali-deploy/tasks/process-resource.yml:1
changed: [localhost] => {"attempts": 1, "changed": true, "method": "create", "result": {"apiVersion": "extensions/v1beta1", "kind": "Ingress", "metadata": {"annotations": {"operator-sdk/primary-resource": "kiali-operator/kiali", "operator-sdk/primary-resource-type": "Kiali.kiali.io"}, "creationTimestamp": "2019-04-24T12:38:59Z", "generation": 1, "labels": {"app": "kiali", "version": "dev"}, "name": "kiali", "namespace": "istio-system", "resourceVersion": "293415", "selfLink": "/apis/extensions/v1beta1/namespaces/istio-system/ingresses/kiali", "uid": "ef098a30-668d-11e9-b74b-309c23d284ab"}, "spec": {"backend": {"serviceName": "kiali", "servicePort": 20001}}, "status": {"loadBalancer": {}}}}
TASK [kiali-deploy : Create resource [route] on [openshift]] *******************
task path: /opt/ansible/roles/kiali-deploy/tasks/process-resource.yml:1
FAILED - RETRYING:
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
@lucasponce
lucasponce / IstioWizard.tsx
Created January 17, 2019 13:24
Template for IstioWizard based in Patternfly 3 React (minimal example to get familiar with the subcomponents)
import * as React from 'react';
import { Button, Icon, Wizard } from 'patternfly-react';
type Props = {
show: boolean;
onClose: () => void;
};
type State = {
showWizard: boolean;
[lponce@attilan kiali-test-mesh]$ make openshift-deploy-kiali-test-depth
About to deploy Kiali Test Depth to OpenShift
ansible-playbook ./test-service/deploy/ansible/deploy_test_meshes.yml -e deployment_type=Deployment -e number_of_apps=1 -e number_of_services=1 -e number_of_versions=1 -e number_of_namespaces=1 -e '{"meshes": ["kiali-test-depth"]}' -v
Traceback (most recent call last):
File "/home/lponce/git/ansible/bin/ansible-playbook", line 67, in <module>
import ansible.constants as C
File "/home/lponce/git/ansible/lib/ansible/constants.py", line 17, in <module>
from ansible.config.manager import ConfigManager, ensure_type, get_ini_config_value
File "/home/lponce/git/ansible/lib/ansible/config/manager.py", line 16, in <module>
from yaml import load as yaml_load
Total in 131 ms
Watching for changes in /home/lponce/git/kiali.io/{content,data,layouts,static,themes}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
Change detected, rebuilding site
2018-09-04 13:35:45.531 +0200
Source changed "/home/lponce/git/kiali.io/content/features/_index.adoc": CREATE