Skip to content

Instantly share code, notes, and snippets.

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

Staz stazdx

🏠
Working from home
View GitHub Profile
@stazdx
stazdx / _helpers.tpl
Created June 26, 2022 06:07
Helpers file - Helm template
{{/*
Expand the name of the chart.
*/}}
{{- define "microservice-template.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
@stazdx
stazdx / values.yaml
Created June 26, 2022 06:01
values yaml - microservice template
# Default values for microservice-template.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
@stazdx
stazdx / Chart.yaml
Created June 26, 2022 05:57
Chart.yaml file - all fields
apiVersion: The chart API version (required)
name: The name of the chart (required)
version: A SemVer 2 version (required)
kubeVersion: A SemVer range of compatible Kubernetes versions (optional)
description: A single-sentence description of this project (optional)
type: The type of the chart (optional)
keywords:
- A list of keywords about this project (optional)
home: The URL of this projects home page (optional)
sources:
@stazdx
stazdx / Chart.yaml
Last active June 1, 2022 08:20
Open Source Grafana Stack on k8s - k8staz.com
apiVersion: v2
name: kube-prometheus-stack
version: 1.0.0-SNAPSHOT
description: Chart to deploy kube-prometheus-stack
dependencies:
# https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/Chart.yaml
- name: kube-prometheus-stack
version: 34.6.0
repository: https://prometheus-community.github.io/helm-charts
@stazdx
stazdx / Controller.java
Created June 1, 2022 07:54
SpringBootOpenTelemetryPrometheusExemplars - k8staz.com
package com.staz.observability;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Controller {
@PostMapping("/fail")
@stazdx
stazdx / bitbucket_list_all.py
Last active June 1, 2022 16:15
Bitbucket List all projects and repos
import requests
from requests.auth import HTTPBasicAuth
username = 'username@github.com' # Replace
password = 'xXxXxxxXxXXx' # Replace
team = 'StazDxru' # Replace
team_replaced = team+'@'
full_repo_list = []