Skip to content

Instantly share code, notes, and snippets.

View akash-gautam's full-sized avatar

Akash Gautam akash-gautam

View GitHub Profile
@akash-gautam
akash-gautam / deploy.yaml
Last active January 10, 2024 11:23
deploy job for the blog ci/cd pipeline for k8s using circleci & helm task.
deploy:
docker: (1)
- image: circleci/golang:1.10
steps: (2)
- checkout
- run: (3)
name: Install AWS cli
command: export TZ=Europe/Minsk && sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > sudo /etc/timezone && sudo apt-get update && sudo apt-get install -y awscli
- run: (4)
name: Set the tag for the image, we will concatenate the app verson and circle build number with a `-` char in between
@akash-gautam
akash-gautam / build&pushjob.yaml
Created March 31, 2019 14:53
build&pushjob.yaml job for ci/cd pipeline for k8s using circleci & helm blog
build&pushImage:
working_directory: /go/src/hello-app (1)
docker:
- image: circleci/golang:1.10 (2)
steps:
- checkout (3)
- run: (4)
name: build the binary
command: go build -o hello-app
- setup_remote_docker: (5)
@akash-gautam
akash-gautam / Chart.yaml
Last active May 7, 2019 09:29
Chart.yaml for helloapp helm chart
version: 1.0.0
appVersion: 0.0.1
name: helloapp
description: Helm chart for helloapp
source:
- https://github.com/akash-gautam/helloapp
@akash-gautam
akash-gautam / values.yaml
Last active May 7, 2019 09:27
values.yaml file for hello app helm chart
image:
tag: 0.0.1
repository: 123456789870.dkr.ecr.us-east-1.amazonaws.com/helloapp
imagePullPolicy: Always
labels:
env: "staging"
cluster: "eks-cluster-blog"
service:
@akash-gautam
akash-gautam / service.yaml
Created March 25, 2019 06:47
service.yaml file for hello app
apiVersion: v1
kind: Service
metadata:
name: helloapp
spec:
type: {{ .Values.service.type }}
ports:
- name: helloapp
port: {{ .Values.service.port }}
protocol: TCP
@akash-gautam
akash-gautam / deployment.yaml
Last active May 7, 2019 09:30
deployment.yaml file for hello app
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: helloapp
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
@akash-gautam
akash-gautam / main.go
Created March 24, 2019 18:36
maion.go file for sample application used in ci/cd for k8s using circleci & helm blog
package main
import (
"encoding/json"
"net/http"
"log"
"github.com/gorilla/mux"
)
type Message struct {
package main
import (
"time"
"velotio.com/consumer"
"velotio.com/producer"
"velotio.com/publisher"
)
package dao
import (
"bytes"
"crypto/tls"
"encoding/json"
"fmt"
"net/http"
)
package consumer
import (
"config"
"fmt"
"github.com/aws/aws-sdk-go/service/kinesis"
"velotio.com/dao"
)