Skip to content

Instantly share code, notes, and snippets.

View Lucifergene's full-sized avatar
:electron:
Committing changes to the universe

Avik Kundu Lucifergene

:electron:
Committing changes to the universe
View GitHub Profile
@Lucifergene
Lucifergene / approval-task-demo.yaml
Last active May 2, 2024 15:02
Pipeline with ApprovalTask
---
#BEFORE TASK
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: before
spec:
steps:
- image: quay.io/avik6028/busybox:latest
name: before
@Lucifergene
Lucifergene / README.md
Last active April 11, 2024 11:55
Create Openshift Cluster Script

Openshift Cluster Installation Script

This script automates the installation of an OpenShift cluster on Linux systems. Below are the prerequisites and instructions to run the script on Linux and Mac.

Prerequisites

Linux

  • gh: GitHub CLI for updating the Kubeconfig Gist
  • jq: Command-line JSON processor
@Lucifergene
Lucifergene / k8s.yaml
Created November 22, 2022 22:24
Sample Application Manifest
apiVersion: v1
kind: Namespace
metadata:
name: nodejs
labels:
name: nodejs
---
apiVersion: apps/v1
kind: Deployment
metadata:
@Lucifergene
Lucifergene / index.js
Created August 28, 2021 16:20
CloudFlare Worker Script for URL Shortener Service
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
const html404 = `<!DOCTYPE html>
<body>
<h1>404 Not Found.</h1>
<p>The url you visit is not found.</p>
</body>`
#set($DDBResponse = $input.path('$'))
#if ($DDBResponse.toString().contains("Item"))
#set($context.responseOverride.header.Location = $DDBResponse.Item.longURL.S)
#end
{
"Key": {
"shortId": {
"S": "$input.params().path.shortId"
}
},
"TableName": "URL-Shortener"
}
#set($DDBResponse = $input.path('$'))
{
"shortURL": "$DDBResponse.Attributes.shortId.S",
"longURL": "$DDBResponse.Attributes.longURL.S",
"owner": "$DDBResponse.Attributes.owner.S"
}
@Lucifergene
Lucifergene / post-integration-request.json
Created August 18, 2021 19:01
Intregation Request Mapping Template of POST Method
{
"TableName": "URL-Shortener",
"ConditionExpression": "attribute_not_exists(id)",
"Key": {
"shortId": {
"S": $input.json('$.shortURL')
}
},
"ExpressionAttributeNames": {
"#u": "longURL",
apiVersion: v1
kind: Service
metadata:
name: myweb
labels:
env: testing
spec:
ports:
- port: 80
selector:
@Lucifergene
Lucifergene / kustomization.yaml
Last active September 1, 2020 18:39
DevOps-Task-5-Kustomization file
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- prom.yaml
- grafana.yaml