Skip to content

Instantly share code, notes, and snippets.

View rinormaloku's full-sized avatar

Rinor Maloku rinormaloku

View GitHub Profile
@rinormaloku
rinormaloku / sa-frontend-deployment.yaml
Last active February 10, 2018 17:59
[Deployment for SA Frontend pods]
apiVersion: extensions/v1beta1
kind: Deployment # 1
metadata:
name: sa-frontend
spec:
replicas: 2 # 2
minReadySeconds: 15
strategy:
type: RollingUpdate # 3
rollingUpdate:
@rinormaloku
rinormaloku / Dockerfile
Created September 22, 2018 15:18
[PgSQL Backup Container] container for backing up PgSQL databases
FROM alpine:3.6
ENV PGHOST='localhost:5432'
ENV PGDATABASE='postgres'
ENV PGUSER='postgres@postgres'
ENV PGPASSWORD='password'
RUN apk update
RUN apk add postgresql
@rinormaloku
rinormaloku / sa-feedback-service.yaml
Created December 22, 2018 17:46
[sa-feedback-deployment]
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sa-feedback
spec:
strategy:
type: Recreate
template:
metadata:
labels:
@rinormaloku
rinormaloku / sa-feedback-pvc.yaml
Created December 22, 2018 18:03
[Persistent Volume Claim]
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sqlite-pvc # 1
spec:
accessModes:
- ReadWriteOnce # 2
resources:
requests:
storage: 1Gi # 3
@rinormaloku
rinormaloku / http-gateway.yaml
Created January 5, 2019 10:11
[Gateway] used to showcase Istio gateways for the article http://rinormaloku.com/istio-practice-gateways/
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: http-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
@rinormaloku
rinormaloku / sa-virtualservice-external.yaml
Created January 5, 2019 11:14
[Virtual Services] config for the series https://rinormaloku.com/istio-an-introduction/ #istio #kubernetes
kind: VirtualService
metadata:
name: sa-external-services
spec:
hosts:
- "*"
gateways:
- http-gateway # 1
http:
- match:
@rinormaloku
rinormaloku / destinationrule-sa-frontend.yaml
Created January 6, 2019 22:58
[Destination Rule SA-Frontend] consistent hash loadbalancing for Introduction to Istio series https://rinormaloku.com/istio-an-introduction/ #istio
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: sa-frontend
spec:
host: sa-frontend
trafficPolicy:
loadBalancer:
consistentHash:
httpHeaderName: version # 1
@rinormaloku
rinormaloku / sa-logic-subsets-destinationrule.yaml
Created January 6, 2019 23:32
[Destination Rule SA-Logic] defining subsets for Introduction to Istio series https://rinormaloku.com/istio-an-introduction/ #istio
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: sa-logic
spec:
host: sa-logic # 1
subsets:
- name: v1 # 2
labels:
version: v1 # 3
@rinormaloku
rinormaloku / sa-logic-subsets-shadowing-vs.yaml
Last active January 13, 2019 14:37
[VirtualService SA-Logic] routing to subset and shadowing. config for Introduction to Istio series https://rinormaloku.com/istio-an-introduction/ #istio
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sa-logic
spec:
hosts:
- sa-logic
http:
- route:
- destination:
@rinormaloku
rinormaloku / sa-logic-subsets-canary-vs.yaml
Created January 7, 2019 19:43
[Canary Deployments] Virtual Service configuraiton for Introduction to Istio series https://rinormaloku.com/istio-an-introduction/ #istio
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sa-logic
spec:
hosts:
- sa-logic
http:
- route:
- destination: