Skip to content

Instantly share code, notes, and snippets.

View bugcy013's full-sized avatar
🪄
Focusing

Dhanasekaran Anbalagan bugcy013

🪄
Focusing
View GitHub Profile
@bugcy013
bugcy013 / 238-cue.sh
Created December 21, 2023 06:26 — forked from vfarcic/238-cue.sh
# Source: https://gist.github.com/vfarcic/a5cb2e8dcd1cf9c14194db3310d5c282
#########################################################
# Is CUE The Perfect Language For Kubernetes Manifests? #
# https://youtu.be/Z-fdFEvgNss #
#########################################################
# Additional Info:
# - Cue: https://cuelang.org
# - Helm vs Kustomize - The Fight Between Templating and Patching in Kubernetes: https://youtu.be/ZMFYSm0ldQ0
DemoHandler
---
def lambda_handler(event, context):
print(event)
return "hello, world!!"
DemoAuthorizer
---
@bugcy013
bugcy013 / gh_inactive_user.py
Created October 3, 2022 17:26 — forked from psa-jforestier/user.py
List all inactive user of a GitHub organization using GitHub API
'''
List all inactive user of a GitHub organization
See user.py --help for usage.
Partially inspired by https://gist.github.com/morido/9817399
'''
import sys # to use sys.stdout
import os
from datetime import datetime
from time import strftime
import datetime
@bugcy013
bugcy013 / Ansible-module-sample-bash.sh
Created March 7, 2022 05:56 — forked from devops-school/Ansible-module-sample-bash.sh
Ansible Module Sample Code using Linux Bash script Example 5
#touch.bash
#!/bin/bash
# import variables from ansible
source $1
state=${state:-present}
if [[ $state == "present" ]]; then
if [ ! -e $file ]; then
touch $file
echo { \"changed\": true }

Supported built-in functions

  • abs(float) - Returns the absolute value of a given float. Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. See also the signum function.

  • basename(path) - Returns the last element of a path.

  • base64decode(string) - Given a base64-encoded string, decodes it and returns the original string.

@bugcy013
bugcy013 / tf_functions.tf
Created March 6, 2022 15:04 — forked from carlessanagustin/functions.tf
Terraform functions by example
##--------------------------
## Terraform: Functions ##
##--------------------------
## Open terraform console
terraform console
#######################
## Numeric Functions ##
#######################
@bugcy013
bugcy013 / Jenkins Ans
Created March 7, 2021 10:24 — forked from manuelta/Jenkins Ans
Jenkins QQ
QUESTIONS FROM PREVIOUS EXAM
Refer : https://www.tutorialspoint.com/jenkins/index.htm (Questions are asked from this site)
1. Which of the folowing ways can be used to schedule a build in jenkins?
-After completion of other builds
-Can be scheduled to run at specific time
-By souce code management commits
2. To set up slaves/nodes in Jenkins which of the following feature is used?
Manage Nodes
@bugcy013
bugcy013 / infra-secret-management-overview.md
Created June 26, 2020 13:48 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

Tips to pass Certified Kubernetes Application Developer (CKAD) exam
Getting started Kubernetes :-
a) Book : Kubernetes: Up & Running
b) Practice practice & practice with CKAD Exercises
the Best Kubernetes CKAD sample exercises which cover all parts of the exam https://github.com/dgkanatsios/CKAD-exercises.
c) Again, the best practice is use kubectl command well. Use kubectl to create resources (such as deployment, service, cronjobs, secret, configmap…) instead of creating them from manifest files.
Incase you have to edit manifest, use dry-run and -o yamlto save yaml file then edit manifest files.
d) Kubernetes in Action by Mario Luksa. The book is the holy bible of Kubernetes, and it basically answer all questions you may have ;
e) Whether or not you use Kubernetes at work, you should still provision your own cluster somewhere and play with it.