Skip to content

Instantly share code, notes, and snippets.

View mdrakiburrahman's full-sized avatar
💤
living the data dream

Raki mdrakiburrahman

💤
living the data dream
View GitHub Profile

The key capability a GitOps tool can provide to declaratively deploy each of our CRDs is health checks. Most Production Grade Gitops tools have the logic necessary to monitor K8s native resources (Pod, Service etc), but also the flexibility to extend to any Custom Resource.

Both Flux V1 and V2 has good support for K8s native resources, which makes it a great tool for the average Arc-enabled Kubernetes Customers deploying K8s components that aren't Customer Resources.

For custom resources, Flux V2 has limited literature, as it offloads that responsibility to kstatus, which makes rigid assumptions about the fields a CR should emit to be considered healthy - a boolean called Ready. Due to there being no standardized pattern for this, many open source

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdrakiburrahman
mdrakiburrahman / single-job-hook-no.yaml
Last active July 1, 2022 23:53
ArgoCD Hook Health issue
apiVersion: v1
kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-wave: "-1"
name: single-job-hook-no
---
apiVersion: v1
data:
password: aGVsbG8K
@mdrakiburrahman
mdrakiburrahman / install.sh
Created June 29, 2022 21:09
Helper functions for installing tools
#!/bin/bash -e
################################################################################
## File: install.sh
## Desc: Helper functions for installing tools
################################################################################
download_with_retries() {
# Due to restrictions of bash functions, positional arguments are used here.
# In case if you using latest argument NAME, you should also set value to all previous parameters.
# Example: download_with_retries $ANDROID_SDK_URL "." "android_sdk.zip"
@mdrakiburrahman
mdrakiburrahman / OTEL-agent-and-fluentforward.yaml
Last active June 15, 2022 21:21
OTEL daemonset and fluentforward not working
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
namespace: azure-arc-data
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
namespace: azure-arc-data
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
@mdrakiburrahman
mdrakiburrahman / azure-arc-least-priveleges_DRAFT.sh
Last active June 13, 2022 21:22
[DRAFT] E2E Deployment of Arc Operators without requiring a cluster-admin kubeconfig
# = = = = = = = = = = = = = = = = = = = =
# Verbosity wrapper
# = = = = = = = = = = = = = = = = = = = =
# On
export VERBOSE=1
# Off
unset VERBOSE
# = = = = = = = = = = = = = = = = = = = =
# #
@mdrakiburrahman
mdrakiburrahman / query-purview-insights.py
Last active June 4, 2022 04:18
Querying various Azure Purview REST APIs to gather Insights data into Pandas DataFrames
import os
import requests
import json
import jmespath
import pandas as pd
from pprint import pprint
def azuread_auth(tenant_id: str, client_id: str, client_secret: str, resource_url: str):
"""
Authenticates Service Principal to the provided Resource URL, and returns the OAuth Access Token
apiVersion: v1
data:
password: YWNudG9yUFJFU1RPIQ==
username: Ym9vcg==
kind: Secret
metadata:
name: sql-bc-1-login-secret
namespace: arc-primary
type: Opaque
---