Skip to content

Instantly share code, notes, and snippets.

View ssbostan's full-sized avatar

Saeid Bostandoust ssbostan

  • London
View GitHub Profile
@ssbostan
ssbostan / git3.jenkins
Created March 6, 2023 01:23
Jenkins pipeline syntax reference
pipeline {
agent any
stages {
stage("Clone Git Repository") {
steps {
git(
url: "https://github.com/ssbostan/testrepo.git",
branch: "main",
changelog: true,
poll: true
@ssbostan
ssbostan / git2.jenkins
Created March 5, 2023 15:44
Jenkins pipeline syntax reference
pipeline {
agent any
stages {
stage("Clone Git Repository") {
steps {
dir("neptune") {
git(
url: "https://github.com/ssbostan/neptune.git",
branch: "master",
changelog: true,
@ssbostan
ssbostan / git1.jenkins
Created March 5, 2023 15:36
Jenkins pipeline syntax reference
pipeline {
agent any
stages {
stage("Clone Git Repository") {
steps {
git(
url: "https://github.com/ssbostan/neptune.git",
branch: "master",
changelog: true,
poll: true
@ssbostan
ssbostan / ds.yaml
Created March 4, 2023 21:17
Kubernetes Hacks and Tricks - #4 Find worker node info from Pod spec info
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: test
spec:
selector:
matchLabels:
app: test
template:
metadata:
@ssbostan
ssbostan / pod.yaml
Created February 17, 2023 22:19
Kubernetes Hacks and Tricks - #2 Optional ConfigMaps and Secrets in Pods
apiVersion: v1
kind: Pod
metadata:
name: optional-configmap-secret
spec:
containers:
- name: registry
image: registry:latest
envFrom:
- configMapRef:
@ssbostan
ssbostan / secret.yaml
Created February 13, 2023 15:57
Kubernetes Hacks and Tricks - #1 Immutable ConfigMaps and Secrets
apiVersion: v1
kind: Secret
metadata:
name: test-immutable
labels:
app.kubernetes.io/name: kubernetes-hacks-and-tricks
app.kubernetes.io/created-by: ssbostan
type: Opaque
immutable: true
stringData:
@ssbostan
ssbostan / configmap.yaml
Created February 13, 2023 15:56
Kubernetes Hacks and Tricks - #1 Immutable ConfigMaps and Secrets
apiVersion: v1
kind: ConfigMap
metadata:
name: test-immutable
labels:
app.kubernetes.io/name: kubernetes-hacks-and-tricks
app.kubernetes.io/created-by: ssbostan
immutable: true
data:
mykey: myvalue
@ssbostan
ssbostan / resource5.tf
Created July 10, 2022 19:54
Terraform tutorial using HCL language
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
}
}
}
provider "grafana" {
url = "http://localhost:3000"
@ssbostan
ssbostan / resource4.tf
Created July 10, 2022 19:41
Terraform tutorial using HCL language
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
}
}
}
resource "grafana_user" "ssbostan" {
login = "ssbostan"
@ssbostan
ssbostan / resource3.tf
Created July 10, 2022 15:49
Terraform tutorial using HCL language
terraform {
required_providers {
docker = {
source = "kreuzwerker/docker"
version = ">= 2.16"
}
}
}
resource "docker_container" "nginx" {