Skip to content

Instantly share code, notes, and snippets.

@xeviknal
xeviknal / kiali-4210.yaml
Created November 5, 2021 15:58
Argo Rollouts - istio Subset traffic level splitting
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: rollouts-demo
spec:
replicas: 1
strategy:
canary:
steps:
- setWeight: 5
@xeviknal
xeviknal / productpage-cluster.txt
Last active October 20, 2020 17:15
Istio Debug
SERVICE FQDN PORT SUBSET DIRECTION TYPE DESTINATION RULE
BlackHoleCluster - - - STATIC
InboundPassthroughClusterIpv4 - - - ORIGINAL_DST
PassthroughCluster - - - ORIGINAL_DST
agent - - - STATIC
details.bookinfo.svc.cluster.local 9080 - outbound EDS details.bookinfo
details.bookinfo.svc.cluster.local 9080 v1 outbound EDS details.bookinfo
details.bookinfo.svc.cluster.local 9080 v2
@xeviknal
xeviknal / istio-17-install.sh
Created July 28, 2020 16:04
Istio 1.7 installation proces (jaeger, not zipkin)
#/bin/bash
istioctl install --set profile=demo
kubectl apply -f samples/addons/prometheus.yaml -n istio-system
kubectl apply -f samples/addons/jaeger.yaml -n istio-system
kubectl apply -f samples/addons/grafana.yaml -n istio-system
kubectl apply -f samples/addons/kiali.yaml -n istio-system
istioctl dashboard kiali
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: grafana
namespace: istio-system
spec:
host: grafana
trafficPolicy:
tls:
mode: DISABLE
@xeviknal
xeviknal / istio-telemetry-addons.yaml
Created November 7, 2019 15:57
Adding telemetry addons
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: grafana-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
@xeviknal
xeviknal / update-kiali-cr.yaml
Last active November 7, 2019 13:44
Update Kiali CR
apiVersion: kiali.io/v1alpha1
kind: Kiali
metadata:
name: kiali
annotations:
ansible.operator-sdk/reconcile-period: "0s"
spec:
deployment:
image_version: "v1.9"
accessible_namespaces: [ "**" ]
@xeviknal
xeviknal / knative-install.sh
Created March 28, 2019 14:55
Install knative into minishift
#!/bin/bash
# Enable admission controller webhooks
# The configuration stanzas below look weird and are just to workaround for:
# https://bugzilla.redhat.com/show_bug.cgi?id=1635918
minishift openshift config set --target=kube --patch '{
"admissionConfig": {
"pluginConfig": {
"ValidatingAdmissionWebhook": {
"configuration": {
@xeviknal
xeviknal / destination_rule.go
Created February 26, 2019 13:29
Shall we move some logic to "models"?
package models
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/kiali/kiali/config"
"github.com/kiali/kiali/kubernetes"
)
// DestinationRules destinationRules
@xeviknal
xeviknal / ServiceInfo.tsx
Created December 18, 2018 10:02
HOC for error boundaries
<TabContent>
<TabPaneWithErrorBoundary message={this.errorBoundaryMessage('Workloads')}>
{(Object.keys(workloads).length > 0 || this.props.serviceDetails.istioSidecar) && (
<ServiceInfoWorkload workloads={workloads} namespace={this.props.namespace} />
)}
</TabPaneWithErrorBoundary>
<TabPaneWithErrorBoundary eventKey={'sources'} message={this.errorBoundaryMessage('Sources')}>
<ServiceInfoRoutes dependencies={dependencies} />
</TabPaneWithErrorBoundary>
<TabPaneWithErrorBoundary
@xeviknal
xeviknal / code.js
Last active June 13, 2018 17:02
Adding a icon into cytoscape graph
fetch('cy-style.json', {mode: 'no-cors'})
.then(function(res) {
return res.json()
})
.then(function(style) {
var cy = window.cy = cytoscape({
container: document.getElementById('cy'),
boxSelectionEnabled: false,
autounselectify: true,