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 / watches.yaml
Created September 8, 2019 07:11
watches.yaml file for ansible based operator
---
- version: v1alpha1
group: blog.velotio.com
kind: BookStore
role: /opt/ansible/roles/bookstore
kubectl apply -f deploy/crds/velotio_v1alpha1_bookstore_cr.yaml
kubectl apply -f deploy/crds/velotio_v1alpha1_bookstore_crd.yaml
operator-sdk build akash125/bookstore-operator:v0.0.1
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/
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.
---
- version: v1alpha1
group: velotio.com
kind: BookStore
chart: /opt/helm/helm-charts/book-store
@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"]
@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 / 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