Skip to content

Instantly share code, notes, and snippets.

View lucasponce's full-sized avatar

Lucas Ponce lucasponce

View GitHub Profile
@lucasponce
lucasponce / hypershift-debug
Created October 18, 2022 11:13
Hypershift debug
#!/bin/bash
# Params
# $1 environment (int or stage)
# $2 cluster name to debug
# $3 base directory to create logs and keys
if [ "$1x" == "x" ]
then
echo "It requires an environment {int or stage}"
@lucasponce
lucasponce / KialiGridLayout.ts
Created January 25, 2022 08:11
Clone of GridLayout
/*
KialiGridLayout
This is a version of the "grid" algorithm provided by Cytoscape at
https://github.com/cytoscape/cytoscape.js/blob/unstable/src/extensions/layout/grid.js
The standard algorithm needs some refinements for Kiali use cases and in this case it's simpler to clone it
rather than provide an extension.
*/
sh-4.4$ cat /proc/meminfo
MemTotal: 32923544 kB
MemFree: 9112472 kB
MemAvailable: 20746336 kB
Buffers: 1076 kB
Cached: 11561292 kB
SwapCached: 0 kB
Active: 1556100 kB
Inactive: 20597032 kB
Active(anon): 17680 kB
0s Warning FailedSync pod/kiali-operator-688cbb4754-d64ks error determining status: rpc error: code = DeadlineExceeded desc = context deadline exceeded
60m Normal Scheduled pod/kiali-operator-5b55847b9-xn8km Successfully assigned kiali-operator/kiali-operator-5b55847b9-xn8km to minikube
60m Normal SuccessfulCreate replicaset/kiali-operator-5b55847b9 Created pod: kiali-operator-5b55847b9-xn8km
60m Normal ScalingReplicaSet deployment/kiali-operator Scaled up replica set kiali-operator-5b55847b9 to 1
1s Normal TaintManagerEviction pod/kiali-operator-688cbb4754-d64ks Cancelling deletion of Pod kiali-operator/kiali-operator-688cbb4754-d64ks
60m Warning FailedCreatePodSandBox pod/kiali-operator-5b55847b9-xn8km Failed to create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "kiali-operator-5b55847b9-xn8km": operation timeout: contex
@lucasponce
lucasponce / 01-create-cluster.sh
Created April 23, 2021 07:31
Installation of Istio + Addons on GCP
export PROJECT_ID=`gcloud config get-value project` && \
export M_TYPE=n1-standard-2 && \
export ZONE=us-west2-a && \
export CLUSTER_NAME=${PROJECT_ID}-${RANDOM} && \
gcloud services enable container.googleapis.com && \
gcloud container clusters create $CLUSTER_NAME \
--cluster-version latest \
--machine-type=$M_TYPE \
--num-nodes 4 \
--zone $ZONE \
@lucasponce
lucasponce / [1.A] Steps for GKE
Last active August 24, 2022 22:01
Istio Cookbook: Kiali Recipe
[1] Open https://console.cloud.google.com/ with your gmail account
[2] Create a Project / Choose a Project you have access to.
[3] Activate "Cloud Shell"
[4] Prepare a GKE cluster using
https://istio.io/latest/docs/setup/platform-setup/gke/
export PROJECT_ID=`gcloud config get-value project` && \
@lucasponce
lucasponce / 01-base-istio-install.txt
Created November 13, 2020 08:53
Istio 1.7.4 Install - Expose Kiali through unsecure gateway
#!/usr/bin/env bash
VERSION=1.7.4
if [[ ! -d "${HOME}/Software/istio-${VERSION}" ]]
then
cd Software
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=${VERSION} TARGET_ARCH=x86_64 sh -
fi
=== OPERATOR SETTINGS ===
DRY_RUN_ARG=
HELM=/usr/local/bin/helm
HELM_CHART=/home/lponce/Projects/repos/kiali-operator/_output/charts/kiali-operator-v1.23.0-SNAPSHOT.tgz
HELM_REPO_CHART_VERSION=lastrelease
OPERATOR_CLUSTER_ROLE_CREATOR=true
OPERATOR_IMAGE_NAME=localhost:5000/kiali/kiali-operator
OPERATOR_IMAGE_PULL_POLICY=Always
OPERATOR_IMAGE_VERSION=dev
OPERATOR_INSTALL_KIALI=false
.requests-total input[type='range']:hover {
opacity: 1;
}
.requests-total input[type='range']::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 25px;
height: 25px;
cursor: pointer;
<div class="travel-t1">
<input type="range" id="${city.city}_travel_t1" />
</div>
<div class="travel-t2">
<input type="range" id="${city.city}_travel_t2" />
</div>
<div class="travel-t3">
<input type="range" id="${city.city}_travel_t3" />
</div>