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 / 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 / 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 / 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 / release-helloapp.sh
Created March 31, 2019 20:00
release script for helloapp
#!/bin/bash
TAG=$1
echo "start tiller"
export KUBECONFIG=$HOME/.kube/kubeconfig
helm tiller start-ci
export HELM_HOST=127.0.0.1:44134
result=$(eval helm ls | grep helloapp)
if [ $? -ne "0" ]; then
helm install --timeout 180 --name helloapp --set image.tag=$TAG charts/helloapp
else
@akash-gautam
akash-gautam / config.yml
Last active April 26, 2019 08:47
CircleCI configuraton for helloapp
version: 2
jobs:
build&pushImage:
working_directory: /go/src/hello-app
docker:
- image: circleci/golang:1.10
steps:
- checkout
- run:
@akash-gautam
akash-gautam / Dockerfile
Created April 1, 2019 06:59
Dockerfile for helloapp used in ci/cd for k8s using circleCI and helm blog
FROM centos/systemd
MAINTAINER "Akash Gautam" <akash.gautam@velotio.com>
COPY hello-app /
ENTRYPOINT ["/hello-app"]
---
- version: v1alpha1
group: velotio.com
kind: BookStore
chart: /opt/helm/helm-charts/book-store
apiVersion: velotio.com/v1alpha1
kind: BookStore
metadata:
name: example-bookstore
spec:
# Default values copied from <project_dir>/helm-charts/book-store/values.yaml
# Default values for book-store.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
operator-sdk new bookstore-operator --api-version=velotio.com/v1alpha1 --kind=BookStore --type=helm --helm-chart=book-store
--helm-chart-repo=https://akash-gautam.github.io/helmcharts/
operator-sdk build akash125/bookstore-operator:v0.0.1