Skip to content

Instantly share code, notes, and snippets.

Avatar
💤
living the data dream

Raki mdrakiburrahman

💤
living the data dream
View GitHub Profile
View Flux_v2_healthcheck.md

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

View single-job-hook-no.yaml
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 Jun 29, 2022
Helper functions for installing tools
View install.sh
#!/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"
View integration-test-badge.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View unit-test-badge.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdrakiburrahman
mdrakiburrahman / OTEL-agent-and-fluentforward.yaml
Last active Jun 15, 2022
OTEL daemonset and fluentforward not working
View OTEL-agent-and-fluentforward.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
namespace: azure-arc-data
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
View K8s Otel Collector.yaml
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 Jun 13, 2022
[DRAFT] E2E Deployment of Arc Operators without requiring a cluster-admin kubeconfig
View azure-arc-least-priveleges_DRAFT.sh
# = = = = = = = = = = = = = = = = = = = =
# Verbosity wrapper
# = = = = = = = = = = = = = = = = = = = =
# On
export VERBOSE=1
# Off
unset VERBOSE
# = = = = = = = = = = = = = = = = = = = =
# #
View sql-mi-annotations.yaml
apiVersion: v1
data:
password: YWNudG9yUFJFU1RPIQ==
username: Ym9vcg==
kind: Secret
metadata:
name: sql-bc-1-login-secret
namespace: arc-primary
type: Opaque
---
@mdrakiburrahman
mdrakiburrahman / onboarder-kubeconfig-gen.sh
Created May 17, 2022
Generating a User kubeconfig and using that kubeconfig instead of Cluster Admin for onboarding Arc
View onboarder-kubeconfig-gen.sh
# Here is a sample set of roles we'd want our SA/User account to have, this can be anything and the kubeconfig will inherit it
kubectl apply -f https://gist.githubusercontent.com/mdrakiburrahman/d94613872601c397f3a052492f168827/raw/a7909c131beb02f45970f2b605178859c6882555/tina-onboarder-rbac.yaml
# = = = = = = = = =
# Create a kubeconfig from this that overwrites our Cluster Admin that we get when we install a new K8s cluster
# = = = = = = = = =
# Service Account is in default but because of ClusterRoleBinding it has Cluster scope
namespace=default
serviceAccount=arc-data-deployer