Skip to content

Instantly share code, notes, and snippets.

View sadysnaat's full-sized avatar
🥷
Nature does not hurry, yet everything is accomplished

Deepak Sharma sadysnaat

🥷
Nature does not hurry, yet everything is accomplished
View GitHub Profile
@sadysnaat
sadysnaat / blueprint.go
Created January 8, 2025 17:19
Blue Print generating Go Program
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"os"
)
@sadysnaat
sadysnaat / ClusterClassWithVariableExample.yaml
Created January 4, 2025 18:42
ClusterClass With ClusterClassVariable Example
apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
name: docker-clusterclass-v0.1.0
spec:
...
variables:
- name: dnsImageRespository
required: true
schema:
@sadysnaat
sadysnaat / ClusterTopologyWithVariableExample.yaml
Created January 4, 2025 18:34
Clusters With Topology Variables
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: my-docker-cluster
spec:
topology:
...
variables:
- name: dnsImageRespository
value: my.custom.dns.registry
@sadysnaat
sadysnaat / ClusterClassWithPatchExample.yaml
Last active January 4, 2025 18:31
Cluster Class With Patch Example
apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
name: docker-clusterclass-v0.1.0
spec:
...
patches:
- name: dnsImageRespository
definitions:
- selector:
@sadysnaat
sadysnaat / ClusterClassSpec.go
Created January 4, 2025 12:48
Cluster Class Spec - release-1.9
// ClusterClassSpec describes the desired state of the ClusterClass.
type ClusterClassSpec struct {
// infrastructure is a reference to a provider-specific template that holds
// the details for provisioning infrastructure specific cluster
// for the underlying provider.
// The underlying provider is responsible for the implementation
// of the template to an infrastructure cluster.
// +optional
Infrastructure LocalObjectTemplate `json:"infrastructure,omitempty"`
@sadysnaat
sadysnaat / cluster.yaml
Created December 28, 2024 14:39
Sample Cluster
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: sample-cluster
spec:
clusterNetwork:
pods:
cidrBlocks: ["192.168.0.0/16"]
@sadysnaat
sadysnaat / pod.yaml
Created December 27, 2024 06:19
Sample Pod
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
@sadysnaat
sadysnaat / Add Providers.patch
Created December 17, 2024 20:03
Git Ops Repo patches for Cluster API Operator Flux tutorial
diff --git a/apps/base/capi-operator/kustomization.yaml b/apps/base/capi-operator/kustomization.yaml
index bb5688c..15049ae 100644
--- a/apps/base/capi-operator/kustomization.yaml
+++ b/apps/base/capi-operator/kustomization.yaml
@@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- - capi-operator.yaml
\ No newline at end of file
@sadysnaat
sadysnaat / sample-coreprovider.yaml
Created December 11, 2024 17:59
Sample CoreProvider with ManifestPatches
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
name: cluster-api
namespace: capi-system
spec:
manifestPatches:
- |
apiVersion: v1
kind: Service
@sadysnaat
sadysnaat / sample-coreprovider.yaml
Last active December 6, 2024 07:02
CoreProvider
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: CoreProvider
metadata:
name: cluster-api
namespace: capi-system
spec:
version: v1.8.5