Skip to content

Instantly share code, notes, and snippets.

View Debjyoti30's full-sized avatar
🏠
Working from home

Debjyoti30

🏠
Working from home
View GitHub Profile
@Debjyoti30
Debjyoti30 / dev-role.yml
Created May 28, 2025 06:22
RBAC is a powerful authorization mechanism in #Kubernetes, requiring two key objects—Roles and RoleBindings—to define and enforce access controls within specific namespaces and resources. It helps ensure least privilege, improves security posture, and supports multi-tenant environments.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: dev-role
namespace: dev
rules:
- name: dev-role-permissions
apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
@Debjyoti30
Debjyoti30 / main.bicep
Created March 27, 2025 17:20
Demo Scenario :- Establishing a private connection between Azure app service and Azure storage account
// List of Parameters
param location string = resourceGroup().location
param appServiceName string = 'demowebapp'
param storageAccountName string = 'demostorageaccount'
param appServicePlanName string = 'demowebapp-asp'
// VNET Provisioning
resource vnet 'Microsoft.Network/virtualNetworks@2022-07-01' = {
name: 'demo-vnet'
location: location
@Debjyoti30
Debjyoti30 / github-action-ci-demo.yml
Created March 1, 2025 07:18
A sample Github action CI pipeline / workflow file for nodejs application
name: Defining CI pipeline /workflow for the solar system project
on:
push:
branches:
- main
- 'feature/*'
pull_request:
branches: [main]
@Debjyoti30
Debjyoti30 / CD-pipeline.yml
Created January 14, 2025 08:28
Build image from the Docker file and provision Azure container app Job using the Image
# cd-pipeline.yml
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
artifactName: 'LibraryContainerAppJob'
containerRegistry: '<Your_ACR_Name>'
@Debjyoti30
Debjyoti30 / [pack & push]azure-pipelines.yml
Created January 14, 2025 07:54
Pack and push Dockerfile as an Artifact
trigger:
- feature/POC-Demo
pool:
vmImage: 'ubuntu-latest'
variables:
packageName: 'LibraryContainerAppJob'
packageVersion: '$(Build.BuildNumber)'
sourcePath: 'ConsoleDemo.Library'
@Debjyoti30
Debjyoti30 / infra-deployment.yml
Created January 14, 2025 07:28
Infra deployment pipeline for ACR & Azure container App managed environment deployment
# infra-pipeline.yml
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
resourceGroupName: '<Your_Resource_Group_Name>'
location: '<Your_Location>'
@Debjyoti30
Debjyoti30 / acr.bicep
Last active January 14, 2025 08:21
Azure container registry & Azure Container app Managed environment Bicep Module
/*
Author: Debjyoti Ganguly
Date: 14th Jan 2025
*/
@description('The name of the Azure Container Registry')
param registryName string
@description('The location of the Azure Container Registry')
@Debjyoti30
Debjyoti30 / main.yaml
Created January 11, 2025 10:50
Sample Workflow file in GitHub
# Author :- Debjyoti
name: 'sample workflow file'
on:
push:
branches:
- main
- feature/feature-5.2
pull-request:
branches:
@Debjyoti30
Debjyoti30 / container-based-action.yaml
Last active January 11, 2025 11:03
A sample Container action type in GitHub
# Author: Debjoti
name: 'Calculate Daylight Duration'
description: 'A GitHub Action to calculate the duration of daylight based on sunrise and sunset times.'
inputs:
sun_rise_time:
description: 'The time of sunrise in hours (24-hour format).'
required: true
default: 6
sun_set_time:
@Debjyoti30
Debjyoti30 / upload-sarif.yaml
Last active January 2, 2025 11:52
Sample GitHub Action file to Upload SARIF file generated outside the repo
// Sample GitHub Actions workflow file to upload a SARIF file created outside the repo to GitHub Advanced Security.
name: "Upload SARIF"
// Run workflow each time code is pushed to your repository and on a schedule.
//The scheduled workflow runs every Thursday at 15:45 UTC.
on:
push:
schedule: