Skip to content

Instantly share code, notes, and snippets.

View fai555's full-sized avatar
πŸ‘¨β€πŸ’»

Imran fai555

πŸ‘¨β€πŸ’»
View GitHub Profile
"""
This script uses RSA public/private key pair generated using Openssl command line tool.
The series of steps are listed below
1. Import openssl generated public/private key pair
3. Generate the Token using the Private key from step 1
4. Validate the JWT Token using the Public key from step 1
"""
# ______________________________ Step 0 ______________________________________
"""
This script generates RSA public/private key pair using python.
And uses the Keys to Generate JWT Token.
The series of steps are listed below
1. Generate the Key
2. Generate the Public and Private Keys
3. Generate the Token using the Private Key from step 2
4. Validate the JWT Token using the Public key from step 2
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: <VIRTUAL_SERVICE_NAME>
spec:
hosts:
- "*"
gateways:
- <GATEWAY_NAME>
http:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: <VIRTUAL_SERVICE_NAME>
spec:
hosts:
- "*"
gateways:
- <GATEWAY_NAME>
http:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: <GATEWAY_NAME>
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: <APP_NAME>
# REST OF YOUR YAML CONFIG WILL BE AS IT IS
---
apiVersion: v1
kind: Service
@fai555
fai555 / update-firewall-rules-for-GKE-istio.sh
Created April 16, 2020 11:31
update-firewall-rules-for-GKE-istio
gcloud compute firewall-rules list --filter="name~gke-<CLUSTER_NAME>-[0-9a-z]*-master"
gcloud compute firewall-rules update <FIREWALL_RULE_NAME> --allow tcp:10250,tcp:443,tcp:15017
# absolute path to the directory where label_map.pbtxt and input image files are. It must be an absolute path. Docker volume mounting doesn't work with relative path. All other paths in this scripts will work with relative path.
export VOLUME_PATH=""
export SERVER_URL="http://EXTERNAL_IP:8500/v1/models/mnist:predict"
# relative path to the test image. i.e. config/image1.jpg. The path is relative to VOLUME_PATH
export IMAGE_PATH=""
# relative path to the output json. i.e. config/out_image1.json. The path is relative to VOLUME_PATH
export OUTPUT_JSON=""
# relative path to the label_map.pbtxt. i.e. config/label_map.pbtxt. The path is relative to VOLUME_PATH
export LABEL_MAP=""
# Specify True if you want to save the output image.
apiVersion: v1
kind: Service
metadata:
labels:
app: mnist
name: mnist-service
namespace: kubeflow
spec:
ports:
- name: grpc-tf-serving
apiVersion: v1
kind: Service
metadata:
labels:
app: mnist
name: mnist-service
namespace: kubeflow
spec:
ports:
- name: grpc-tf-serving