Skip to content

Instantly share code, notes, and snippets.

View initcron's full-sized avatar

Gourav Shah initcron

View GitHub Profile
@initcron
initcron / vote-deploy.yaml
Created April 14, 2025 02:57
Vote Deployment with RollingUpdate Strategy
apiVersion: apps/v1
kind: Deployment
metadata:
name: vote
labels:
role: vote
spec:
minReadySeconds: 20
replicas: 4
strategy:
@initcron
initcron / mlops-pipeline.yaml
Last active April 11, 2025 15:24
MLOps Pipeline for House Price Predictor
# .github/workflows/mlops-pipeline.yml
name: MLOps Pipeline
on:
workflow_dispatch:
inputs:
run_all:
description: 'Run all jobs'
required: false
default: 'true'
@initcron
initcron / vote-deploy-cm.yaml
Created April 2, 2025 13:59
Working Deployment Spec with ConfigMaps
apiVersion: apps/v1
kind: Deployment
metadata:
name: vote
labels:
role: vote
annotations:
kubernetes.io/change-cause: "image updated to v4"
spec:
replicas: 4
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
]
},
@initcron
initcron / instavote-appset-vote-prod.yaml
Last active February 25, 2025 14:34
Create only vote app in Prod
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: instavote
namespace: argocd
spec:
generators:
- matrix:
generators:
- git:
# This is an auto-generated file. DO NOT EDIT
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: argo-rollouts
labels:
app.kubernetes.io/component: argo-rollouts-dashboard
app.kubernetes.io/name: argo-rollouts-dashboard
app.kubernetes.io/part-of: argo-rollouts
name: argo-rollouts-dashboard
@initcron
initcron / instavote-dev.yaml
Created February 23, 2025 13:34
ApplicationSet spec to iterate over a list of charts available in the Git Repo using Git Generator: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: instavote-dev
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/initcron/instavote-gitops
revision: HEAD
@initcron
initcron / instavote-apps.yaml
Created February 23, 2025 13:33
ApplicationSet to iternate over a matrix of 2 charts (services = vote, redis) and 3 environments 2x3 = 6 application specs.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: instavote
namespace: argocd
spec:
generators:
- matrix:
generators:
- git:
@initcron
initcron / gist:9b6f14bd6f3c835651ec1b4cfcdea72b
Last active February 6, 2025 05:37
kubectl create secret generic git-credentials --from-literal=username=<YOUR_GIT_USERNAME> --from-literal=password=<YOUR_GIT_PERSONAL_ACCESS_TOKEN> --namespace=<YOUR_NAMESPACE>
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: vote-ci-
spec:
entrypoint: main
arguments:
parameters:
- name: repo-url
value: "https://github.com/xxxxxx/vote.git"

Setting up Argo Locally on existing Kubernetes Cluster

Create Argo Namespace

kubectl create namespace argo
kubectl get ns

Setup Argo Version and Install it